FrontEndOptics¶
The FrontEndOptics class defines the front end optics. It includes storing the fields-of-view and spectral point spread functions that define each pixel.
Users can choose to use the Instrument class as-is or they can use it as a base class and derive their own instrument class. Either option works and its a matter of personal preference.
-
class
FrontEndOptics
¶ This class is used to model the front-end optics of an instrument. It is implemented as an array of
SpectralWindow
objects stored inside this class. EachSpectralWindow
defines a specific front-end field of view and wavelength definition. Most users will only useadd_spectral_window
.-
add_field_of_view
(fov: skimpy.instrument.fov.FOV) → int¶ Add the given field of view to the front end optics object. Return the index of the field of view. This index can be used when creating spectral windows for this instrument. This method is automatically invoked by
add_spectral_window
if aFOV
object is passed in.- Parameters
fov (FOV) – This field of view object is added to the front end optics. The user should assume this field of view object has been given to the instrument and they should not modify the object after the call.
- Returns
The index of this field of view in the instrument. This index can be used when creating spectral_windows for this instrument which use this field of view
- Return type
int
-
add_spectral_window
(window: skimpy.instrument.spectralwindow.SpectralWindow) → int¶ Add the given spectral_window to the front end optics. Returns the index of the spectral_window in the front end optics.
- Parameters
window (SpectralWindow) – This spectral_window is added to the front end optics. The user should assume this spectral_window object has been given to the instrument and should ensure they do not modify the object after the call.
- Returns
The index of this spectral point spread function in the front en optics. This index can be used when creating spectral_windows for this instrument which use this spectral point spread function
- Return type
int
-
add_wavelength_range
(wavelen_range: skimpy.instrument.wavelengthdefinition.WavelengthDefinition) → int¶ Add the given wavelength definition to the front end optics. Return the index of the spectral point spread functions. This index is used when creating spectral windows for this instrument. This method is automatically invoked by
add_spectral_window
if aWavelengtHdefinition
object is passed in.- Parameters
wavelen_range (WavelengthDefinition) – This wavelength definition object is added to the front end optics. The user should assume this wavelength definition has been given to the instrument and they should not modify the object after the call.
- Returns
The index of this wavelength definition instance in the front end optics. This index is used when creating spectral windows for the front end otpics.
- Return type
int
-
property
fovs
¶ The container for all of the field-of-views stored in this instrument.
- Returns
Returns the field-of-view manager that stores all the field of views in this instrument.
- Return type
-
lines_of_sight
() → numpy.ndarray¶ The array of instantaneous lines of sight used in this instrument. Returns a 2-d array (3,N). The first dimension provides each line of sight expressed as a unit vector (X,Y,Z) in the Instrument Control Frame.
X is typically along the instrument bore sight/optical axis away from the instrument.
Y is typically parallel to the long direction of a slit in spectrographs
- Z is typically parallel to the short direction of a slit in a spectrograph and is
close/aligned to the local vertical direction in limb viewing geometries.
- Returns
An array (3,N) that specifies all the lines of sight stored in this instrument. All lines of sight are returned as unit vectors in the FrontEndOptics Control Frame
- Return type
np.ndarray
-
property
num_spectral_windows
¶ Returns the number of spectral_windows in this FrontEndOptics class
- Returns
The number of spectral_windows in this FrontEndOptics class
- Return type
int
-
property
numsamples
¶ Returns the number of time samples in each spectral_window. It is only valid after the radiative transfer model has been called.
-
property
spectral_windows
¶ The collection of spectral_windows in this instrument. The SpectralWindowManager class is both indexable and iterable and can be used as if it were a regular list object.
- Returns
returns the spectral_window manager that stores a list of spectral_windows
- Return type
SpectralWindowManager
-
unique_wavelengths
() → numpy.ndarray¶ The array of unique wavelengths derived from all of the wavelength ranges stored in this front end optics object. Each returned wavelength is specified in nanometers. Providing a list of unique wavelengths can provide a major computational saving when executing radiative transfer calculations. The objects internal to the FrontEndOptics class know how to map the sasktran calculated back_end_radiance back to the original spectral_windows.
- Returns
An array (N) that specifies all the unique wavelength used in this instrument. All wavelengths are in nanometers
- Return type
np.ndarray(N)
-
property
wavelength_manager
¶ The container for all of the wavelength ranges stored in this instrument.
- Returns
returns the wavelength manager that stores all the wavelength regions in this instrument
- Return type
-
SpectralWindow¶
The spectral window is a key concept within the skimpy framework as it is used to build all instruments. Each spectral window is a combination of a solid angle area, taken from the front of the optics, and a range of wavelengths. In simple studies, users may choose to represent the solid angle area with one centrally located, line of sight and one wavelength while, in more complicated cases, users may choose to subdivide the solid angle area into multiple lines of sight and the wavelength range into many wavelengths.
-
class
SpectralWindow
(frontendoptics: FrontEndOptics, fov_index: Union[int, skimpy.instrument.fov.FOV], wavelen_index: Union[int, skimpy.instrument.wavelengthdefinition.WavelengthDefinition])¶ SpectralWindow objects are elements within the front-end optics model that combine an instantaneous field of view with a wavelength definition.
-
clone
() → skimpy.instrument.spectralwindow.SpectralWindow¶ Creates a copy of this object. This is used when creating storage for radiance values at the end of a radiative transfer calculation.
-
property
fov
¶ Returns the field of view of this spectral window. The field of view defines the high resolution lines of sight used for the radiative transfer calculations.
- Returns
The field of view used by this SpectralWindow
- Return type
-
property
wavelength_definition
¶ Returns the wavelength definition object used by this spectral window.
-
wavelength_range
() → Tuple[float, float]¶ Returns the range of wavelengths used by this spectral window as two element tuple.
-
FOV¶
-
class
FOV
¶ A base class used to define the solid angle of a field of view in the front end optics. This class provides the quadrature infrastructure to allow integration of signals over the field of view. There are relatively few constraints on the system, for example the field of view could be rectangular for a slit or detector spectral_window or it may be circular for round detectors. see
FOV_Rectangle
for an implementation of a rectangular field of view.-
central_los_icf
() → numpy.ndarray¶ Returns the unit vector of the central line of sight associated with this field of view. This is considered to be the nominal pointing direction of this entire field of view.
- Returns
The unit vector of the central line of sight. This is a 3 element array specified in the Instrument Control Frame
- Return type
np.ndarray (3)
-
lines_of_sight_in_icf
() → numpy.ndarray¶ Returns the lines of sight that span this field of view.
- Returns
Returns the N unit vectors of the lines of sight that span this field of view. Each unit vector is specified in the Instrument Control Frame.
- Return type
np.ndarray (3,N)
-
quadrature_weights
() → numpy.ndarray¶ Returns the N quadrature weights associated with the N lines of sight that span this field of view.
- Returns
The quadrature weights of the N lines of sight that span this field of view. The quadrature weights should be normalized so they sum to unity.
- Return type
np.ndarray (N)
-
abstract
solid_angle
()¶ ” Returns ths solid angle of this field of view.
- Returns
The solid angle of this field of view. This can be used to convert averaged back_end_radiance to photons
- Return type
float
-
See also
class FOV_Rectangle
FOV_Rectangle¶
-
class
FOV_Rectangle
(Hrange: Optional[Tuple[int, float, float]] = None, Hvalues: Optional[numpy.ndarray] = None, Vrange: Optional[Tuple[int, float, float]] = None, Vvalues: Optional[numpy.ndarray] = None)¶ A class used to represent a rectangular field of view. The class provides lines of sight that span the field of view and may be used to numerically integrate radiance across the field of view. The rectangular field of view is specified with angular sizes in the front entrance aperture. The horizontal dimension of the slit is parallel to \(\hat{y}_{ICF}\) in the Instrument Control Frame and the vertical dimension is parallel to \(\hat{z}_{ICF}\). All sizes and spacings of the rectangular field of view are specified in radians. The quadrature normalization is setup up so the sum of the quadrature weights will give the solid angle area of the rectangular region.
- Parameters
Hrange (Tuple[int, float, float]) – A three element tuple that provides (
N
,H_centre
andH_width
) for the horizontal dimension of the field of view. All angles are expressed in radians. These three numbers configure the field of view withN
evenly spaced trapezoidal integration points in the horizontal direction. A line of sight is generated at each quadrature point.N
is the number of steps used in evenly spaced trapezoidal integration across the horizontal direction and must be greater than 0. Note that an odd number of points will place a line of sight at the center of the field-of-view in the horizontal direction.H_centre
is the horizontal center of this rectangular field of view in the Instrument Control Frame expressed in radians. The angles are applied as a right-handed yaw around the \(\hat{z}_{ICF}\).H_width
is the full angular width of the field of view in the horizontal direction in the Instrument Control Frame expressed in radians. Half of the width is to the left of the centre and half of the width is to the right of the centre. TheHvalues
optional argument must not be set.Hvalues (np.ndarray) – An array (Nh) of horizontal angular values that specify the location of quadrature points across the horizontal dimension of the rectangular field of view. All elements are expressed in radians and the elements in the array do not need to be evenly spaced. There should be at least 2 elements. If you need only 1 element then use the
Hrange
option. The first and last element are assumed to specify the full width of the slit and there is no contribution to the integrated signal from outside these ranges: i.e. the numerical integration is fromHvalues[0]
toHvalues[-1]
. All values in the array are expressed as radians and are applied as a right-handed yaw around the \(\hat{z}_{ICF}\). Lines of sight will be generated for each point in the horizontal array. TheHrange
optional arguments must not be set.Vrange (Tuple[int, float,float]) – A three element tuple (
N
,V_centre
andV_width
) that describes the vertical dimension of the field of view. All angles are expressed in radians These three numbers configure the field of view withN
evenly spaced trapezoidal integration points in the vertical direction. A line of sight is generated at each quadrature point.N
must be greater than 0 and is the number of steps used in evenly spaced trapezoidal integration across the vertical direction. Note that an odd number of points will place a line of sight at the center of the field-of-view in the vertical direction.V_centre
is the vertical center of the rectangular field of view in Instrument Control Frame. It is expressed in radians and is applied as a left-handed pitch rotation around the \(\hat{y}_{ICF}\), this is intentional so positive values will orient \(\hat{x}_{ICF}\) upwards.V_width
is the full angular height of the field of view in the vertical direction in the Instrument Control Frame expressed in radians. TheVvalues
optional argument must not be set.Vvalues (np.ndarray) – An array (Nv) of vertical angular values that specify the location of quadrature points across the vertical dimension of the rectangular field of view. The elements of the array are in radians and do not need to be evenly spaced but there should be at least 2 elements. If you need only 1 elements then use the
Vrange
option. The first and last element are assumed to specify the full height of the slit and there is no contribution to the integrated signal from outside these ranges: i.e. the numerical integration is fromVvalues[0]
toVvalues[-1]
. All values in the array are expressed as radians and are applied as a left-handedpitch
around the \(\hat{y}_{ICF}\). Lines of sight will be generated for each point in the horizontal array. The other optional arguments controlling the vertical field of view,Vrange
, must not be set.
-
solid_angle
()¶ ” Returns the solid angle of the field of view. Factor that will convert solid angle averaged back_end_radiance (photons/nm/sec/ster) to photons/sec/nm by applying the total solid angle area.
- Returns
The factor that converts area averaged back_end_radiance to photons
- Return type
float
WavelengthDefinition¶
-
class
WavelengthDefinition
(wavelengths: Optional[Union[numpy.ndarray, Sequence, float]] = None)¶ This is the base class that defines the wavelengths (in nanometers) used in the skimpy radiative transfer models to calculate high resolution front-end radiances.
-
change_rtm_wavelengths_for_solar_preconvolution
(support_solar_preconvolve: bool)¶ Reserved for internal usage.
This method lets the FrontEndRadianceGenerator notify the WavelengthDefinition instance that it will be used for a solar pre-convolution calculation. This is useful in the UVIS-NIR region when the TOA Albedo hardly changes across ta wavelength definition region and the RTM can be approximated by a single wavelength calculation multiplied by the solar spectrum convolved with the instrument point spread function. A default, no-op method is implemented in this base class but proper implementations that change the wavelengths used by the RTM are to be fouind in classes deriving from
WavelengthDefinitionSRF
- Parameters
support_solar_preconvolve (bool) – If True then solar preconvolution is being executed so set the wavelengths field to a single wavelength value. If False then solar preconvolution is not being used and normal operation should be applied.
-
set_wavelengths
(wavelen_nm: Union[numpy.ndarray, Sequence, float])¶ Sets the wavelengths used by the skimpy radiative transfer models to calculate front-end radiances. In practice, the front end radiance generator may modify this list if it has special modes (eg.
preconvolved_solar
) but otherwise it perform radiative transfer calculations at the given wavelengths. Users should choose wavelength values that are suitable for their needs. Too few wavelengths and radiative transfer calculations will be fast but subsequent integrations may be too inaccurate. Conversely, too many wavelengths and radiative transfer calculations may be excessively long although subsequent integrations will be accurate.- Parameters
wavelen_nm (array, Sequence of number.) – The array of wavelengths in nanometers that will be used to define this wavelength range. These wavelengths will normally define the wavelengths actually calculated in the front-end radiance generator.
-
wavelength_range
() → Tuple[float, float]¶ Returns the minimum and maximum wavelengths spanning the array of wavelengths.
- Returns
Returns a two element tuple or None. The first element of the tuple is the minimum wavelength. The second element is the maximum wavelength. Both values may be the same. None is returned if no wavelength array has been set.
- Return type
Tuple[ float, float]
-
property
wavelengths
¶ Returns the wavelengths in this wavelength definition. These wavelengths are the values used by the radiative transfer code to calculate signals.
- Returns
The array of wavelengths in nanometers, one entry for each quadrature point.
- Return type
np.ndarray
-
WavelengthGaussianSRF¶
-
class
WavelengthGaussianSRF
(N: int, lambda0: float, fwhm: float, max_bound_in_sigmas=5)¶ Define a Gaussian spectral response function. This class uses evenly spaced wavelengths across the Gaussian distribution and specialized quadrature from the skretrievals package to accurately perform weighted integration across the distribution.
-
change_rtm_wavelengths_for_solar_preconvolution
(support_solar_preconvolve: bool)¶ Internal use only. This is invoked by the Front End Radiance Generator
-
convolve_srf_with_highres_solar_irradiance
(solar_fwhm: float, solar_wavelen: numpy.ndarray, solar_irradiance: numpy.ndarray) → float¶ Reserved for internal usage: Convloves the gaussian point spread function with the incoming solar irradiance. This overloads the method defined in
WavelengthDefinitionSRF
and is used for calculating pre-convolved solar spectra for the front end radiance.
-
property
fwhm
¶ Returns the FWHM max of this wavelength definition object
-
property
sigma
¶ Returns the standard deviation of this wavelength definition object
-
solar_convolution_nominal_bounding_wavelengths
() → Tuple[float, float]¶ Reserved for internal usage: Returns the range of wavelengths used by this wavelength definition. It is used for solar convolution calculations to reduce the number of solar wavelengths passed around. It overloads the the base method defined in
WavelengthDefinitionSRF
and is used when preforming pre-convolved solar spectra for the front end radiance.
-
spectral_response_function
(wavelen: numpy.ndarray, sigma=None) → numpy.ndarray¶ Returns the gaussian values at the given wavelengths. This overloads the method defined in
WavelengthDefinitionSRF
and is used when preforming pre-convolved solar spectra for the front end radiance.- Parameters
wavelen (np.ndarray) – An array of wavelengths (in nanometers).
sigma (float) – Optional. Allows the user to enter a different standard deviation. This is provided for solar pre-convolution calculations where we need to account for the SRF of the actual instrument used to measure the solar spectral irradiance. Most users will leave this value as the default value of None
- Returns
- Return type
An array the same size as
wavelen
but contains the gaussian distribution values
-
WavelengthUserdefinedSRF¶
-
class
WavelengthUserdefinedSRF
(srf: numpy.ndarray, wavelen: numpy.ndarray, central_wavelength=None)¶ Perform convolutions using a user defined spectral response function. This class has user defined wavelengths distributed across a user-defined spectral reponse function. It uses trapezoidal integration to integrate across the distribution (for
preconvoled_solar
mode for example).-
change_rtm_wavelengths_for_solar_preconvolution
(support_solar_preconvolve: bool)¶ Reserved for internal usage
-
convolve_srf_with_highres_solar_irradiance
(solar_fwhm: float, solar_wavelen: numpy.ndarray, solar_irradiance: numpy.ndarray) → float¶ Reserved for internal usage.
Convolves the solar irradiance at
target_wavelength
with this user defined SRF. srf. This is used bySolarIrradiance
during solar pre-convolution calculations. It allows the solar irradiance to limit the number of high resolution solar irradiance samples processed.- Parameters
target_wavelen_nm (float) – The central wavelength in the solar spectrum at which convolved signals will be generated.
solar_fwhm (float) – The FWHM of the high resolution solar spectrum. This parameter is ignored in this objects implementation
solar_wavelen (np.ndarray) – An array of high resolution solar wavelengths that should span the range of wavelengths required for the SRF under normal conditions. It is possible under abnormal conditions that
-
solar_convolution_nominal_bounding_wavelengths
() → Tuple[float, float]¶ Reserved for internal usage.
Calculates the range of wavelengths that would be used to perform a convolution integral with this user defined srf. This is used by
SolarIrradiance
during solar pre-convolution calculations. It allows the solar irradiance to limit the number of high resolution solar irradiance samples processed.
-
spectral_response_function
(wavelen: numpy.ndarray) → numpy.ndarray¶ Returns the spectral response function at the given wavelengths. This implementation provides linear interpolation of the arrays given in the constructor
- Parameters
wavelen (array(N)) – An array of N wavelengths in nanometers.
- Returns
An array the same size as parameter
wavelen
containing the spectral response function for each wavelength.- Return type
np.ndarray(N)
-
FrontEndRadianceGenerator¶
-
class
FrontEndRadianceGenerator
¶ The base class for front-end radiance generators.
-
abstract
calculate_radiance
(front_end_optics: skimpy.instrument.frontendoptics.FrontEndOptics, platform: skplatform.platform.platform.Platform, atmosphere: Optional[sasktran.atmosphere.Atmosphere], **kwargs)¶ Calculate the front-end radiance for the given conditions.
- Parameters
front_end_optics (FrontEndOptics) – The skimpy front_end_optics description. This provides a list of Spectral Windows.
platform (Platform) – The Platform object which is used to generate observer positions, times and look vectors.
atmosphere (Atmosphere) – The Sasktran atmosphere used in the radiative transfer calculation
kwargs (Dict[str,Any]) – Specialized keywords for derived classes. keyword parameters are specific to the derived classes and some are mandatory for some front-end radiance generators. You must not assume that providing no keywords will result in sensible default operations, it will not.
-
static
copy_lines_of_sight_to_sasktran_geometry
(posgeo: numpy.ndarray, losgeo: numpy.ndarray, utc: numpy.ndarray, geometry_options: Dict[str, Any]) → sasktran.geometry.Geometry¶ Copies the platform positions, lines of sight and times to the Sasktran LineOFSight object
- Parameters
posgeo (np.ndarray (3,Nlos,Nt)) – The position of the platform for all lines of sight and times
-
static
position_lookdirection_time_generator
(platform: skplatform.platform.platform.Platform, front_end_optics: skimpy.instrument.frontendoptics.FrontEndOptics) → Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]¶ Makes all the positions, lines of sight and utc times from all of the exposures/samples in one observation set that are required for the call to the Sasktran radiative transfer model. The line of sight information is generally high resolution info passed onto the Sasktran while the position and utc information is normally used to make Level 1 products.
- Parameters
platform (Platform) – The platform making the observation set.
front_end_optics (FrontEndOptics) – The front_end_optics making the observations.
- Returns
A 3 element tuple containing the geocentric observer position, the geocentric look vectors and the utc of the observation. Nlos is the number of instantaneous lines of sight in the field of views and Ntimes is the number of time samples
The first element is the geographic geocentric ECEF position of observer for all samples and instantaneous lines of sight, array( 3, Nlos, Ntimes )
The second element is the geographic geocentric ECEF look vector for all samples and instantaneous lines of sight, array( 3, Nlos, Ntimes)
The third element is the utc time for all samples and instantaneous lines of sight of numpy.datetime64 or float array (Nlos, Ntimes)
- Return type
Tuple[ np.ndarray, np.ndarray, np.ndarray]
-
abstract
FrontEndRadianceGeneratorIR¶
-
class
FrontEndRadianceGeneratorIR
¶ This class is used for IR based radiative transfer calculations. This is generally taken to be the regime where solar irradiance is negligible and thermal emissions are important, i.e. wavelengths longer than 4 microns.
FrontEndRadianceGeneratorHR¶
-
class
FrontEndRadianceGeneratorHR
(solar_spectrum: str = 'SAO2010', geometry_options: Optional[Dict[str, Any]] = None, sasktran_options: Optional[Dict[str, Any]] = None, sasktranif_options: Optional[Dict[str, Any]] = None)¶ The FrontEndRadianceGenerator class based upon the Sasktran HR radiative transfer model. This model solves for multiple scattering in a spherical atmosphere using a successive orders technique. It is well suited for radiative transfer calculations in the UVIS and NIR spectral regions and has many internal optimizations that allow it to be used for both limb and nadir calculations as well as many other scenarios.
-
calculate_radiance
(front_end_optics: skimpy.instrument.frontendoptics.FrontEndOptics, platform: skplatform.platform.platform.Platform, atmosphere: sasktran.atmosphere.Atmosphere, toa_albedo_to_radiance_method: str = '', generate_unit_transmission_spectra=False, apply_solar_spectra_to_weighting_functions=True) → List[skimpy.instrument.radiance_values.RadianceValues]¶ The primary interface into the Sasktran HR Radiative Transfer model for UVIS NIR calculations. This code calculates the front-end radiance for a set of spectral_windows.
Internally the code has to mangle the instantaneous lines of sight and wavelengths from all samples and all spectral_windows into structures suitable for one call to Sasktran. It then has to unmangle the values returned by Sasktran and distribute the signals to internal fields within each spectral_window. Sasktran calculations for the UVIS-NIR regime always return top-of-the-atmosphere (toa) albedo and may also return weighting functions depending upon user configuration options. The code multiplies the TOA Albedo calculated by Sasktran with the solar irradiance to get radiance.
- Parameters
front_end_optics (FrontEndOptics) – The skimpy FrontEndOptics object. This provides a list of Spectral Windows.
platform (Platform) – The Platform object which is used to generate observer positions, times and look vectors.
atmosphere (Atmosphere) – The Sasktran atmosphere used in the radiative transfer calculation
toa_albedo_to_radiance_method (str) – Identifies the type of processing used to convert toa albedo to radiance. This keyword option is mandatory and should be set to one of interpolate_user_to_solar_wavelengths, interpolate_solar_to_user_wavelengths or preconvolved_solar. See UVIS-NIR: TOA Albedo to Radiance Methods for more detailed explanantions.
generate_unit_transmission_spectra (bool) – Default False. If True then dont call the sasktran engine and just assign unity to all TOA albedo values, i.e. simulates no atmosphere. This is useful if simulating above atmosphere calculations and is also useful for debugging code as it avoids the long calls to the sasktran engine. It will not provide polarized or weighting function arrays.
apply_solar_spectra_to_weighting_functions (bool) – Default True. If True then the solar spectrum is applied to any weighting functions calculated by the sasktran engine. If False then the solar spectrum is not applied to weighting functions. This is useful if the user is calculating weighting functions for the TOA Albedo.
- Returns
Platform ECEF geographic geocentric position in meters for each sample, array (3, Nt)
SpectralWindow central line of sight in ECEF for each spectral_window in each sample, array (3, Nwin, Nt)
UTC time used for each sample, array( Nt ) of np.datetime64 or possibly float if MJD is being used
Central wavelength of each spectral_window for each sample, array (Nwin, Nt)
- Return type
Tuple[ np.ndarray, np.ndarray, np.ndarray, np.ndarray]
-
engine
() → sasktran.engine.Engine¶ Returns the Sasktran engine used for the last radiative calculations. Useful for extracting extra properties and features from the engine that were used in the last radiative calculation. Note that the internal engine is overwritten in the next call to calculate_radiance.
- Returns
The engine used in the last radiative transfer calculation. Will be None if no calculation has been made.
- Return type
sk.Engine
-
Helper Functions¶
-
average_radiance_values
(signals: List[skimpy.instrument.radiance_values.RadianceValues], measurement_binning: int = - 1) → List[skimpy.instrument.radiance_values.RadianceValues]¶ Averages the list of signals returned by the
FrontEndRadianceGenerator
and returns a similar list except all the signals have been averaged. The code only averages over the measurement samples dimensions and is useful for scenarios involving micro-time steps so the user can calculate the average signal observed over an exposure.The function provides the ability to sample on
N
consecutive samples in the sample dimension using parametermeasurement_binning
. For example, if 500 samples are calculated by the FrontEndRadianceGenerator thenmeasurement_binning
could be set to 10 in which every 10 consecutive values are averaged to produce 50 averaged samples. The current algorithm requires that all arrays are C_CONTIGUOUS. This is actively checked and an exception thrown if not true.It is the user’s responsibility to ensure that the platform configuration used for the FrontEndRadianceGenerator calculations is appropriate for the requested averaging.
- Parameters
signals (List[RadianceValues]) – The list of RadianceValues returned by a FrontEndRadianceGenerator. The radiance value in each RadianceValues struture is an array of [wavelength, los, samples]
measurement_binning (int) – An integer specifying the number of consecutive samples to average in the sample dimension of each array in the RadianceValues struture. The user must ensure the total number of samples is an exact multiple of this value.
- Returns
A list of RadianceValues which contain averaged values. The RadianceValues will actually be the same derived RadianceValues class as the input classes
- Return type
List[RadianceValues]