next up previous 623
Next: SCULIB_CALC_BOL_COORDS - Calculate the bolometer offsets in (apparent RA,DEC), AzEl or NA
Up: Library APIs
Previous: SCULIB_BOLSELECT - interpret a list of selected bolometers


SCULIB_CALC_APPARENT - calculate apparent RA, Dec of plate centre and angle of input coord system N relative to apparent N

Description:
This routine takes the input coordinates and coordinate system of the map centre and converts them to the apparent coords at the time of the observation. In addition, the angle between the north direction in the input coordinate frame and that in the apparent frame is calculated (measured anti-clockwise from input north, in radians). See SCU/3.0/JFL/ 0393.

AZ
coords: Calculate the apparent RA and DEC at the LST when the routine is called by:-

$\displaystyle \sin(dec\_app) = \sin(lat\_obs) * \sin(el) + \cos(lat\_obs) * \cos(el) * \cos(az)$ (4)

$\displaystyle \sin(H\_A) = - \frac{\sin(az) * \cos(el)}{\cos(dec\_app)}$ (5)

$\displaystyle \cos(H\_A) = \frac{\sin(el) - \sin(dec\_app) * \sin(lat\_obs)}{\cos(dec\_app) * \cos(lat\_obs)}$ (6)

$ \cos(dec\_app)$ is present in the denominator of both the $ \sin(H\_A)$ and $ \cos(H\_A)$ terms and it could cause both to blow up - so it's left out as only the ratio is important

$\displaystyle RA\_app = LST - H\_A$ (7)

$\displaystyle \sin(rotation) = \frac{\sin(az) * \cos(lat\_obs)}{\cos(dec\_app)}$ (8)

$\displaystyle \cos(rotation) = \frac{\sin(lat\_obs) - \sin(dec\_app) * \sin(el)}{\cos(dec\_app) * \cos(el)}$ (9)

Again, $ \cos(dec\_app)$ appears in the denominator of both $ \sin$ and $ \cos$ expressions and is left out of the calculation because on ly the ratio is important.

RB
coords: Use SLA_FK54Z to convert to RJ. Use SLA_MAP to convert to apparent, giving ra_app, dec_app. Use same method to calculate apparent position of RB N pole, giving ra_N_app, dec_N_app. Then calculate rotation from:-

$\displaystyle \mathrm{d}RA = ra\_app - ra\_N\_app$ (10)

$\displaystyle \sin (rotation) = \frac{\sin(\mathrm{d}RA) * \cos(dec\_N\_app)}{\cos(lat)}$ (11)

$\displaystyle \cos (rotation) = \frac{\sin(dec\_N\_app) - \sin(dec\_app) * \sin(lat)}{\cos(dec\_app) * \cos(lat)}$ (12)

Since $ \cos(lat)$ is in the denominator for both $ \sin$ and $ \cos$ terms, is always $ +$ve except for $ \pm \pi/2$ where it goes to zero and blows up the equations, leave it out in the calculations. The ratio of sin and cos will be unaffected.

If dec_app = $ \pi/2$ (i.e. at N pole of apparent system) then

$\displaystyle rotation = \pi - (ra\_N\_app - ra\_app)$ (13)

RJ
coords: Use SLA_MAP to convert to apparent. Use same method to calculate apparent position of RB N pole. Derive rotation angle in the same way as for RB.

GA
coords: Use SLA_GALEQ to convert to RJ. Use SLA_MAP to convert to apparent, giving ra_app, dec_app. Use same method to calculate apparent position of GA N pole, giving ra_N_app, dec_N_app. Derive rotation angle in the same way as for RB.

EQ
coords: Use SLA_ECLEQ to convert to RJ. Use SLA_MAP to convert to apparent, giving ra_app, dec_app. Use same method to calculate apparent position of EQ N pole, giving ra_N_app, dec_N_app. Derive rotation angle in the same way as for RB.

HA
coords: Apparent RA = LST - LONG

Apparent Dec = LAT

Rotation = 0.0D0

RD
coords: Apparent RA, Dec set to input values. Rotation = 0.0.

PLANET
coords: If MJD1 = MJD2 then apparent RA, Dec set to input LONG, LAT. Rotation = 0.0. Otherwise apparent RA, Dec interpolated (or extrapolated) between LONG, LAT, MJD1 and LONG2, LAT2, MJD2 according to MJD. Rotation = 0.


Invocation:
CALL SCULIB_CALC_APPARENT (LAT_OBS, LONG, LAT, LONG2, LAT2, MAP_X, MAP_Y, COORD_TYPE, LST, MJD, MJD1, MJD2, RA_APP, DEC_APP, ROTATION, STATUS)

Arguments:

LAT_OBS = DOUBLE PRECISION (Given)
latitude of observatory (radians)
LONG = DOUBLE PRECISION (Given)
longitude of centre in input coord system (radians)
LAT = DOUBLE PRECISION (Given)
latitude of centre in input coord system (radians)
LONG2 = DOUBLE PRECISION (Given)
longitude of second centre in PLANET coord system (radians)
LAT2 = DOUBLE PRECISION (Given)
latitude of second centre in PLANET coord system (radians)
MAP_X = DOUBLE PRECISION (Given)
x tangent plane offset of point from centre (radians) The offset must be in the same coordinate as COORD_TYPE
MAP_Y = DOUBLE PRECISION (Given)
y tangent plane offset of point from centre (radians) The offset must be in the same coordinate as COORD_TYPE
COORD_TYPE = CHARACTER$ *$($ *$) (Given)
Coord system of input centre, RD, RB, RJ, GA, EQ, PLANET
LST = DOUBLE PRECISION (Given)
LST for requested coordinates (for AZ and HA)
MJD = DOUBLE PRECISION (Given)
Modified Julian date of observation
MJD1 = DOUBLE PRECISION (Given)
Modified Julian date of first centre in PLANET coord system
MJD2 = DOUBLE PRECISION (Given)
Modified Julian date of second centre in PLANET coord system
RA_APP = DOUBLE PRECISION (Returned)
Apparent RA of point at date (radians)
DEC_APP = DOUBLE PRECISION (Returned)
Apparent Dec
ROTATION = DOUBLE PRECISION (Returned)
Angle between apparent north and north of input coord system (radians, measured clockwise from input north)
STATUS = INTEGER (Given and returned)
Global status

Notes:
Does not handle LOCAL_COORDS for MAP_X and MAP_Y (see SCULIB_APARRENT_2_MP for information on how to do this)
Copyright
Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.


next up previous 623
Next: SCULIB_CALC_BOL_COORDS - Calculate the bolometer offsets in (apparent RA,DEC), AzEl or NA
Up: Library APIs
Previous: SCULIB_BOLSELECT - interpret a list of selected bolometers

SURF Programming Interface
Starlink System Note 72
Tim Jenness, John F. Lightfoot
Joint Astronomy Centre, Hilo, Hawaii
10 July 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council