Hi Tim.
No, you weren't misunderstanding the problem, I didn't realise that
you could supply WCS or spectral coords in stats or NDFcopy.
That does exactly what I wanted. Thanks.
Dave
On Thu, Mar 26, 2009 at 4:50 PM, Tim Jenness <[log in to unmask]> wrote:
> I may be misunderstanding the problem but a while back (2 or 3 releases
> ago?) NDF sections were modified to accept world coordinates. So in
> something like ndfcopy or stats you can just give an explicit NDF section
> with the velocity you are interested in. Stats for example will then put the
> corresponding PIXEL coordinate in one of its output parameters.
>
> Does that help?
>
> Tim
>
> On Thu, Mar 26, 2009 at 2:25 AM, David Nutter <[log in to unmask]>
> wrote:
>>
>> Hi all.
>>
>> I am trying to use wcstran to find the index of a 3D data cube that
>> corresponds to a particular velocity/frequency. I can do this in
>> reverse, and convert the array index (in this case 2185) to a velocity
>> (VRAD) using:
>>
>> wcstran a20080301_00042_01_0001 framein=axis posin=\"2185,5,5\"
>> frameout=DSBSPECTRUM-SPACEINDEX-TIME
>>
>> a1 = 2185.0 a2 = 5.0 a3 = 5.0 --> VRAD = -0.4973992 x2 = 5.5
>> MJD = 2008-03-01 07:41:24
>>
>> However, I cannot get the grammar quite right for the other way. e.g.
>>
>> wcstran a20080301_00042_01_0001 framein=DSBSPECTRUM-SPACEINDEX-TIME
>> frameout=pixel posin=\"-0.4973992,5.5,2008-03-01 07:41:24\"
>>
>> !! Extra characters ' 07:41:24' found at end of date/time value supplied
>> for
>> ! parameter POSIN - '-0.4973992 5.5 2008-03-01 07:41:24'.
>> Please supply a new DSBSPECTRUM-SPACEINDEX-TIME Domain position for
>> parameter POSIN.
>> POSIN - Position to be transformed /'-0.4973992,5.5,2008-03-01 07:41:24'/
>> >
>>
>> The error seems to revolve around the format of the TIME coord (which
>> is especially annoying, because I don't care what the time was, it
>> makes no difference)
>>
>> If anyone could tell me how to resolve this, or suggest an alternative
>> way of getting the index of a given velocity/frequency, I would be V.
>> grateful for the info.
>>
>> Thanks
>>
>> Dave Nutter
>
>
|