|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.task.PixSampler
public class PixSampler
Interrogates a HEALPix all-sky map to sample pixel data. The map is supplied in the form of a table (one row per pixel, using HEALPix pixel indices), as used for instance by LAMBDA.
Nested Class Summary | |
---|---|
static interface |
PixSampler.StatMode
Defines how statistics are to be acquired from a pixel or set of pixels. |
Field Summary | |
---|---|
static PixSampler.StatMode |
MEAN_MODE
StatMode for taking an average. |
static PixSampler.StatMode |
POINT_MODE
StatMode for making point samples. |
Constructor Summary | |
---|---|
PixSampler(StarTable pixTable,
long nside,
boolean nested)
Constructor. |
Method Summary | |
---|---|
static PixSampler |
createPixSampler(StarTable pixTable)
Constructs a PixSampler from a given table. |
ColumnInfo[] |
getValueInfos(PixSampler.StatMode statMode)
Returns the metadata for the columns output by the sampler. |
static Boolean |
inferNested(StarTable pixTable)
Tries to work out whether a given table uses the nested or ring HEALPix ordering scheme. |
static int |
inferNside(StarTable pixTable)
Tries to work out the HEALPix nside parameter for a pixel data table. |
Object |
sampleValue(int icol,
double alphaDeg,
double deltaDeg,
double radiusDeg,
PixSampler.StatMode statMode)
Samples a single value from a given sky position. |
Object[] |
sampleValues(double alphaDeg,
double deltaDeg,
double radiusDeg,
PixSampler.StatMode statMode)
Samples values from all columns in given table at a given sky position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PixSampler.StatMode POINT_MODE
public static final PixSampler.StatMode MEAN_MODE
Constructor Detail |
---|
public PixSampler(StarTable pixTable, long nside, boolean nested) throws IOException
pixTable
- random access HEALPix-format table
(one row per pixel)nside
- HEALPix nside valuenested
- true for nested pixel order, false for ring
IOException
- if the table has the wrong number of rows
or is not random accessMethod Detail |
---|
public Object sampleValue(int icol, double alphaDeg, double deltaDeg, double radiusDeg, PixSampler.StatMode statMode) throws IOException
icol
- column index of value to samplealphaDeg
- longitude position in degreesdeltaDeg
- latitude position in degreesradiusDeg
- radius of disc over which statistics will be
gathered (ignored for point-like statMode)statMode
- mode for sampling statistics
IOException
public Object[] sampleValues(double alphaDeg, double deltaDeg, double radiusDeg, PixSampler.StatMode statMode) throws IOException
alphaDeg
- longitude position in degreesdeltaDeg
- latitude position in degreesradiusDeg
- radius of disc over which statistics will be
gathered (ignored for point-like statMode)statMode
- mode for sampling statistics
IOException
public ColumnInfo[] getValueInfos(PixSampler.StatMode statMode)
statMode
- mode for sampling statistics
public static PixSampler createPixSampler(StarTable pixTable) throws IOException
I don't know of any proper reference for encoding of HEALPix maps
in FITS files, but the documentation for the HPIC package
(http://cmb.phys.cwru.edu/hpic/)
has a useful list of heuristics (manual section 2.10.1).
One of these acknowledges the fact that some HEALPix FITS files
have columns which are 1024-element arrays
(TFORMn = '1024E'
). This routine does not currently
support this rather perverse convention. If somebody requests it,
maybe I'll consider implementing it.
pixTable
- random access table containing HEALPix pixels
IOException
- if table is not random access or does not
appear to contain HEALPix datapublic static Boolean inferNested(StarTable pixTable)
pixTable
- pixel data table
public static int inferNside(StarTable pixTable) throws IOException
pixTable
- pixel data table
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |