On Thu, 23 Oct 2008, David Berry wrote:
>> The problem seems to come down to the old issue of verifying that the
>> system and units of a SpecFrame are consistent. Nothing seems to work
>> anymore, like trying to find a SpecFrame (what I seem to do), or
>> reconstructing a SpecFrame with the full attributes (like in
>> DIPSO:rdndf.f):
>>
>> % atools
>> % astspecframe options='"system=wave,unit=Hz"' result=specframe.ast
>>
>> Got a good way to check that a SpecFrame is valid?
>>
>> Peter.
>>
>
> When you say "Nothing seems to work anymore," do you mean that you've
> seen some change in behaviour? If so, what and when?
Well, there's code in SPLAT that I clearly wrote to do just this job (back
in 2004), that is no longer working. The atools test above is the
command-line version of what DIPSO uses to do a similar job, that clearly
runs without an error, so I expect the same is true of the DIPSO code
(looks like vintage 2003)
I have a vague recollection of you saying something in this area had
changed a good while back, so I'm working on the hypothesis that this code
needed fixing anyway -- so don't worry since we seem to have a new test,
which is working.
> One way of testing for bad units/system is the following:
>
> AstFrame *f1 = astCopy( specframe );
> astClear( f1, "Unit" );
> if( astOK ) {
> AstFrameSet *fs = astConvert( f1, specframe, "" );
> if( astStatus == AST__BADUN ) {
> bad units!!!
> }
> }
>
>
> David
>
--
Peter W. Draper, http://astro.dur.ac.uk/~pdraper
|