# Class PixSample

java.lang.Object
uk.ac.starlink.ttools.task.ConsumerTask
uk.ac.starlink.ttools.task.MapperTask
uk.ac.starlink.ttools.task.PixSample

All Implemented Interfaces:
  `uk.ac.starlink.task.Task`

public class PixSample extends MapperTask
Samples data from a HEALPix pixel file.

Since:
  6 Dec 2011
Author:
  Mark Taylor

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`PixSample.CoordReader`
Interface to turn input coordinate values into coordinate values suitable for pixel sampling.

## Constructor Summary

Constructors
Constructor
Description
`PixSample()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static PixSample.CoordReader`
`createCoordReader(SkySystem inSys, SkySystem outSys)`
Returns a coordinate reader which converts between a given input and output coordinate system.
`static ColumnSupplement`
`createSampleSupplement(uk.ac.starlink.table.StarTable base, PixSampler pixSampler, PixSampler.StatMode statMode, PixSample.CoordReader coordReader, String lonExpr, String latExpr, String radExpr)`
Creates a table containing pixel samples corresponding to the rows of a base table in accordance with supplied parameters.

### Methods inherited from class MapperTask

`createProducer, getMapper, getTablesInput`

### Methods inherited from class ConsumerTask

`createExecutable, createProducer, getIdentity, getOutputMode, getParameterList, getParameters, getPurpose`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PixSample

public PixSample()
Constructor.

## Method Details

### createSampleSupplement

public static ColumnSupplement createSampleSupplement(uk.ac.starlink.table.StarTable base, PixSampler pixSampler, PixSampler.StatMode statMode, PixSample.CoordReader coordReader, String lonExpr, String latExpr, String radExpr) throws IOException
Creates a table containing pixel samples corresponding to the rows of a base table in accordance with supplied parameters.

Parameters:
  `base` - base table
  `pixSampler` - characterises pixel sampling
  `coordReader` - turns input coordinate pairs into lon/lat coords in the HEALPix coordinate system
  `lonExpr` - JEL expression for first input coordinate
  `latExpr` - JEL expression for second input coordinate
  `radExpr` - JEL expression for averaging radius
Returns:
  table containing sampled columns
Throws:
  `IOException`

### createCoordReader

public static PixSample.CoordReader createCoordReader(SkySystem inSys, SkySystem outSys)
Returns a coordinate reader which converts between a given input and output coordinate system. If no conversion is required, use `null` for in/out systems.

Parameters:
  `inSys` - input sky coordinate system
  `outSys` - output sky coordinate system
Returns:
  coordinate reader that converts