[daip] Absolute to offset coordinates
Andy Biggs
abiggs at eso.org
Thu Oct 23 06:44:48 EDT 2014
Hi Eric. I didn't explain very well I think. My main question concerns
having 2 source positions for which you want to measure the delta_ra and
delta_dec. The latter is easy, but for the former you multiply by
cos(dec). The question concerns which declination to use. I have always
done what AIPS does, but others seem to take an average.
More specifically, in the OT we can allow a user to enter telescope
pointing positions as absolute coordinates, but these can then be
converted into their delta_ra and _dec equivalents, these being
referenced to the source position. I have always done this like AIPS i.e.
delta_ra = (ra2 - ra1) * cos(dec1)
where ra1, dec1 is the source position. Others seem to use
delta_ra = (ra2 - ra1) * cos((dec1 + dec2) / 2).
There is, for example, an offset calculator at Keck that uses the latter:
http://www2.keck.hawaii.edu/inst/common/offset.php
Presumably AIPS is doing the right thing...
Cheers,
Andy
Am 22/10/2014 um 23:34 schrieb Eric Greisen:
> On 10/22/2014 02:03 PM, Andy Biggs wrote:
>> Hi Eric. I have a question about the calculation of the r.a. difference
>> between two source positions. For this one needs to know the
>> declination, but which one to use has always confused me. I always
>> follow the AIPS convention and use the declination of the position that
>> one is shifting from. However, I have also seen people take the average
>> of the two declinations.
>>
>> Is there a hard and fast rule about how to do this? I ask as the ALMA
>> Observing Tool is doing the absolute to offset (from a reference
>> position) coordinate conversion incorrectly. I want to clear this
>> declination uncertainty up before I tell them what to do.
>>
>> Cheers,
>>
>> Andy
>>
>
> I don't understand what the situation is so I do not know how to answer.
>
> If you have 2 pixel positions in an image and want to know the RA
> difference you really have to convert the pixel coordinates into proper
> RA,Dec values using the full coordinate projection information. Thus
> pixel size, projection type, reference coordinates, rotation, etc all
> enter into the computation.
>
> If someone is saying source 1 is at RA,Dec such and so and source 2 is x
> arc minutes away, the computation is also messy. The inverse - given 2
> Ra,Dec coords what is the difference (verb IMDIST) the code looks like
>
> C small angles (< 0.1 asec)
> IF ((ABS(RA1-RA2).LT.5.D-7) .AND. (ABS(DEC1-DEC2).LT.5D-7)) THEN
> DD = SQRT (((RA1-RA2)*COS(DEC1))**2 + (DEC1-DEC2)**2)
> ELSE
> DD = SIN(DEC1)*SIN(DEC2) + COS(DEC1)*COS(DEC2)*COS(RA1-RA2)
> DD = MAX (-1.0D0, MIN (1.0D0, DD))
> DD = ACOS (DD)
> END IF
> and the angle is
> ST = 0.0D0
> IF (DD.NE.0.0D0) THEN
> ST = SIN (RA2-RA1) * COS (DEC2) / SIN (DD)
> ST = MAX (-1.0D0, MIN (1.0D0, ST))
> CT = (SIN(DEC2)*COS(DEC1) - COS(DEC2)*SIN(DEC1)*COS(RA2-RA1))
> * / SIN(DD)
> C ST = RAD2DG * ASIN (ST)
> ST = RAD2DG * ATAN2 (ST, CT)
> END IF
>
> A full spherical trig computation.
>
> For UV data, we use RASHIFT referenced to the reference declination at
> all times (not any other dec in the field) but the center RA,Dec of each
> facet is still computed by messier formulae...
>
> Cheers
>
> Eric
>
--
Andy Biggs
ARC Astronomer, ALMA Regional Centre
European Southern Observatory
Karl-Schwarzschild-Straße 2
D-85748 Garching
Germany
tel. +49 89 3200 6471
fax. +49 89 3200 6898
More information about the Daip
mailing list