Package skyview.geometry.projecter

# Class Toa

java.lang.Object
skyview.geometry.Transformer
skyview.geometry.Projecter
skyview.geometry.projecter.Toa

All Implemented Interfaces:
  `Serializable`, `Component`

public class Toa extends Projecter
This class provides for the translation between coordinates and an HTM-based projection.

The projection is centered at the north pole. The south pole is projected to the four corners at (+/-1, +/-1). The equator projects to the diagonals running between the points (-1,0)->(0,1), (0,1)->(1,0), (1,0)->(0,-1), (-1,0)->(0,-1). These diagonals divide the four unit squares at the center of the coordinate grid into 8 right isoceles triangles.

The position 0,0 projects to 0,1 while the position 90,0 projects to 1,0. Note that in an astronomical projection the coordinates will normally have the X axis inverted, so that 0,0 will project to -1,0.

The 8 triangles correspond to the 8 initial triangles of the HTM decomposition of the sphere. The projection is defined such that the subtriangles in the HTM decomposition are mapped to isoceles right-triangles in the projection plane.

This call may be called in the same fashion as standard projections or it may be called to create a tile space. In this case the object immediately computes the coordinates corresponding to all pixels in a tile and later returns these as requested.

The tiles are numbered with tile 0,0 as the top, left tile. The vertical orientation of the tiles is therefore the opposite of the orientation of the pixel values within the tiles and within the FITS files generated. Note that when SkyView generates quicklook images it flips the Y-axis to accommodate the difference between the astronomical and imaging conventions.

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`Toa.ToaDeproj`
Deproject from the ToastPlane back to the unit sphere

## Constructor Summary

Constructors
Constructor
Description
`Toa()`

## Method Summary

Modifier and Type
Method
Description
`double[]`
`find(double lon, double lat)`
`String`
`getDescription()`
Get the description of this component.
`String`
`getName()`
Get the name of this component.
`Deprojecter`
`inverse()`
Get the inverse
`boolean`
`isInverse(Transformer obj)`
Are these two transformations, inverses of each other? This method is used to optimize a series of transformations where transformations.
`static void`
`main(String[] args)`
`double[]`
`project(double lon, double lat)`
Calculate the x,y corresponding to a given lon/lat
`void`
`setPrecision(double epsilon, double minDelta)`
Specify precision used in non-grid project/deproject calculations
`double[]`
`shadowPoint(double x, double y)`
Return a shadowpoint for the input location.
`static void`
`show(String prefix, double[] vector)`
`boolean`
`straddle(double[][] vertices)`
Does this pixel go wrap around the standard region of the image? E.g., does it straddle the 180 deg in a Car or Ait projection?
`boolean`
`straddleable()`
Is it possible for a pixel to straddle the valid region.
`double[][][]`
`straddleComponents(double[][] vertices)`
If this is a straddling pixel, then return the straddle components
`double[][][]`
`tile(int level, int ix, int iy, int subdiv)`
`void`
`transform(double[] unit, double[] plane)`
Convert a single point where the output vector is supplied.
`boolean`
`validPosition(double[] plane)`
Is this a valid position in the projection plane for this image.

### Methods inherited from class skyview.geometry.Projecter

`allValid, getInputDimension, getOutputDimension, getXTiling, getYTiling, tissot`

### Methods inherited from class skyview.geometry.Transformer

`transform, transform`

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

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

## Constructor Details

### Toa

public Toa()

## Method Details

### validPosition

public boolean validPosition(double[] plane)
Description copied from class: `Projecter`
Is this a valid position in the projection plane for this image. This default is appropriate for all projections where the projection plane is infinite.

Overrides:
  `validPosition` in class `Projecter`

### setPrecision

public void setPrecision(double epsilon, double minDelta)
Specify precision used in non-grid project/deproject calculations

### project

public double[] project(double lon, double lat)
Calculate the x,y corresponding to a given lon/lat

Parameters:
  `lon` - The longitude in radians.
  `lat` - The latitude in radians.
Returns:
  A pair of coordinates in the projection plane where there coordinates are in the range [-1,1].

### find

public double[] find(double lon, double lat)

### getName

public String getName()
Description copied from interface: `Component`
Get the name of this component.

### getDescription

public String getDescription()
Description copied from interface: `Component`
Get the description of this component.

### isInverse

public boolean isInverse(Transformer obj)
Description copied from class: `Transformer`
Are these two transformations, inverses of each other? This method is used to optimize a series of transformations where transformations.

Specified by:
  `isInverse` in class `Transformer`

### inverse

public Deprojecter inverse()
Description copied from class: `Projecter`
Get the inverse

Specified by:
  `inverse` in class `Projecter`

### transform

public void transform(double[] unit, double[] plane)
Description copied from class: `Transformer`
Convert a single point where the output vector is supplied.

Specified by:
  `transform` in class `Transformer`
Parameters:
  `unit` - The input vector.
  `plane` - The output vector, it may be the same as the input vector if the dimensionalities are the same. All transformers are expected to work with aliased inputs and output.

### tile

public double[][][] tile(int level, int ix, int iy, int subdiv)

### show

public static void show(String prefix, double[] vector)

### main

public static void main(String[] args) throws Exception

Throws:
  `Exception`

### straddleable

public boolean straddleable()
Description copied from class: `Projecter`
Is it possible for a pixel to straddle the valid region.

Overrides:
  `straddleable` in class `Projecter`

### shadowPoint

public double[] shadowPoint(double x, double y)
Description copied from class: `Projecter`
Return a shadowpoint for the input location. Shadowpoints are not defined for all projections.

Overrides:
  `shadowPoint` in class `Projecter`

### straddle

public boolean straddle(double[][] vertices)
Description copied from class: `Projecter`
Does this pixel go wrap around the standard region of the image? E.g., does it straddle the 180 deg in a Car or Ait projection?

Overrides:
  `straddle` in class `Projecter`

### straddleComponents

public double[][][] straddleComponents(double[][] vertices)
Description copied from class: `Projecter`
If this is a straddling pixel, then return the straddle components

Overrides:
  `straddleComponents` in class `Projecter`