Package uk.ac.starlink.table.join

# Class HtmSkyPixellator

java.lang.Object
uk.ac.starlink.table.join.HtmSkyPixellator

All Implemented Interfaces:
  `SkyPixellator`

public class HtmSkyPixellator extends Object implements SkyPixellator
Implements sky pixellisation using the HTM (Hierarchical Triangular Mesh) indexing scheme.

Note that the `HealpixSkyPixellator` implementation normally gives much faster matching than this and should generally be used in preference.

Author:
  Mark Taylor (Starlink)
See Also:
  - http://www.skyserver.org/htm/doc/java/index.html

## Constructor Summary

Constructors
Constructor
Description
`HtmSkyPixellator()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`int`
`calculateDefaultLevel(double scale)`
Determines a default value to use for the level paramer based on a given scale.
`Supplier<FixedRadiusConePixer>`
`createFixedRadiusPixerFactory(double radius)`
Returns a factory for fixed radius pixel calculators based on the current settings of this object.
`Supplier<VariableRadiusConePixer>`
`createVariableRadiusPixerFactory()`
Returns a factory for variable radius pixel calculators based on the current settings of this object.
`int`
`getLevel()`
Returns the HTM level, which determines sky pixel size.
`double`
`getScale()`
Returns the most recently set angular scale.
`uk.ac.starlink.table.DescribedValue`
`getTuningParameter()`
Returns a parameter whose value may be adjusted to alter the pixellisation scale.
`void`
`setLevel(int level)`
Sets the HTM level value, which determines sky pixel size.
`void`
`setScale(double scale)`
Sets the characteristic angular scale for this pixellator.

### Methods inherited from class java.lang.Object

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

## Constructor Details

### HtmSkyPixellator

public HtmSkyPixellator()
Constructor.

## Method Details

### setScale

public void setScale(double scale)
Description copied from interface: `SkyPixellator`
Sets the characteristic angular scale for this pixellator. Pixels should be approximately the size given, so that a larger scale corresponds to larger pixel sizes. The details of pixel size are determined by the details of the pixellation scheme however.

Specified by:
  `setScale` in interface `SkyPixellator`
Parameters:
  `scale` - pixel length scale in radians

### getScale

public double getScale()
Description copied from interface: `SkyPixellator`
Returns the most recently set angular scale.

Specified by:
  `getScale` in interface `SkyPixellator`
Returns:
  pixel length scale in radians

### getTuningParameter

public uk.ac.starlink.table.DescribedValue getTuningParameter()
Description copied from interface: `SkyPixellator`
Returns a parameter whose value may be adjusted to alter the pixellisation scale. This is not necessarily the same as the scale attribute (its value need not be an angle).

Specified by:
  `getTuningParameter` in interface `SkyPixellator`
Returns:
  tuning parameter

### createVariableRadiusPixerFactory

public Supplier<VariableRadiusConePixer> createVariableRadiusPixerFactory()
Description copied from interface: `SkyPixellator`
Returns a factory for variable radius pixel calculators based on the current settings of this object.

Specified by:
  `createVariableRadiusPixerFactory` in interface `SkyPixellator`
Returns:
  immutable factory for pixel calculators; subsequent changes to this object will not affect the objects it supplies

### createFixedRadiusPixerFactory

public Supplier<FixedRadiusConePixer> createFixedRadiusPixerFactory(double radius)
Description copied from interface: `SkyPixellator`
Returns a factory for fixed radius pixel calculators based on the current settings of this object.

Specified by:
  `createFixedRadiusPixerFactory` in interface `SkyPixellator`
Parameters:
  `radius` - cone radius in radians
Returns:
  immutable factory for pixel calculators; subsequent changes to this object will not affect the objects it supplies

### setLevel

public void setLevel(int level)
Sets the HTM level value, which determines sky pixel size. May be in the range 0 (90deg) to 24 (0.01"). If set to -1, a suitable value will be used based on the scale.

Parameters:
  `level` - new level value

### getLevel

public int getLevel()
Returns the HTM level, which determines sky pixel size. The returned value may be the result of a default determination based on scale if no explicit level has been set hitherto, and a non-zero scale is available.

Returns:
  level level value used by this engine

### calculateDefaultLevel

public int calculateDefaultLevel(double scale)
Determines a default value to use for the level paramer based on a given scale.

Parameters:
  `scale` - sky distance scale angle, in radians