> CALL NDF_AMAP(SPECT,'Cent',1,'_REAL','READ',AX1PTR,NELM,STATUS)
>
> Enables me to use the axis(1) data array values in a subroutine where the
> mapped elements are the correct values.
>
> However,
>
> CALL NDF_CREAT('OUTPT','_REAL',1,LBND,UBND,OUTPT,STATUS)
> CALL NDF_MAP(OUTPT,'DATA','_REAL','WRITE',OUTPTR,NSPEC,STATUS)
> CALL NDF_AMAP(OUTPT,'Cent',1,'_REAL','WRITE',AX1PTR,NELM,STATUS)
AX1PTR is returned. It is not the AX1PTR you had for the input NDF.
You need a second pointer here, say OAXPTR, and then use a copy routine
(KPG1_COPY perhaps) to transfer the centre co-ordinates from the AX1PTR
pointer's array to the one pointed at by OAXPTR.
There is a simpler route. NDF_PROP creates an output NDF based closely
on a nominated NDF. This is especially convenient if you are just
changing the DATA and VARIANCE components. The second argument is a
list of components to transfer to the output NDF. Some things are
defaulted to be copied such as HISTORY and extensions, but not the AXIS
component.
CALL NDF_PROP( SPECT, 'Axis', 'OUTPT', OUTPT, STATUS )
Malcolm
|