[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
zonal means, selective TOTAL(), etc.
- Subject: zonal means, selective TOTAL(), etc.
- From: Craig Markwardt <craigmnet(at)astrog.physics.wisc.edu>
- Date: 18 Mar 1998 15:46:26 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: U. Wisc. Madison Physics -- Compact Objects
- References: <350D4D83.41C6@io.harvard.edu> <350D75D3.476CE10D@icm.csic.es><350F9E15.19920F84@gsf.de>
- Reply-To: craigmnet(at)astrog.physics.wisc.edu
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:10427
I have also had the need for totalling over selective dimensions
(sometimes more than one dimension), and also MIN/MAX.
Check out my IDL web page for CMAPPLY(), which can apply quite a
number of operations to selected dimensions of an array. You can do
this to more than one dimension at a time using a *list* of dimensions
(similar to the DIMENSIONS parameter to MAKE_ARRAY or to REFORM).
http://astrog.physics.wisc.edu/~craigm/idl/idl.html
CMAPPLY supports more than just addition; it does:
'+' addition '*' multiplication
'AND' logical AND 'OR' logical OR
'MAX' maximum 'MIN' minimum
Where possible I avoid loops to improve performance, but your mileage
may vary depending on the detailed use. [ For example, for small
arrays, your own loop may be faster ].
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------