Internal classes

Here are the internal classes used. You are welcome to browse.

DeltaFunction

class skimpy.quadrature.lineshape.DeltaFunction
__init__()

DeltaFunction line shape. The nearest sample is always taken.

bounds()

Boundaries of the line shape. Values outside this range are 0

Returns:Left and right boundaries of the line shape
Return type:(left, right)
integration_weights(mean: float, available_samples: numpy.ndarray, normalize=True)

Integration weights for the line shape.

Parameters:
  • mean (float) – Value to integrate to
  • available_samples (np.ndarray) – Array of sample values that are available to use in the integration.
  • normalize (bool, Optional) – If true, resulting weights are normalized such that np.nansum(weights) = 1
Returns:

Integration weights, same size as available_samples.

Return type:

np.ndarray

FOVManager

class skimpy.instrument.fov.FOVManager

An array of .FOV objects. This is the container class and provides management of the field of views for radiative transfer calculations etc.

__init__()

Initialize self. See help(type(self)) for accurate signature.

add(fov: skimpy.instrument.fov.FOV) → int

Adds a field of view to the current list of field of views. This will clear any internal caches unti the next access of property lines_of_sight

Parameters:fov (FOV) – A field of view. An instance of a class derived from FOV
Returns:
  • The index of this field of view in the FOVManager. This can be used to index the field of view object.
  • The FOVManager implements a simple list that starts at 0 and increases by 1 each time you add a new field of view.
fov_indices_into_unique(fov: skimpy.instrument.fov.FOV) → List[int]

Demangles the line of sights from the unique list of lines of sight. Returns a list of indices into the lines of sight (for one exposure) of the FOV object. This is used when demangling the radiances returned from the Sasktran engine

Returns:The list of indices of the lines of sight from the fovs * object. The *fovs object must be in this FOVManagers list of fovs
Return type:List[int]
lines_of_sight_in_icf

returns: Returns the 2-D array (3,N) of lines of sight for all of the field of view objects being considered. :rtype: np.ndarray

Gaussian

class skimpy.quadrature.lineshape.Gaussian(fwhm: float = None, stdev: float = None, max_stdev=5, mode='linear')
__init__(fwhm: float = None, stdev: float = None, max_stdev=5, mode='linear')

Gaussian line shape.

Parameters:
  • fwhm (float) – Full width half maximum, only specify one of fwhm or stdev
  • stdev (float) – Standard deviation, only specify one of fwhm or stdev
  • max_stdev (int, optional) – Values farther than max_stdev*stdev are truncated to 0. Default=5
  • mode (string, one of ['constant', 'linear']) – If constant, then the gaussian is sampled at the integration location. If linear, then the gaussian is integrated with a triangular base function representing linear integration across the sample. Linear is much more accurate at the cost of a small performance hit. Default ‘linear’.
bounds()

If integration_weights is called with mean=0, all values outside the range [lower_bound, upper_bound] are guaranteed to be 0.

Returns:
Return type:[lower_bound, upper_bound]
integration_weights(mean: float, available_samples: numpy.ndarray, normalize=True)

The lineshape converts a function at high resolution, H, to one at low resolution, L.

L(mean) = np.dot(H, integration_weights(mean, available_samples))

Parameters:
  • mean (float) – value (in the range of available_samples) to integrate to
  • available_samples (np.ndarray) – Values that the high resolution function is available at
  • normalize (bool, optional) – If true, the returned weights will sum to 1
Returns:

Weights to use in the high resolution integration

Return type:

np.ndarray

LineShape

class skimpy.quadrature.lineshape.LineShape

Base class for implementing line shapes. A line shape represents integration across a high resolution measurement down to a lower resolution measurement.

bounds()

Boundaries of the line shape. Values outside this range are 0

Returns:Left and right boundaries of the line shape
Return type:(left, right)
integration_weights(mean: float, available_samples: numpy.ndarray, normalize=True)

Integration weights for the line shape.

Parameters:
  • mean (float) – Value to integrate to
  • available_samples (np.ndarray) – Array of sample values that are available to use in the integration.
  • normalize (bool, Optional) – If true, resulting weights are normalized such that np.nansum(weights) = 1
Returns:

Integration weights, same size as available_samples.

Return type:

np.ndarray

ObservationPolicy

class skimpy.ObservationPolicy

Implements the Observation Policy object for the Platform. This object is a list of platform state. Any observation policy breaks down into an array of samples where the platform position, orientation and time are specified for each sample.

The end user will often want call the following methods:

The instrument model uses the current list of platform states in the platform’s ObservationPolicy as one of its inputs to the radiative transfer engine. The user must add at least one platform state to the ObservationPolicy for the radiative transfer to calculate anything.

Real observation policies for real instruments may be much more detailed than simply saving platform eciposition, orientation and time. For example, mirrors and filters may need to be adjusted, integration times and detector binning modes may need to be varied. These aspects are beyond the scope of the platform’s observation policy and are left for the user to manage and implement.

__init__()

Creates a new empty instance.

add_current_state(platform_attitude: skimpy.platform.platform_pointing.PlatformPointing) → int

Adds the current state of the platform to the observation policy. A typical scenario is for the end-user to set the position, orientation and time of the platform using one of many available methods and to then capture the platform state for further use within the radiative transfer engine.

Parameters:platform_attitude (PlatformPointing) – The object used to define the platform position, orientation and time.
Returns:The number of samples in the observation policy.
Return type:int
clear()

Clears the current list of platform states inside the observation policy. This method should be called before starting a new observation policy

geo_orientations()

Returns the orientation of the platform for each sample in the observation set.

Returns:Returns the rotation matrix for each sample. The rotation matric will convert Instrument Control Frame unit vectors to geocentric geographic unit vectors. The matrix equation is vgeo = R.R @ vicf
Return type:List[RotationMatrix]
geo_positions()

Returns the geocentric geographic (GEO) position of the platform for each sample in the observation set.

Returns:Returns the geographic geocentric position as an array of GEO vectors, one three element column for each sample in the observation set. The position is specified in meters from the centre of the Earth.
Return type:np.ndarray( 3,Nt)
numsamples_in_observationset() → int

Returns the number of samples in this observation policy

Returns:The number of samples in the observation policy.
Return type:int
utc()

Returns the UTC of each of the samples in the observation set. The UTC is either an array of numpy.datetime64 values or an array of floats representing MJD. Note that the datetime64 are detected and converted to MJD inside the RadianceSimulator before calling Sasktran.

QuadratureBase

class skimpy.quadrature.quadrature.QuadratureBase

Base class for implementing quadrature. Quadrature objects are typically used to integrate over fields of view and wavelength ranges. One quadrature object may be shared between hundreds of different sensor pixels. This is achieved by mapping the “normalized” units of the quadrature object to the actual units in the actual integral.

__init__()

Initialize self. See help(type(self)) for accurate signature.

integrate(Fx: Union[float, numpy.ndarray]) → float
quadrature_points() → numpy.ndarray

Returns the location of the quadrature points along the x axis. The user will supply a tabulated function at each of these points when calling integrate

quadrature_weights() → numpy.ndarray

Returns the weights of the quadrature points used by this weighted integral. This is used to evaluate the integral.

set_points_and_weights(xpoints: numpy.ndarray, weights: numpy.ndarray, bounds: Tuple[float, float])

Sets the x-abscissa locations and the weights for this quadrature object. The user will ensure that any tabulated function integrated by this object will have values evaluated at the xpoints location. The weights array must sum to unity.

Parameters:
  • xpoints (np.ndarray) – The array of x abscissa points where a tabulated function will be evaluated
  • weights (np.ndarray) – The weights used to perform the integral over the given range
  • bounds (Tuple[float,float]) – The bounds of the integral. For example [-1,+1] or [-infinity, +infinity]
w = None

The weights to be applied to a tabulated function to get the integral. These are normalized Sum(w_i) = 1

x = None

The array of x-abscissa values at which to evaluate the tabulated function f

Quadrature_Gaussian_UserDefinedPoints

class skimpy.quadrature.quadraturelineshapes.Quadrature_Gaussian_UserDefinedPoints(x0: float, sigma: float, max_bound_in_sigmas: float = 5, num_linspace_points: int = None, user_defined_points: numpy.ndarray = None)

Implements integration of F(x) exp( -x^2/2sigma^2) using fixed or user defined spacing of quadrature points. Uses Dan Zawadas Lineshape class to perform linear interpolation between function values at the quadrature points.

__init__(x0: float, sigma: float, max_bound_in_sigmas: float = 5, num_linspace_points: int = None, user_defined_points: numpy.ndarray = None)

Creates quadrature over an integral of a function times a gaussian distribution using user defined spacing of quadrature points. The algorithm provides linear interpolation of the user supplied function between the quadrature points, generating error-function like terms when integrated with the gaussian distribution function.

Parameters:
  • x0 (float) – The center abscissa value of the Gaussian.
  • sigma (float) – The standard deviation of the Gaussian
  • max_bound_in_sigmas (float) – The maximum distance on either side of the peak to use in the inetgral. Expressed as units of standard deviation. Default is 5.
  • num_linspace_points (int) – Optional parameter. If set then it specifies the number of quadrature points evenly distributed across the lower and upper maximum bounds using numpy linspace. This value if set will override user_defined_points.
  • user_defined_points (np.ndarray) – Optional parameter. If set it provides the location of the quadrature points as an array of asbcissa values. Note that the array or abscissa values may be significantly larger than the range of the Gaussian integral. Only user defined points that are within the max bounds of the gaussian integral limits have weights that are not zero.

Quadrature_Gaussian_Hermite

class skimpy.quadrature.quadrature.Quadrature_Gauss_Hermite(norders: int, x0: float, sigma: float)

Implements weighted quadrature of the form

\[` I_{T} = \int_{-\infty}^{\infty} F(x) e^{-(x)^2} dx\]

The technique uses Gauss-Hermite quadrature and it decides where the quadrature points are located. The upside is that the technique is efficient and fast. The downside is that neighbouring pixels on a spectrograph will probably not share the same quadrature points. So this weighted_integral is good for high resolution studies of one pixel spectrally isolated from others.

__init__(norders: int, x0: float, sigma: float)

Initialize self. See help(type(self)) for accurate signature.

set_num_orders(N: int, x0: float, sigma: float)

Sets the number of points used in the integral plust the central peak of the guass in user units and the \(\sigma\) of the gaussian distribution

Quadrature_Gauss_Legendre

class skimpy.quadrature.quadrature.Quadrature_Gauss_Legendre(Norders: int)

Implements Gaussian-Legendre weighted quadrature of the form

\[` I_{T} = \int_{-1}^{+1} F(x) dx\]

The technique uses Gauss-Legendre quadrature and it decides where the quadrature points are located.

__init__(Norders: int)

Initialize self. See help(type(self)) for accurate signature.

set_num_orders(N: int)

Sets the number of points/orders used

Quadrature_Trapezoidal

class skimpy.quadrature.quadrature.Quadrature_Trapezoidal(range: Tuple[int, float, float] = None, user_x_values: numpy.ndarray = None)

Implements trapezoidal integration. I have not used the numpy/scipy methods as they do not provide the weights they simply do the integral summation which is not what I want:

__init__(range: Tuple[int, float, float] = None, user_x_values: numpy.ndarray = None)

Initialize self. See help(type(self)) for accurate signature.

set_from_abscissa_values(x: numpy.array)

Uses the user provided x values as the integration abscissa values

set_from_range(N: int, a: float, b: float)

Sets N evenly spaced points along the abscissa

Quadrature_Delta_Function

class skimpy.quadrature.quadrature.Quadrature_Delta_Function(x0: float)

A class that implements a delta function for the quadrature. This is typically used for low resolution integrals that are only using one point

__init__(x0: float)

Initialize self. See help(type(self)) for accurate signature.

integrate(Fx: Union[float, numpy.ndarray]) → float

Overrides the base class implementation (but gives the same answer). Its a delta function with one element so we can just immediately return the first element of the function rather than call summation over the elements.

RadianceSimulator

class skimpy.forwardmodel.radiancesimulator.RadianceSimulator
__init__()

Initialize self. See help(type(self)) for accurate signature.

calculate_radiance_at_front_aperture(platform: skimpy.platform.platform.Platform, front_end_radiance: skimpy.instrument.frontendradiance.FrontEndRadiance, forward_model_options: Dict[str, Any], geometry_options: Dict[str, Any], sasktran_options: Dict[str, Any], sasktranif_options: Dict[str, Any])
set_atmosphere(atmosphere: sasktran.atmosphere.Atmosphere)

Sets the sasktran atmosphere used in subsequent radiative transfer calculations.

Parameters:atmosphere (sk.Atmosphere) – The sasktran Atmosphere object to be used in subsequent radiative transfer calculations. This instance must be properly configured by the user. This class simply passes it on to the radiative transfer engine and does not attempt to modify the object.

RadianceSimulator_IR

RadianceSimulator_UVIS_NIR

Rectangle

class skimpy.quadrature.lineshape.Rectangle(width, mode='linear')
__init__(width, mode='linear')

Rectangular line shape

Parameters:width (float) – Full width of the line shape.
bounds()

Boundaries of the line shape. Values outside this range are 0

Returns:Left and right boundaries of the line shape
Return type:(left, right)
integration_weights(mean: float, available_samples: numpy.ndarray, normalize=True)

Integration weights for the line shape.

Parameters:
  • mean (float) – Value to integrate to
  • available_samples (np.ndarray) – Array of sample values that are available to use in the integration.
  • normalize (bool, Optional) – If true, resulting weights are normalized such that np.nansum(weights) = 1
Returns:

Integration weights, same size as available_samples.

Return type:

np.ndarray

RotationMatrix

class skimpy.platform.rotationmatrix.RotationMatrix(array: Union[List[List[float]], numpy.ndarray] = None)

A class that provides methods to calculate the rotation and transformation matrices used elsewhere in the package. These matrices are used to transform lines of sight and other vectors from one control frame to another.

static I()

Returns the identity matrix, \(\boldsymbol{I}\) as a 3x3 matrix

R
RInv
__init__(array: Union[List[List[float]], numpy.ndarray] = None)

Initialize self. See help(type(self)) for accurate signature.

from_azimuth_elevation_roll(azimuthradians: float, elevationradians: float, rollradians: float)

Create a rotation matrix that rotates a vector by the specified azimuth, elevation and roll. Similar to yaw, pitch and roll care must be taken in defining the orientation of the reference axes if you want azimuth, elevation and roll to be intuitive. Typically positive elevation means looking “up” and positive azimuth means turning towards the right, like the angles on a compass. This usually requires the \(\hat{x}\) axis to be in the forward direction and the \(\hat{z}\) axis to be in the downward direction. This function is a synonym for from_yaw_pitch_roll()

The rotation matrix is created in the rotation order Azimuth, Elevation, Roll (rzyx)

Parameters:
  • azimuthradians – The azimuthual rotation in radians. The rotation is in a right handed sense around the \(\hat{z}\) axis.
  • elevationradians – The vertical rotation in radians. The rotation is in a right-handed sense around the \(\hat{y}\) axis.
  • rollradians – The roll rotation in radians. The rotation is in a right haded sense around the \(\hat{x}\) axis
from_rotate_one_setofaxes_to_another(A: numpy.ndarray, B: numpy.ndarray)

Generates the rotation matrix that rotates vectors specified in reference frame \(\boldsymbol{A}\) to vectors specified in reference frame \(\boldsymbol{B}\). I.E. the 3 unit vectors of frame \(\boldsymbol{A}\) will be rotated on to the 3 unit vectors of frame \(\boldsymbol{B}\). The unit vectors for system \(\boldsymbol{A}\), \(\begin{bmatrix} \hat{x}_A & \hat{y}_A & \hat{z}_A \end{bmatrix}\) and system \(\boldsymbol{B}\), \(\begin{bmatrix} \hat{x}_B & \hat{y}_B & \hat{z}_B \end{bmatrix}\) are specified in a common system \(\begin{bmatrix} \hat{x'} & \hat{y'} & \hat{z'} \end{bmatrix}\) as 3x3 matrices.

\[\begin{split}A= \begin{pmatrix} \hat{x}_{A}.\hat{x}' & \hat{y}_{A}.\hat{x}' & \hat{z}_{A}.\hat{x}' \\ \hat{x}_{A}.\hat{y}' & \hat{y}_{A}.\hat{y}' & \hat{z}_{A}.\hat{y}' \\ \hat{x}_{A}.\hat{z}' & \hat{y}_{A}.\hat{z}' & \hat{z}_{A}.\hat{z}' \\ \end{pmatrix}\end{split}\]
\[\begin{split}B = \begin{pmatrix} \hat{x}_{B}.\hat{x}' & \hat{y}_{B}.\hat{x}' & \hat{z}_{B}.\hat{x}' \\ \hat{x}_{B}.\hat{y}' & \hat{y}_{B}.\hat{y}' & \hat{z}_{B}.\hat{y}' \\ \hat{x}_{B}.\hat{z}' & \hat{y}_{B}.\hat{z}' & \hat{z}_{B}.\hat{z}' \\ \end{pmatrix}\end{split}\]

The rotation matrix \(\boldsymbol{R}\) is the operation that transforms the three unit vectors of \(\boldsymbol{A}\) in to the three unit vectors of \(\boldsymbol{B}\)

\[\begin{split}\boldsymbol{RA} &= \boldsymbol{B}\\ \boldsymbol{R} &= \boldsymbol{BA^{-1}}\\\end{split}\]
Parameters:
  • A – A 3x3 matrix with the 3 unit vectors of control frame \(\boldsymbol{A}\) \(\begin{bmatrix} \hat{x}_A & \hat{y}_A & \hat{z}_A \end{bmatrix}\) expressed in a common coordinate sytem, \(\hat{x}'\), \(\hat{y}'\), \(\hat{z}'\).
  • B – A 3x3 matrix with the 3 unit vectors of control frame \(\boldsymbol{B}\) \(\begin{bmatrix} \hat{x}_B & \hat{y}_B & \hat{z}_B \end{bmatrix}\) expressed in a common coordinate sytem, \(\hat{x}'\), \(\hat{y}'\), \(\hat{z}'\).

Examples

Rotate Platform and instrument to look at point on Earth
A typical usage example is to calculate the rotation matrix for a platform so an instrument on that platform will look at a point on the Earth. The solution is to align the platform control frame with the local geodetic system (west, south, up) and then express the instrument control frame, \(\boldsymbol{A}\) , as geographic geocentric unit vectors via the west,south, up unit vectors. The \(\boldsymbol{B}\) unit vectors are taken as the look unit vector from the platform to the desired point on Earth, \(\hat{x}_B\), while \(\hat{y}_B\) and \(\hat{z}_B\) are chosen to meet observation requirements, eg horizontal slit etc. In this example both \(\boldsymbol{A}\) and \(\boldsymbol{B}\) can be readily expressed in geographic geocentric coordinates using other parts of the software package.
Rotate FrontEndRadiance Control Frame to Platform Control Frame
For this example we want to rotate vectors specified in the instrument control frame so they are specified in the platform control frame. For example the CATS instrument was located on the backside of the gondola during the 2018 campaign and required the line of sight to be rotated so it looked backwards. The solution is specify the instrument control frame unit vectors in platform control frame coordinates and recognise that the common coordinates are the platform control frame unit vectors. In this case the instrument control frame is system \(\boldsymbol{A}\) and the platform control frame is system \(\boldsymbol{B}\). Because system \(\boldsymbol{B}\) is the common system then matrix \(\boldsymbol{B }\) is simply the unit vector \(\boldsymbol{I}\). Matrix \(\boldsymbol{A}\) must be calculated from instrument and platform configuration details but then \(\boldsymbol{R}\) is readily derived.
from_rotation_matrix(other: numpy.ndarray)

Sets the rotation from another 3x3 matrix

from_transform_to_destination_coordinates(ax: numpy.ndarray, ay: numpy.ndarray, az: numpy.ndarray)

Sets the rotation/transformation vector \(\boldsymbol{R}\) so it converts a vector, \(\vec{v}\), specified in the system, \(\boldsymbol{A}\) ( \(\hat{x}_a\) , \(\hat{y}_a\) , \(\hat{z}_a\) ), to the same vector but specified in the destination system, \(\boldsymbol{B}\) (\(\hat{x}_b\) , \(\hat{y}_b\) , \(\hat{z}_b\)). This is implemented as a dot product.

\[\begin{split}\begin{split} \vec{V}_A &= a_x\hat{x}_a + a_y\hat{y}_a + a_z\hat{z}_a \\ \vec{V}_B &= b_x\hat{x}_b + b_y\hat{y}_b + b_z\hat{z}_b \\ \end{split}\end{split}\]

where

\[\begin{split}\begin{split} \hat{x}_a &=& a_{11}\hat{x}_b +& a_{12}\hat{y}_b +& a_{13}\hat{z}_{b} \\ \hat{y}_a &=& a_{21}\hat{x}_b +& a_{22}\hat{y}_b +& a_{23}\hat{z}_{b} \\ \hat{z}_a &=& a_{31}\hat{x}_b +& a_{32}\hat{y}_b +& a_{33}\hat{z}_{b} \\ \end{split}\end{split}\]

then

\[\begin{split}\begin{pmatrix} Bx \\ By \\ Bz \\ \end{pmatrix} = \begin{pmatrix} a_{11} & a_{21} & a_{31} \\ a_{12} & a_{22} & a_{32} \\ a_{13} & a_{23} & a_{33} \\ \end{pmatrix} \begin{pmatrix} Ax \\ Ay \\ Az \\ \end{pmatrix}\end{split}\]

Note that the 3x3 matrix is the transpose of the unit vector equations

Parameters:
  • ax – A 3 element array expressing the \(\hat{ax}\) unit vector of frame \(\boldsymbol{A}\) in terms of the unit vectors in \(\boldsymbol{B}\)
  • ay – A 3 element array expressing the \(\hat{ay}\) unit vector of frame \(\boldsymbol{A}\) in terms of the unit vectors in \(\boldsymbol{B}\)
  • bz – A 3 element array expressing the \(\hat{az}\) unit vector of frame \(\boldsymbol{A}\) in terms of the unit vectors in \(\boldsymbol{B}\).
from_yaw_pitch_roll(yaw: float, pitch: float, roll: float)

Create a rotation matrix that will rotates any vector by the specified yaw, pitch and roll. All angles are taken in a right-handed sense around the axis of rotation. Care must be taken in defining the orientation of the reference axes if you want yaw, pitch and roll to be intuitive. Typically positive pitch means looking “up” and positive yaw means turning towards the right. This usually requires the \(\hat{x}\) axis to be in the forward direction and the \(\hat{z}\) axis to be in the downward direction.

  • Roll is around the \(\hat{x}\) axis, which is assumed to be in the forward direction. i.e. parallel to the nose of aircraft or along the optical axis of an instrument away from the instrument.
  • Yaw is around the \(\hat{z}\) axis, which is perpendicular to X axis in the nominal “down” direction for aircraft, possibly “up” for limb viewing instruments. The \(\hat{z}\) axis is parallel to the short vertical edge of a slit in limb-viewing spectrograph instruments.
  • Pitch is around the \(\hat{y}\) axis, which is formed as the third axis of a right angle system and is parallel to the aircraft wings or parallel to the long edge of a slit in spectrographs. look/nose.

The matrix is created in the rotation order Yaw, Pitch, Roll (rzyx)

Parameters:
  • yaw – The yaw angle in radians
  • pitch – The pitch angle in radians
  • roll – The roll angle in radians
transform_vectors(lookvector: numpy.ndarray) → numpy.ndarray

Applies the internal rotation matrix to an array of N vectors. The incoming array must of the form (3,N) where the first dimension contains the X,Y,Z components of the N vectors.

Parameters:lookvector – An array (3,N) of incoming vectors that will be rotated/transformed. The first dimension contains the X,Y,Z components of the N vectors
Returns:
  • An array of size (3,N) which is the set of vectors generated by applying the rotation matrix to the incoming vectors.
  • The first dimension contains the X,Y,Z components of the rotated N vectors

SolarIrradiance

class skimpy.forwardmodel.solarradiance.SolarIrradiance(name='SAO2010')

A class to provide the solar spectrum at the spectral resolution of a bandpass window at the wavelengths in the bandpass window.

__init__(name='SAO2010')

Initialize self. See help(type(self)) for accurate signature.

convolved_irradiance(wavelen_bandpass: skimpy.instrument.wavelength_bandpass.Wavelength_BandPass, utc: float = None, fwhm=None, **kwargs) → numpy.ndarray

Calculates the solar irradiance at the wavelengths of the wavelength bandpass object (nominally) convolved to the resolution of the bandpass.

Parameters:
  • wavelen_bandpass (Wavelength_BandPass) – The wavelength bandpass object. The code will calculate the convolved solar irradiance for each wavelength in the bandpass. The convolution will occur at the solar spectral resolution set inside the bandpass obect
  • utc (float) – The UTC at which to get the position of the Sun. This must be an MJD or None. All times must represent a UTC. If it is None then return irradiance at 1 AU. Default is None
highres_irradiance(wavelen_bandpass: skimpy.instrument.wavelength_bandpass.Wavelength_BandPass, utc: float = None) → numpy.ndarray

Calculates the solar irradiance at the wavelengths of the wavelength bandpass object (nominally) convolved to the resolution of the bandpass.

Parameters:
  • wavelen_bandpass (Wavelength_BandPass) – The wavelength bandpass object.
  • utc (float) – The UTC at which to get the position of the Sun. This must be an MJD or None. All times must represent a UTC. If it is None then return irradiance at 1 AU. Default is None

UnitVectors

class skimpy.platform.rotationmatrix.UnitVectors(vectors: Union[List[List[float]], Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray], numpy.ndarray] = None)

A class to hold the unit vectors \(\begin{bmatrix} \hat{x} & \hat{y} & \hat{z} \end{bmatrix}\) for one reference frame specified in terms of another reference frame, \(\begin{bmatrix} \hat{x}' & \hat{y}' & \hat{z}' \end{bmatrix}\) The components of each unit vector occupy a column of the matrix.

\[\begin{split}\begin{pmatrix} \hat{x}.\hat{x}' & \hat{y}.\hat{x}' & \hat{z}.\hat{x}' \\ \hat{x}.\hat{y}' & \hat{y}.\hat{y}' & \hat{z}.\hat{y}' \\ \hat{x}.\hat{z}' & \hat{y}.\hat{z}' & \hat{z}.\hat{z}' \\ \end{pmatrix}\end{split}\]

Note that the components of \(\begin{bmatrix} \hat{x}' & \hat{y}' & \hat{z}' \end{bmatrix}\) in terms of \(\begin{bmatrix} \hat{x} & \hat{y} & \hat{z} \end{bmatrix}\) is the transpose (which is also the inverse) of this matrix.

R
X() → numpy.ndarray
Y() → numpy.ndarray
Z() → numpy.ndarray
__init__(vectors: Union[List[List[float]], Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray], numpy.ndarray] = None)

Initialize self. See help(type(self)) for accurate signature.

roll_pitch_yaw() → Tuple[float, float, float]

Returns the yaw, pitch and roll in radians that respresents this rotation matrix

Returns:A three element tuple of (yaw,pitch,roll). Each angle is expressed in radians.
Return type:Tuple[float,float,float]

WavelengthManager

class skimpy.instrument.wavelength_bandpass.WavelengthManager

A class that stores a list of wavelength regions used in this instrument. This provides a simplified interface to the FrontEndRadiance class. It only exposes the unique wavelengths and updates internal caches as new wavelength regions are added.

__init__()

Initialize self. See help(type(self)) for accurate signature.

add(wavelen_range: skimpy.instrument.wavelength_bandpass.Wavelength_BandPass) → int

Adds a wavelength range to the current list of wavelength ranges. This will clear any internal caches unti the next access of property unique_rtm_wavelengths

Parameters:wavelen_range – An instance of WavelengthManager that defines part of the total instrument wavelength range
Returns:The index of the wavelength region just added in the collection of regions.
Return type:int
indexunique = None

An index for each wavelength region that maps the unique wavelength array to the region’s actual wavelengths, useful for getting back_end_radiance from sasktran arrays

unique_rtm_wavelengths() → numpy.ndarray

The 1-D array of unique wavelengths derived from all of the wavelength regions in this object.

uniquewavelen = None

The list of unique wavelengths across all the wavelength regions

wavelength_indices_into_unique(wavelen: skimpy.instrument.wavelength_bandpass.Wavelength_BandPass)

Demangles the wavelengths from the unique list of wavelengths. Returns a list of indices of the wavelengths of the wavelength_Integrator object in the unique arrays used for back_end_radiance calculations. This is used when demangling the back_end_radiance returned from the Sasktran engine