Hi Malcolm, David,
Thanks once again for your help. NDF_PROP was indeed the quickest/easiest route to success!
Centre for Astrophysics Research,
Science & Technology Research Institute
University of Hertfordshire,
College Lane, Hatfield.
Herts AL10 9AB. UK
Tel: 01707 285162
From: Starlink development [[log in to unmask]] On Behalf Of Malcolm J. Currie [[log in to unmask]]
Sent: 15 October 2010 15:02
To: [log in to unmask]
Subject: Re: NDF_AMAP
> 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.
> 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
CALL NDF_PROP( SPECT, 'Axis', 'OUTPT', OUTPT, STATUS )