tcube
: Calculates N-dimensional histograms
tcube
constructs an N-dimensional histogram, or density map,
from N columns of an input table, and writes it out as an
N-dimensional data cube. The parameters you supply define which N
numeric columns of the input table you want to use and the dimensions
(bounds and pixel sizes) of the output grid,
as well as any weighting to be applied to each point and how
the weighted quantities in a single bin are to be aggregated together.
Each table row then defines a point in N-dimensional space.
The program goes through each row, and if the point that row
defines falls within the bounds of the output grid you have defined,
associates the weight value with the relevant pixel in the output grid.
When all the input values have been processed, the weights in each
pixel are aggregated according to the requested combination method.
The resulting N-dimensional array, whose pixel values represent an aggregation of the rows associated with that region of the N-dimensional space, is then written out as a FITS file. In one dimension, this gives you a normal histogram of a given variable. In two dimensions it might typically be used to plot the density or weighted density on the sky of objects from a catalogue.
As with some of the other generic table commands,
you can perform extensive pre-processing on the input table by
use of the icmd
parameter before the actual cube
counts are calculated.
See also tgridmap
,
which does a similar job to this command but writes the output
in table format.