Hi Jane,
You should be able to use KAPPA:MATHS for this. Maths
allows you to create an NDF using an arbitrary algebraic combination
of the data, variance or coordinate values from other NDFs. However
it's a bit out of date in that it has not been updated to use the
modern WCS system - it still uses the old AXIS system. So the first
thing you need to do is to create an AXIS structure describing the
velocity information in the WCS component:
% setaxis fred dim=3 mode=wcs
(assuming your velocity axis is axis 3). Then you run maths:
% maths exp='ia*cc+(ca+cb)*0' ia=fred out=fred2
The EXP parameter gives the algebraic expression to be stored in the
output NDF. In this expression, the "ia" token represents the data
value in the NDF associated with parameter "ia" (e.g. fred.sdf in this
case), and the "c*" tokens represent the coordinate values. The
alphabetically earliest "c*" token in the expression represents the
coordinate on the first axis, etc. This is why you need to include
"ca" and "cb" in the expression, as otherwise "cc" would be the
alphabetically earliest "c*" token in the expression and so would give
the coordinate value on the first axis, rather than the required third
axis. "ca" and "cb" are multiplied by zero in the expression so that
they do not affect the values stored in the output NDF.
A bit convoluted I know. It would have been simpler for the meaning of
each "c*" token to be fixed - ca for the first axis, cb for the second
etc. But it's history now...
David
On 20 August 2010 14:08, Jane Buckle <[log in to unmask]> wrote:
> Hi All,
>
> The help for kappa collapse with estimator iwc states "Iwc" --
> Intensity-weighted co-ordinate, being the sum of each value times its
> co-ordinate, all divided by the integrated value (see the "Integ" option).
>
> How does it do this? I would like to create a 3D cube, the same size as my
> original cube, but whose data values are the intensity multiplied by the
> velocity coordinate for each velocity channel.
>
> So, basically I would like each value times its coordinate, without any
> summing. This may well be a simple task, but the method is currently
> escaping me.
>
> cheers,
>
> Jane
> --
> Dr Jane V. Buckle
> Cavendish Astrophysics Group and Kavli Institute for Cosmology,
> Institute of Astronomy, University of Cambridge, Madingley Road, Cambridge
> CB3 0HE
> Tel: +44 (0)1223 746436
>
|