interface rawToInst subroutine rawToInstScalar(rawX, rawY, detX, detY, thetaArcsec, phi) integer(int16), intent(in) :: rawX,& rawY real(double), intent(out), optional :: thetaArcsec,& phi real(single), intent(out), optional :: detX,& detY end subroutine rawToInstScalar subroutine rawToInstVector(rawX, rawY, detX, detY, thetaArcsec, phi) integer(int16), intent(in) :: rawX(:),& rawY(size(rawX)) real(double), intent(out), optional :: thetaArcsec(size(rawX)),& phi(size(rawX)) real(single), intent(out), optional :: detX(size(rawX)),& detY(size(rawX)) end subroutine rawToInstVector subroutine rawToInstArray(rawX, rawY, detX, detY, thetaArcsec, phi) integer(int16), intent(in) :: rawX(:,:),& rawY(size(rawX,1),size(rawX,2)) real(double), intent(out), optional :: thetaArcsec(size(rawX,1)& ,size(rawX,2)),& phi(size(rawX,1),size(rawX,2)) real(single), intent(out), optional :: detX(size(rawX,1),size(rawX,2)),& detY(size(rawX,1),size(rawX,2)) end subroutine rawToInstArray end interface
These subroutines convert from chip coordinates (ie, the RAWX/Y or PIXCOORD1 system) to instrument-centric coordinates, the latter being either the DETX/Y (the same, up to a scalar multiple, as the CAMCOORD2 system) or the TELCOORD system, depending on which of the optional variables ,
,
and
the caller has supplied. The cal
calls CAL_rawXY2mm and CAL_camCoord2ToTelCoord are employed.
NOTE this function requires the cal to have been set to the correct instrumentId, ccdChipId and (if instrumentId is EMOS1 or EMOS2) ccdNodeId before the call.