diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /vo/votools/gasplib/treqst.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'vo/votools/gasplib/treqst.x')
-rw-r--r-- | vo/votools/gasplib/treqst.x | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vo/votools/gasplib/treqst.x b/vo/votools/gasplib/treqst.x new file mode 100644 index 00000000..9e6b6548 --- /dev/null +++ b/vo/votools/gasplib/treqst.x @@ -0,0 +1,33 @@ +define ARCSEC_PER_RADIAN 206264.8062470964d0 +# TREQST -- Procedure to convert RA and Dec to standard coordinates +# given the plate centre. + +procedure treqst (plate_centre_ra, plate_centre_dec, + object_ra, object_dec, xi_object, eta_object) + +double plate_centre_ra #i: (radians) +double plate_centre_dec #i: (radians) +double object_ra #i: (radians) +double object_dec #i: (radians) +double xi_object #o: standard coordinate (rad) +double eta_object #o: standard coordinate (rad) + +double div + +begin + # Find divisor + div=(dsin(object_dec)*dsin(plate_centre_dec)+ + dcos(object_dec)*dcos(plate_centre_dec)* + dcos(object_ra-plate_centre_ra)) + + # Compute standard coords and convert to arcsec + + xi_object = dcos(object_dec)*dsin(object_ra-plate_centre_ra)* + ARCSEC_PER_RADIAN/div + + eta_object = (dsin(object_dec)*dcos(plate_centre_dec)- + dcos(object_dec)*dsin(plate_centre_dec)* + dcos(object_ra-plate_centre_ra))* + ARCSEC_PER_RADIAN/div + +end |