comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Tool for converting FK4/FK5
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Tool for converting FK4/FK5 [message #93165] Thu, 05 May 2016 06:48 Go to next message
Miguel is currently offline  Miguel
Messages: 18
Registered: April 2015
Junior Member
Hi,

I am currently working with two fits files but with different coordinates system.
One is the FK4 (B1950) and the other is FK5 (J2000) and I would like to know if there is a procedure in IDL to convert from one to another.
I have found the (j/b)precess but it works for only for one position and hprecess converts only the equinox in the FK5 system.

I prefer IDL but if you know something in Python, it would be great.

Thanks for your help.

Miguel
Re: Tool for converting FK4/FK5 [message #93167 is a reply to message #93165] Thu, 05 May 2016 07:46 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Have you tried vector input for jprecess.pro

http://idlastro.gsfc.nasa.gov/ftp/pro/astro/jprecess.pro

It seems to work for me.

a = [3.24,23.44,31.66]
dec = [-0.23,22.44,34.44]
mu_radec =[ [3.2,2.3],[0,0.1],[-2.3,1.2]]
jprecess,ra,dec,ra2,dec2,mu_radec=mu_radec

Also, you can always just loop over calls to any procedure that only processes scalars.

--Wayne

On Thursday, May 5, 2016 at 9:48:42 AM UTC-4, miguelfigue...@gmail.com wrote:
> Hi,
>
> I am currently working with two fits files but with different coordinates system.
> One is the FK4 (B1950) and the other is FK5 (J2000) and I would like to know if there is a procedure in IDL to convert from one to another.
> I have found the (j/b)precess but it works for only for one position and hprecess converts only the equinox in the FK5 system.
>
> I prefer IDL but if you know something in Python, it would be great.
>
> Thanks for your help.
>
> Miguel
Re: Tool for converting FK4/FK5 [message #93168 is a reply to message #93165] Thu, 05 May 2016 07:50 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Oops, I just realize what you meant by "one position" -- you want to transform the FITS headers.

Although it is not documented, HPRECESS does calls jprecess if the input year is 1950 and the output year is 2000, and calls bprecess if the input year is 2000 and the output year is 1950. This is just what (I think) you want.

On Thursday, May 5, 2016 at 9:48:42 AM UTC-4, miguelfigue...@gmail.com wrote:
> Hi,
>
> I am currently working with two fits files but with different coordinates system.
> One is the FK4 (B1950) and the other is FK5 (J2000) and I would like to know if there is a procedure in IDL to convert from one to another.
> I have found the (j/b)precess but it works for only for one position and hprecess converts only the equinox in the FK5 system.
>
> I prefer IDL but if you know something in Python, it would be great.
>
> Thanks for your help.
>
> Miguel
Re: Tool for converting FK4/FK5 [message #93173 is a reply to message #93168] Thu, 05 May 2016 16:27 Go to previous message
Miguel is currently offline  Miguel
Messages: 18
Registered: April 2015
Junior Member
So my 1950-fits is well converted to fk5-fits using hprecess ?
That's what I used but I noted that there is a slight difference between the converted file and a another fits representing the same region and already in the fk5 system.

Does a different projection (RA--SIN for one, RA--GLS for the other) could lead to this difference ?

Miguel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: checking a special character in a single string
Next Topic: Orthographic projection using parametrized ellipsoid

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:14:56 PDT 2025

Total time taken to generate the page: 0.00389 seconds