pyRTX.classes.LookUpTable

Classes

LookUpTable(filename)

A class for storing and interpolating lookup tables from NetCDF files.

class pyRTX.classes.LookUpTable.LookUpTable(filename)[source]

A class for storing and interpolating lookup tables from NetCDF files.

This class is used to store results in the shape of a lookup table. This is mainly used to store the results of a set of raytracing results example: the solar pressure for a body is computed for a grid of RA/DEC values. these values can be stored in the LookupTable object and later retrieved. This class offers the possibility of not only retrieving pre-computed values, but also interpolating between grid points.

NOTE: the grid of the lookup table does not need to be regular the interpolation is based on numpy griddata method which is able to cope with unstructured grids.

__init__(filename)[source]

Initializes the LookUpTable object.

Parameters:

filename (str) – The path to the NetCDF file containing the lookup table.

property moving_frames

Returns the list of moving frames.

Returns:

A list of the moving frames.

Return type:

list

property data

Returns the lookup table data.

Returns:

The lookup table data.

Return type:

numpy.ndarray

property attrs

Returns the attributes of the xarray Dataset.

Returns:

The attributes of the xarray Dataset.

Return type:

dict

property axes

Returns the coordinate axes of the lookup table.

Returns:

A list of the lookup table’s coordinate axes.

Return type:

list

property base_frame

Returns the base frame of the lookup table.

Returns:

The name of the base frame.

Return type:

str

property ref_epc

Returns the reference epoch of the lookup table.

Returns:

The reference epoch.

Return type:

float

property eul_set

Returns the Euler angle set used for the lookup table.

Returns:

A tuple of the Euler angle set.

Return type:

tuple

property eul_idxs

Returns the Euler angle indices.

Returns:

A dictionary mapping Euler angle axes to their indices.

Return type:

dict

property dims

Returns the dimensions of the lookup table.

Returns:

A tuple of the lookup table’s dimensions.

Return type:

tuple

property type
Returns the type of the lookup table values.
  • If type is ‘accel’, the LUT values represent the acceleration for a

    normalized radiation flux of 1 W/m**2 and a mass of 1 kg. The LUT values will be 3x1 vectors. This mode is for srp, albedo and thermal infrared acceleration.

  • If type is ‘cross-section’, the LUT computes the cross-section for the

    drag acceleration. The LUT values will be single float.

Returns:

The type of the lookup table values.

Return type:

str

query(epoch, ra, dec)[source]

Queries the lookup table for a given epoch, right ascension, and declination.

Parameters:
  • epoch (float) – The epoch in TDB seconds past J2000.

  • ra (float) – The right ascension in degrees.

  • dec (float) – The declination in degrees.

Returns:

The interpolated value from the lookup table.

Return type:

numpy.ndarray