Skip to content
Back to top
View this page

# API

## gwcs.wcs Package

### Classes

`WCS`([forward_transform, input_frame, ...]) | Basic WCS class.
`GwcsBoundingBoxWarning` | A warning class to report issues with bounding boxes in GWCS.
`NoConvergence`(*args[, best_solution, ...]) | An error class used to report non-convergence and/or divergence of numerical methods.
`Step`(frame[, transform]) | Represents a `step` in the WCS pipeline.

### Class Inheritance Diagram

digraph inheritanceff467ae7dd { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BaseHighLevelWCS" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Abstract base class for the high-level WCS interface."]; "BaseLowLevelWCS" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Abstract base class for the low-level WCS interface."]; "GWCSAPIMixin" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A mix-in class that is intended to be inherited by the"]; "BaseLowLevelWCS" -> "GWCSAPIMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HighLevelWCSMixin" -> "GWCSAPIMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GwcsBoundingBoxWarning" [URL="../api/gwcs.wcs.GwcsBoundingBoxWarning.html#gwcs.wcs.GwcsBoundingBoxWarning",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A warning class to report issues with bounding boxes in GWCS."]; "HighLevelWCSMixin" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Mix-in class that automatically provides the high-level WCS API for the"]; "BaseHighLevelWCS" -> "HighLevelWCSMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NoConvergence" [URL="../api/gwcs.wcs.NoConvergence.html#gwcs.wcs.NoConvergence",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error class used to report non-convergence and/or divergence"]; "Pipeline" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Class to handle a sequence of WCS transformations."]; "Step" [URL="../api/gwcs.wcs.Step.html#gwcs.wcs.Step",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a ``step`` in the WCS pipeline."]; "WCS" [URL="../api/gwcs.wcs.WCS.html#gwcs.wcs.WCS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Basic WCS class."]; "GWCSAPIMixin" -> "WCS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Pipeline" -> "WCS" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

## gwcs.coordinate_frames Package

This module defines coordinate frames for describing the inputs and/or outputs of a transform.

In the block diagram, the WCS pipeline has a two stage transformation (two astropy Model instances), with an input frame, an output frame and an intermediate frame.

Diagram
digraph wcs_pipeline { rankdir=TB; node [shape=box, style=filled, fillcolor=lightblue, fontname="Helvetica", margin="0.3,0.3"]; edge [fontname="Helvetica"]; // Frame nodes input_frame [label="Input\nFrame"]; intermediate_frame [label="Intermediate\nFrame", shape=diamond]; output_frame [label="Output\nFrame"]; // Transform nodes transform1 [label="Transform", shape=ellipse, fillcolor=lightgrey]; transform2 [label="Transform", shape=ellipse, fillcolor=lightgrey]; // Connections input_frame -> transform1; transform1 -> intermediate_frame; intermediate_frame -> transform2; transform2 -> output_frame; }
ASCII

    ┌───────────────┐
    │               │
    │     Input     │
    │     Frame     │
    │               │
    └───────┬───────┘
            │
      ┌─────▼─────┐
      │ Transform │
      └─────┬─────┘
            │
    ┌───────▼───────┐
    │               │
    │  Intermediate │
    │     Frame     │
    │               │
    └───────┬───────┘
            │
      ┌─────▼─────┐
      │ Transform │
      └─────┬─────┘
            │
    ┌───────▼───────┐
    │               │
    │    Output     │
    │     Frame     │
    │               │
    └───────────────┘

Each frame instance is both metadata for the inputs/outputs of a transform and also a converter between those inputs/outputs and richer coordinate representations of those inputs/outputs.

For example, an output frame of type `SpectralFrame` provides metadata to the `WCS` object such as the `axes_type` being `"SPECTRAL"` and the unit of the output etc. The output frame also provides a converter of the numeric output of the transform to a `SpectralCoord` object, by combining this metadata with the numerical values.

### `axes_order` and conversion between objects and arguments

One of the key concepts regarding coordinate frames is the `axes_order` argument. This argument is used to map from the components of the frame to the inputs/outputs of the transform. To illustrate this consider this situation where you have a forward transform which outputs three coordinates `[lat, lambda, lon]`. These would be represented as a `SpectralFrame` and a `CelestialFrame`, however, the axes of a `CelestialFrame` are always `[lon, lat]`, so by specifying two frames as

    [SpectralFrame(axes_order=(1,)), CelestialFrame(axes_order=(2, 0))]

we would map the outputs of this transform into the correct positions in the frames. As shown below, this is also used when constructing the inputs to the inverse transform.

When taking the output from the forward transform the following transformation is performed by the coordinate frames:

Diagram
digraph forward_transform { splines="ortho" rankdir=TB; node [style=filled, fontname="Helvetica", margin="0.3,0.3"]; edge [fontname="Helvetica"]; // Input coordinates input_coords [label="lat, lambda, lon", shape=plaintext]; // Frame nodes with axes_order spectral_frame [label="SpectralFrame\n(1,)", fillcolor=lightblue]; celestial_frame [label="CelestialFrame\n(2, 0)", fillcolor=lightblue]; // Output coordinates spectral_output [label="SpectralCoord(lambda)", shape=record, fillcolor=lightyellow]; celestial_output [label="SkyCoord((lon, lat))", shape=record, fillcolor=lightyellow]; // Connections with routing input_coords -> spectral_frame [xlabel="lambda"]; input_coords -> celestial_frame [xlabel="lon "]; input_coords -> celestial_frame [xlabel="lat "]; spectral_frame -> spectral_output; celestial_frame -> celestial_output [xlabel="lon "]; celestial_frame -> celestial_output [xlabel="lat "] }
ASCII

                    lat, lambda, lon
                    │      │     │
                    └──────┼─────┼────────┐
               ┌───────────┘     └──┐     │
               │                    │     │
     ┌─────────▼────────┐    ┌──────▼─────▼─────┐
     │                  │    │                  │
     │  SpectralFrame   │    │  CelestialFrame  │
     │                  │    │                  │
     │       (1,)       │    │      (2, 0)      │
     │                  │    │                  │
     └─────────┬────────┘    └──────────┬────┬──┘
               │                        │    │
               │                        │    │
               ▼                        ▼    ▼
    SpectralCoord(lambda)    SkyCoord((lon, lat))

When considering the backward transform the following transformations take place in the coordinate frames before the transform is called:

Diagram
digraph backward_transform { splines="ortho" rankdir=TB; node [style=filled, fontname="Helvetica", margin="0.3,0.3"]; edge [fontname="Helvetica"]; // Input high-level objects spectral_input [label="SpectralCoord(lambda)", shape=record, fillcolor=lightyellow]; celestial_input [label="SkyCoord((lon, lat))", shape=record, fillcolor=lightyellow]; // Initial array from high-level objects array_unsorted [label="[lambda, lon, lat]", shape=plaintext]; // Sorting operation sort_axes [label="Sort by axes_order", fillcolor=lightgrey]; // Final sorted array for transform input array_sorted [label="lat, lambda, lon", shape=plaintext]; // Connections spectral_input -> array_unsorted [xlabel="lambda "]; celestial_input -> array_unsorted [xlabel="lon "]; celestial_input -> array_unsorted [xlabel="lat "]; array_unsorted -> sort_axes; sort_axes -> array_sorted; }
ASCII

    SpectralCoord(lambda)    SkyCoord((lon, lat))
                │                        │    │
                └─────┐     ┌────────────┘    │
                      │     │    ┌────────────┘
                      ▼     ▼    ▼
                  [lambda, lon, lat]
                      │     │    │
                      │     │    │
               ┌──────▼─────▼────▼────┐
               │                      │
               │  Sort by axes_order  │
               │                      │
               └────┬──────┬─────┬────┘
                    │      │     │
                    ▼      ▼     ▼
                    lat, lambda, lon

### Functions

`get_ctype_from_ucd`(ucd) | Return the FITS `CTYPE` corresponding to a UCD1 value.

### Classes

`BaseCoordinateFrame`() | API Definition for a Coordinate frame
`CelestialFrame`([axes_order, ...]) | Representation of a Celesital coordinate system.
`CompositeFrame`(frames[, name]) | Represents one or more frames.
`CoordinateFrame`(naxes, axes_type, axes_order) | Base class for Coordinate Frames.
`EmptyFrame`([name]) | Represents a "default" detector frame.
`Frame2D`([axes_order, unit, axes_names, ...]) | A 2D coordinate frame.
`SpectralFrame`([axes_order, reference_frame, ...]) | Represents Spectral Frame
`StokesFrame`([axes_order, axes_names, name, ...]) | A coordinate frame for representing Stokes polarisation states.
`TemporalFrame`(reference_frame[, unit, ...]) | A coordinate frame for time axes.

### Class Inheritance Diagram

digraph inheritance1575ec6015 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "BaseCoordinateFrame" [URL="../api/gwcs.coordinate_frames.BaseCoordinateFrame.html#gwcs.coordinate_frames.BaseCoordinateFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="API Definition for a Coordinate frame"]; "ABC" -> "BaseCoordinateFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CelestialFrame" [URL="../api/gwcs.coordinate_frames.CelestialFrame.html#gwcs.coordinate_frames.CelestialFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Representation of a Celesital coordinate system."]; "CoordinateFrame" -> "CelestialFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CompositeFrame" [URL="../api/gwcs.coordinate_frames.CompositeFrame.html#gwcs.coordinate_frames.CompositeFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents one or more frames."]; "CoordinateFrame" -> "CompositeFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CoordinateFrame" [URL="../api/gwcs.coordinate_frames.CoordinateFrame.html#gwcs.coordinate_frames.CoordinateFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for Coordinate Frames."]; "BaseCoordinateFrame" -> "CoordinateFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "EmptyFrame" [URL="../api/gwcs.coordinate_frames.EmptyFrame.html#gwcs.coordinate_frames.EmptyFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a \"default\" detector frame. This is for use as the default value"]; "CoordinateFrame" -> "EmptyFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Frame2D" [URL="../api/gwcs.coordinate_frames.Frame2D.html#gwcs.coordinate_frames.Frame2D",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A 2D coordinate frame."]; "CoordinateFrame" -> "Frame2D" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpectralFrame" [URL="../api/gwcs.coordinate_frames.SpectralFrame.html#gwcs.coordinate_frames.SpectralFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents Spectral Frame"]; "CoordinateFrame" -> "SpectralFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "StokesFrame" [URL="../api/gwcs.coordinate_frames.StokesFrame.html#gwcs.coordinate_frames.StokesFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A coordinate frame for representing Stokes polarisation states."]; "CoordinateFrame" -> "StokesFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TemporalFrame" [URL="../api/gwcs.coordinate_frames.TemporalFrame.html#gwcs.coordinate_frames.TemporalFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A coordinate frame for time axes."]; "CoordinateFrame" -> "TemporalFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

## gwcs.wcstools Module

### Functions

`grid_from_bounding_box`(bounding_box[, step, ...]) | Create a grid of input points from the WCS bounding_box.
`wcs_from_fiducial`(fiducial[, ...]) | Create a WCS object from a fiducial point in a coordinate frame.
`wcs_from_points`(xy, world_coords[, ...]) | Given two matching sets of coordinates on detector and sky, compute the WCS.

## gwcs.selector Module

The classes in this module create discontinuous transforms.

The main class is `RegionsSelector`. It maps inputs to transforms and evaluates the transforms on the corresponding inputs. Regions are well defined spaces in the same frame as the inputs. Regions are assigned unique labels (int or str). The region labels are used as a proxy between inputs and transforms. An example is the location of IFU slices in the detector frame.

`RegionsSelector` uses two structures:

  - A mapping of inputs to labels - “label_mapper”

  - A mapping of labels to transforms - “transform_selector”

A “label_mapper” is also a transform, a subclass of `astropy.modeling.Model`, which returns the labels corresponding to the inputs.

An instance of a `LabelMapper` class is passed to `RegionsSelector`. The labels are used by `RegionsSelector` to match inputs to transforms. Finally, `RegionsSelector` evaluates the transforms on the corresponding inputs. Label mappers and transforms take the same inputs as `RegionsSelector`. The inputs should be filtered appropriately using the `inputs_mapping` argument which is ian instance of `Mapping`. The transforms in “transform_selector” should have the same number of inputs and outputs.

This is illustrated below using two regions, labeled 1 and 2

Diagram
digraph regions { node [shape=box, style=filled, fillcolor=lightyellow, fontname="Helvetica", margin="0.3,0.3"]; subgraph cluster_detector { label="Detector"; style=filled; color=lightgray; fontname="Helvetica"; region1 [label="1", shape=box, height=2, width=1]; region2 [label="2", shape=box, height=1, width=1]; {rank=same; region1 region2} } }
ASCII

    +-----------+
    | +-+       |
    | | |  +-+  |
    | |1|  |2|  |
    | | |  +-+  |
    | +-+       |
    +-----------+

Label mapper workflow:

Diagram
digraph selector_workflow { splines="ortho" node [shape=box, style=filled, fillcolor=lightblue, fontname="Arial", margin="0.3,0.3"]; // Nodes in [shape=point, width=0, height=0]; inputs [label="inputs", fillcolor=lightgreen]; label_mapper [label="label mapper"]; label [label="label"]; transform_selector [label="transform_selector"]; transform [label="transform"]; outputs [label="outputs", fillcolor=lightgreen]; // Invisible nodes for alignment invisible1 [style=invis, shape=point]; invisible2 [style=invis, shape=point]; // Main flow in ->inputs -> transform -> outputs; inputs -> invisible1 [style=invis]; inputs -> label_mapper [constraint=false]; label_mapper -> label; label -> transform_selector; transform_selector -> transform; invisible2 -> transform [style=invis]; // Layout adjustments {rank=same; label_mapper; invisible1;} {rank=same; transform_selector; invisible2;} }
ASCII

                       +--------------+
                       | label mapper |
                       +--------------+
                         ^       |
                         |       V
               ----------|   +-------+
               |             | label |
             +--------+      +-------+
    --->     | inputs |          |
             +--------+          V
                  |          +--------------------+
                  |          | transform_selector |
                  |          +--------------------+
                  V                  |
             +-----------+           |
             | transform |<-----------
             +------------+
                  |
                  V
             +---------+
             | outputs |
             +---------+

The base class _LabelMapper can be subclassed to create other label mappers.

### Classes

`LabelMapper`(inputs, mapper[, no_label, ...]) | Maps inputs to regions.
`LabelMapperArray`(mapper[, inputs_mapping, ...]) | Maps array locations to labels.
`LabelMapperDict`(inputs, mapper[, ...]) | Maps a number to a transform, which when evaluated returns a label.
`LabelMapperRange`(inputs, mapper[, ...]) | The structure this class uses maps a range of values to a transform.
`RegionsSelector`(inputs, outputs, selector, ...) | This model defines discontinuous transforms.

### Class Inheritance Diagram

digraph inheritancea9670eebfb { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "LabelMapper" [URL="../api/gwcs.selector.LabelMapper.html#gwcs.selector.LabelMapper",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Maps inputs to regions. Returns the region labels corresponding to the inputs."]; "_LabelMapper" -> "LabelMapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LabelMapperArray" [URL="../api/gwcs.selector.LabelMapperArray.html#gwcs.selector.LabelMapperArray",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Maps array locations to labels."]; "_LabelMapper" -> "LabelMapperArray" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LabelMapperDict" [URL="../api/gwcs.selector.LabelMapperDict.html#gwcs.selector.LabelMapperDict",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Maps a number to a transform, which when evaluated returns a label."]; "_LabelMapper" -> "LabelMapperDict" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LabelMapperRange" [URL="../api/gwcs.selector.LabelMapperRange.html#gwcs.selector.LabelMapperRange",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The structure this class uses maps a range of values to a transform."]; "_LabelMapper" -> "LabelMapperRange" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Model" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for all models."]; "RegionsSelector" [URL="../api/gwcs.selector.RegionsSelector.html#gwcs.selector.RegionsSelector",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="This model defines discontinuous transforms."]; "Model" -> "RegionsSelector" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_LabelMapper" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Maps inputs to regions. Returns the region labels corresponding to the inputs."]; "Model" -> "_LabelMapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

## gwcs.spectroscopy Module

Spectroscopy related models.

### Classes

`AnglesFromGratingEquation3D`(groove_density, ...) | Solve the 3D Grating Dispersion Law in Direction Cosine space for the refracted angle.
`SellmeierGlass`(B_coef, C_coef, **kwargs) | Sellmeier equation for glass.
`SellmeierZemax`([temperature, ...]) | Sellmeier equation used by Zemax.
`Snell3D`(**kwargs) | Snell model in 3D form.
`WavelengthFromGratingEquation`(...) | Solve the Grating Dispersion Law for the wavelength.

### Class Inheritance Diagram

digraph inheritancee9acf971e3 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "AnglesFromGratingEquation3D" [URL="../api/gwcs.spectroscopy.AnglesFromGratingEquation3D.html#gwcs.spectroscopy.AnglesFromGratingEquation3D",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Solve the 3D Grating Dispersion Law in Direction Cosine"]; "Model" -> "AnglesFromGratingEquation3D" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Model" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for all models."]; "SellmeierGlass" [URL="../api/gwcs.spectroscopy.SellmeierGlass.html#gwcs.spectroscopy.SellmeierGlass",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Sellmeier equation for glass."]; "Model" -> "SellmeierGlass" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SellmeierZemax" [URL="../api/gwcs.spectroscopy.SellmeierZemax.html#gwcs.spectroscopy.SellmeierZemax",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Sellmeier equation used by Zemax."]; "Model" -> "SellmeierZemax" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Snell3D" [URL="../api/gwcs.spectroscopy.Snell3D.html#gwcs.spectroscopy.Snell3D",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Snell model in 3D form."]; "Model" -> "Snell3D" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WavelengthFromGratingEquation" [URL="../api/gwcs.spectroscopy.WavelengthFromGratingEquation.html#gwcs.spectroscopy.WavelengthFromGratingEquation",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Solve the Grating Dispersion Law for the wavelength."]; "Model" -> "WavelengthFromGratingEquation" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

## gwcs.geometry Module

Models for general analytical geometry transformations.

### Classes

`CartesianToSpherical`([wrap_lon_at]) | Convert cartesian coordinates to spherical coordinates on a unit sphere.
`FromDirectionCosines`(**kwargs) | Transform directional cosines to vector.
`SphericalToCartesian`([wrap_lon_at]) | Convert spherical coordinates on a unit sphere to cartesian coordinates.
`ToDirectionCosines`(**kwargs) | Transform a vector to direction cosines.

### Class Inheritance Diagram

digraph inheritanced10f9e4600 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "CartesianToSpherical" [URL="../api/gwcs.geometry.CartesianToSpherical.html#gwcs.geometry.CartesianToSpherical",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Convert cartesian coordinates to spherical coordinates on a unit sphere."]; "Model" -> "CartesianToSpherical" [arrowsize=0.5,style="setlinewidth(0.5)"]; "FromDirectionCosines" [URL="../api/gwcs.geometry.FromDirectionCosines.html#gwcs.geometry.FromDirectionCosines",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Transform directional cosines to vector."]; "Model" -> "FromDirectionCosines" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Model" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for all models."]; "SphericalToCartesian" [URL="../api/gwcs.geometry.SphericalToCartesian.html#gwcs.geometry.SphericalToCartesian",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Convert spherical coordinates on a unit sphere to cartesian coordinates."]; "Model" -> "SphericalToCartesian" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ToDirectionCosines" [URL="../api/gwcs.geometry.ToDirectionCosines.html#gwcs.geometry.ToDirectionCosines",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Transform a vector to direction cosines."]; "Model" -> "ToDirectionCosines" [arrowsize=0.5,style="setlinewidth(0.5)"]; }