2010/1/21 Matthijs H.D. van der Wiel <[log in to unmask]>:
> Hi,
>
>>
>> On Wed, Jan 20, 2010 at 01:13:30PM +0000, David Berry wrote:
>>>
>>> An ARD file such as:
>>>
>>> dimension(1)
>>> coframe(spectrum,system=freq,unit=GHz,StdOfRest=lsr)
>>> box(345,0.02)
>>> box(345.4,0.02)
>>> box(345.6,0.02)
>>> box(346.4,0.02)
>
> Ah, I wasn't aware you could change coordinate systems for ard files.
> Here I am masking bad parts from time series with ard masks that you
> like this:
>
> dimension(3)
> coframe(pixel)
> box(0,11.0,8,99999,1,16) # R11/R12 timeseries 1-16
> box(195,11.0,0,390,1,99999) # R11/R12 above +100 km/s
> box(100,6.5,0,200,1,99999) # R07 above +260 km/s
> box(250,7.5,0,500,1,99999) # R08 above +0 km/s
>
>
> Let's say I would want to change the frequency unit to km/s instead of
> channel number, where should I put the "unit=" tag, given that my ard
> descriptions are 3-dimensional?
It's harder for a coordinate system containing a mix of different
types of axes like yours. At the moment, the COFRAME statement can
only be used to describe simple 1D coordinate systems, or 2D celestial
coordinate systems. Note, the kappa:ardmask command in the new Hawaiki
release will adapt a 1D ARD description automatically for use with a
3D data cube.
One could imagine a syntax where multiple COFRAME statements could be
used to describe a compound frame, but at the moment ARD does not do
that.
So instead of "COFRAME" you will need to use "WCS" - the syntax is
much harder though since the WCS statement requires a complete dump of
an AST FrameSet describing the known coordinate systems (in your case
just the one compound 3D coordinate system). In your case, something
like this should work:
dimension(3)
wcs(<!!
Begin FrameSet
IsA Frame
Nframe = 1
Frm1 =
Begin CmpFrame
IsA Frame
FrameA =
Begin SpecFrame
Naxes = 1
System = "VRAD"
AlSys = "VRAD"
Ax1 =
Begin Axis
Unit = "km/s"
End Axis
IsA Frame
UVrad = "km/s"
End SpecFrame
FrameB =
Begin Frame
Naxes = 2
Domain = "PIXEL"
Ax1 =
Begin Axis
End Axis
Ax2 =
Begin Axis
End Axis
End Frame
End CmpFrame
End FrameSet
!!>)
box(0,11.0,8,99999,1,16) # R11/R12 timeseries 1-16
box(195,11.0,0,390,1,99999) # R11/R12 above +100 km/s
box(100,6.5,0,200,1,99999) # R07 above +260 km/s
box(250,7.5,0,500,1,99999) # R08 above +0 km/s
That is, a FrameSet containing a s single compound frame (CmpFrame),
which in turn contains a radio velocity axis (SpecFrame) and 2 pixel
axes (Frame with Domain=PIXEL).
Sorry it's not easier!
David
|