public class PixSampler
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
PixSampler.StatMode |
Defines how statistics are to be acquired from a pixel or set of pixels.
|
Modifier and Type | Field | Description |
---|---|---|
static PixSampler.StatMode |
MEAN_MODE |
StatMode for taking an average.
|
static PixSampler.StatMode |
POINT_MODE |
StatMode for making point samples.
|
Constructor | Description |
---|---|
PixSampler(uk.ac.starlink.table.StarTable pixTable,
long nside,
boolean nested) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
static PixSampler |
createPixSampler(uk.ac.starlink.table.StarTable pixTable) |
Constructs a PixSampler from a given table.
|
uk.ac.starlink.table.ColumnInfo[] |
getValueInfos(PixSampler.StatMode statMode) |
Returns the metadata for the columns output by the sampler.
|
static java.lang.Boolean |
inferNested(uk.ac.starlink.table.StarTable pixTable) |
Tries to work out whether a given table uses the nested or ring
HEALPix ordering scheme.
|
static int |
inferNside(uk.ac.starlink.table.StarTable pixTable) |
Tries to work out the HEALPix nside parameter for a pixel data table.
|
java.lang.Object |
sampleValue(int icol,
double alphaDeg,
double deltaDeg,
double radiusDeg,
PixSampler.StatMode statMode) |
Samples a single value from a given sky position.
|
java.lang.Object[] |
sampleValues(double alphaDeg,
double deltaDeg,
double radiusDeg,
PixSampler.StatMode statMode) |
Samples values from all columns in given table at a given sky position.
|
public static final PixSampler.StatMode POINT_MODE
public static final PixSampler.StatMode MEAN_MODE
public PixSampler(uk.ac.starlink.table.StarTable pixTable, long nside, boolean nested) throws java.io.IOException
pixTable
- random access HEALPix-format table
(one row per pixel)nside
- HEALPix nside valuenested
- true for nested pixel order, false for ringjava.io.IOException
- if the table has the wrong number of rows
or is not random accesspublic java.lang.Object sampleValue(int icol, double alphaDeg, double deltaDeg, double radiusDeg, PixSampler.StatMode statMode) throws java.io.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 statisticsjava.io.IOException
public java.lang.Object[] sampleValues(double alphaDeg, double deltaDeg, double radiusDeg, PixSampler.StatMode statMode) throws java.io.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 statisticsjava.io.IOException
public uk.ac.starlink.table.ColumnInfo[] getValueInfos(PixSampler.StatMode statMode)
statMode
- mode for sampling statisticspublic static PixSampler createPixSampler(uk.ac.starlink.table.StarTable pixTable) throws java.io.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 pixelsjava.io.IOException
- if table is not random access or does not
appear to contain HEALPix datapublic static java.lang.Boolean inferNested(uk.ac.starlink.table.StarTable pixTable)
pixTable
- pixel data tablepublic static int inferNside(uk.ac.starlink.table.StarTable pixTable) throws java.io.IOException
pixTable
- pixel data tablejava.io.IOException
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.