Peter,
Funnily enough, the bug demonstrated by your "hdsbug" program is
unrelated to the bug that causes the error reports from wcsalign. The
fact that they are both to do with problems converting from primitive to
simple arrays is pure coincidence. They were both caused by ARY and I have
now committed fixes for them to the main branch and keoe. Obviously, any
further testing that can be done would help me sleep at night...
David
On Thu, 31 Aug 2006, Peter W. Draper wrote:
> On Thu, 31 Aug 2006, Peter W. Draper wrote:
>
> > Looking at the content of the two files in use here, I suspect the problem
> > is related to the transformation of a primitive NDF data component into
> > simple form, which presumably erases the existing, propagated data
> > component, and shifts it to the end of the container file, which then
> > makes accessing other components in the file break in interesting ways,
> > depending on the application.
>
> Looked at this idea a big more and produced a simple test program:
>
> SUBROUTINE HDSBUG( STATUS )
>
> IMPLICIT NONE
> INCLUDE 'SAE_PAR'
>
> INTEGER STATUS
> INTEGER INDF1
> INTEGER INDF2
> INTEGER ORIGINS( 2 )
>
> CALL NDF_BEGIN
>
> CALL NDF_ASSOC( 'IN', 'READ', INDF1, STATUS )
> CALL NDF_PROP( INDF1, 'NODATA', 'OUT', INDF2, STATUS )
>
> ORIGINS( 1 ) = 1
> ORIGINS( 2 ) = 2
> CALL NDF_SHIFT( 2, ORIGINS, INDF2, STATUS )
>
> CALL NDF_END( STATUS )
>
> END
>
> which says:
>
> % ./hdsbug in=$PISA_DIR/frame out=temp
> !! DAT_RENAM: Error changing the name of an HDS object.
> ! Unable to perform implicit conversion from 'PRIMITIVE' to 'SIMPLE' array
> ! storage form.
> ! ARY_SHIFT: Error applying pixel-index shifts to an array.
> ! NDF_SHIFT: Error applying pixel-index shifts to an NDF.
> ! Application exit status DAT__COMEX, Component already exists
> ! in=/export/pwda/pdraper/starlink_cvs/build/bin/pisa/frame out=temp2
>
>
> and hdstrace:
>
> % hdstrace temp
>
> TEMP <NDF>
>
> DATA_ARRAY <ARRAY> {structure}
> VARIANT <_CHAR*9> 'PRIMITIVE'
>
> TITLE <_CHAR*12> 'KAPPA - Cadd'
> WCS <WCS> {structure}
> DATA(49) <_CHAR*32> ' Begin FrameSet',' Nframe = 3',' Cu...'
> ... ' ...',' End UnitMap',' End FrameSet'
>
> End of Trace.
>
>
> David,
>
> any chance this is actually related to those NDF changes you made to not
> reserve space for unpropagated data components? If I change 'NODATA' to
> 'DATA' in the above the problem goes away.
>
> Cheers,
>
> Peter.
>
|