[Casa-framework] 'pix' unit (was ia.moments)
David King
dking at nrao.edu
Tue Dec 5 14:12:53 EST 2006
Just a tiny additional note on "pix" units, (which I am stumbling through at
the moment):
As Wim indicates, "pix" isn't a valid unit string until you define it to be.
A one-shot (and static) routine WCBox::unitInit() is WCBox's way of
accomplishing that, so that "pix" Units can be used subsequently in such
regions (or anywhere else); it is called in all the WCBox constructors.
(WCPoly has a similar routine. I believe the WCRegion classes most actively
support "pix" and essentially define its semantics).
Unfortunately, defining "pix" in the WCBox constructors is not quite soon
enough, if you want to pass "pix" Quanta _to_ those constructors;
furthermore, unitInit() is private. As a workaround:
WCBox dummy;
...will do the trick. But I think making unitInit() public is slightly
cleaner, and could do no conceivable harm. Any opinion, Ger (or others)?
dk
>> Lindsey Davis wrote:
>> I am trying to use the moments task on an image whose shape is
>>
>> [256L, 256L, 1L, 31L]
>>
>> I tried both
>>
>> rtn = ia.moments([0],3)
>> rtn = ia.moments([0],4)
>>
>> because I am not sure how degenerate axes are handled but
>> both give the following error
>>
>> ed Nov 29 22:46:54 2006 SEVERE image::moments:
>> Exception Reported: Unit::check Illegal unit string 'pix'
Wim.Brouw at csiro.au wrote:
> During the images production Neil wanted to be able to let the user
> specify things like 'pix' 'piel' 'beam' etc.
> The quanta can handle that (like it does in the case of FITS where
> things lik Km KM JY sec SEC etc are used) by having a user unit 'map'
> that can be filled at will. (pix e.g. is equanled to the countable non
> dimensional unit '_').
> In the original design this user map was a global static map; i.e. there
> should be persistence soemwhere).
More information about the Casa-framework
mailing list