<div dir="ltr">Hi Chris,<div><br></div><div>The following discussion might be useful:</div><div><br></div><div><a href="https://stackoverflow.com/questions/52900678/coordinates-transformation-in-astropy">https://stackoverflow.com/questions/52900678/coordinates-transformation-in-astropy</a><br></div><div><br></div><div>The latest Astropy 5.0 now has an HADec frame. :-)</div><div><br></div><div>Cheers,</div><div><br></div><div>Ludwig</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 12 Jan 2022 at 04:47, Phillips, Chris (S&A, Marsfield) via Difx-users <<a href="mailto:difx-users@listmgr.nrao.edu">difx-users@listmgr.nrao.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The “celestial sphere” rotates wrt the earth. So any observations need to be appropriate rotated to a specific epoch (usually J2000). I want to be able to calculate the rotation terms myself for some tests.<br>
<br>
I’m possibly using the wrong terminology, but B1950, J2000 and “date” are commonly used. I’m guessing date <==> J2022 currently.<br>
<br>
Cheers<br>
Chris<br>
<br>
> On 12 Jan 2022, at 12:50, Leonid Petrov <<a href="mailto:Leonid.Petrov@lpetrov.net" target="_blank">Leonid.Petrov@lpetrov.net</a>> wrote:<br>
> <br>
> Chris,<br>
> <br>
> Why do you need it? Words like "equinox of date" are related to<br>
> efforts to simplify computations in the pre-computer epochs.<br>
> What do you want to achieve at the end?<br>
> <br>
> Leonid<br>
> <br>
>> On 2022-01-11 20:42, Phillips, Chris (S&A, Marsfield) via Difx-users wrote:<br>
>> Hi al<br>
>> Apologies for using the DIFX mailing list for a decidedly non-DIFX<br>
>> question. I’m guessing there is a number of people on this list who<br>
>> can help me with this query.<br>
>> I am trying to convert some J2000 coordinates to “date<br>
>> coordinates” (ie precess to a specific date).<br>
>> The initial idea was to use python astropy (rather than perl/slalib)<br>
>> to get with the times. However I am getting inconsistent results, and<br>
>> cannot find any documentation on how to do this in astropy.<br>
>> As an example I am trying to convert 1934-638 from J2000 to epoch<br>
>> 2020-1-1. Various different approaches are here:<br>
>> 1934-638 19h39m25.026s -63d42m45.63s J2000<br>
>> astropy 19h41m15.463s -63d39m55.69s<br>
>> perl 19h41m13.563s -63d39m56.94s<br>
>> SLA 19h41m10.545s -63d40m02.77s<br>
>> Perl SLA 19h41m10.559s -63d40m02.76s<br>
>> Online 19h41m15.5s -63d39m56s<br>
>> <a href="http://www.robertmartinayers.org/tools/coordinates.html" rel="noreferrer" target="_blank">http://www.robertmartinayers.org/tools/coordinates.html</a><br>
>> “Perl” is code I wrote years ago for Astro:Coord (on CPAN) based<br>
>> on Fortran code at Hobart observatory<br>
>> SLA is a hacked version from Caltech VLBI package “PRECESS” which<br>
>> uses SLALIB<br>
>> PerlSLA is a perl version which makes the same calls (mostly for<br>
>> coding consistency check)<br>
>> Online is a random webpage found via google.<br>
>> Clearly astropy and the online version use the same algorithm (or<br>
>> online is using astropy under the hood).<br>
>> My perl version is similar to astropy, but slalib is different by a<br>
>> lot. I remember years ago looking into this sort of stuff<br>
>> (maybe B1950-J2000 rather than epoch precession) and SLALIB used a<br>
>> very different implementation to astronomical<br>
>> Almanac, following a paper which basically said the almanac<br>
>> implementation was wrong.<br>
>> FYI, the relevant code is:<br>
>> Astropy:<br>
>> from astropy.coordinates import SkyCoord, FK5<br>
>> from astropy.time import Time<br>
>> c = SkyCoord('19h39m25.026s', '-63d42m45.63s', frame='icrs')<br>
>> t = Time('2020-01-01 00:00:00', scale='utc')<br>
>> my_date = FK5(equinox=Time(t))<br>
>> c_date = c.transform_to(my_date)<br>
>> I’m a little dubious this is correct, given the use of<br>
>> “Equinox”, while I really want to change Epoch.<br>
>> The SLALIB implementation is:<br>
>> CALL SLA_MAPPA(2000D0, DATE, AMPRMS)<br>
>> CALL SLA_MAPQKZ(R2000, D2000, AMPRMS, RA, DA)<br>
>> Where DATE is the MJD (checked to be consistent).<br>
>> Does anyone have code which they trust to test these conversions (or<br>
>> comments)?<br>
>> Thanks<br>
>> Chris<br>
>> _______________________________________________<br>
>> Difx-users mailing list<br>
>> <a href="mailto:Difx-users@listmgr.nrao.edu" target="_blank">Difx-users@listmgr.nrao.edu</a><br>
>> <a href="https://listmgr.nrao.edu/mailman/listinfo/difx-users" rel="noreferrer" target="_blank">https://listmgr.nrao.edu/mailman/listinfo/difx-users</a><br>
<br>
<br>
_______________________________________________<br>
Difx-users mailing list<br>
<a href="mailto:Difx-users@listmgr.nrao.edu" target="_blank">Difx-users@listmgr.nrao.edu</a><br>
<a href="https://listmgr.nrao.edu/mailman/listinfo/difx-users" rel="noreferrer" target="_blank">https://listmgr.nrao.edu/mailman/listinfo/difx-users</a><br>
</blockquote></div>