geoips.plugins.modules.algorithms package#
Subpackages#
- geoips.plugins.modules.algorithms.pmw_tb package
- geoips.plugins.modules.algorithms.sfc_winds package
- geoips.plugins.modules.algorithms.visir package
- Submodules
- geoips.plugins.modules.algorithms.visir.Convective_Storms module
- geoips.plugins.modules.algorithms.visir.Day_Microphys_Summer module
- geoips.plugins.modules.algorithms.visir.Day_Microphys_Winter module
- geoips.plugins.modules.algorithms.visir.Day_Solar module
- geoips.plugins.modules.algorithms.visir.Dust_RGB module
- geoips.plugins.modules.algorithms.visir.Natural_Color module
- geoips.plugins.modules.algorithms.visir.Night_Microphys module
- geoips.plugins.modules.algorithms.visir.Night_Vis module
- geoips.plugins.modules.algorithms.visir.Night_Vis_GeoIPS1 module
- geoips.plugins.modules.algorithms.visir.Night_Vis_IR module
- geoips.plugins.modules.algorithms.visir.Night_Vis_IR_GeoIPS1 module
- geoips.plugins.modules.algorithms.visir.Volcanic_Ash module
- geoips.plugins.modules.algorithms.visir.airmass module
- geoips.plugins.modules.algorithms.visir.nasa_dust_rgb module
- Module contents
Submodules#
geoips.plugins.modules.algorithms.RGB_Default module#
Data manipulation steps for “Night_Vis_IR” product.
This algorithm expects two VIIRS channels (DNBRad and M16BT) for a RGB image
- geoips.plugins.modules.algorithms.RGB_Default.call(arrays)[source]#
Apply default RGB algorithm.
Plots RGB with the red gun being the first variable specified in the product YAML, green second, and blue third.
Note this is currently entirely unused, and is included here for reference/completeness. Eventually we may want to fully support this generalized RGB default algorithm, where you can pass in ranges, channel combinations, etc for RGB output, but for now it will ONLY plot arrays 0, 1, 2 as red, green, blue respectively, with no adjustments/combinations.
- Parameters:
arrays (list of numpy.ndarray) –
- list of numpy.ndarray or numpy.MaskedArray of channel data,
in order of sensor “channels” list
- Returns:
numpy.ndarray or numpy.MaskedArray of qualitative RGBA image output
- Return type:
numpy.ndarray
geoips.plugins.modules.algorithms.absdiff_mst module#
Data manipulation steps for standard absolute difference algorithm.
Generalized algorithm to calculate the difference between 1 or 2 variables taken from multiple scan times over the same sector.
- geoips.plugins.modules.algorithms.absdiff_mst.call(xobj, variables, product_name, output_data_range=None, input_units=None, output_units=None, min_outbounds='crop', max_outbounds='crop', norm=False, inverse=False, sun_zen_correction=False, mask_night=False, max_day_zen=None, mask_day=False, min_night_zen=None, gamma_list=None, scale_factor=None)[source]#
Apply data range and requested corrections to an absdiff product.
Data manipulation steps for applying a data range and requested corrections to a single channel productn absdiff product.
- Parameters:
xobj (xarray.Dataset) –
input xarray.Dataset used for data manipulation.
variables (list of str) –
list of strings representing the variables used to produce ‘product_name’
product_name (str) –
String representing the product produced by this algorithm, using variables from ‘xobj’
output_data_range (list of float, default=None) –
list of min and max value for output data product.
This is applied LAST after all other corrections/adjustments
If None, use data min and max.
input_units (str, default=None) –
Units of input data, for applying necessary conversions
If None, no conversion
output_units (str, default=None) –
Units of output data, for applying necessary conversions
If None, no conversion
min_outbounds (str, default='crop') –
Method to use when applying bounds. Valid values are:
retain: keep all pixels as is
mask: mask all pixels that are out of range
crop: set all out of range values to either min_val or max_val as appropriate
max_outbounds (str, default='crop') –
Method to use when applying bounds. Valid values are:
retain: keep all pixels as is
mask: mask all pixels that are out of range
crop: set all out of range values to either min_val or max_val as appropriate
norm (bool, default=False) –
Boolean flag indicating whether to normalize (True) or not (False)
If True, returned data will be in the range from 0 to 1
If False, returned data will be in the range from min_val to max_val
inverse (bool, default=False) –
Boolean flag indicating whether to inverse (True) or not (False)
If True, returned data will be inverted
If False, returned data will not be inverted
sun_zenith_correction (bool, default=False) –
Boolean flag indicating whether to apply solar zenith correction (True) or not (False)
If True, returned data will have solar zenith correction applied (see data_manipulations.corrections.apply_solar_zenith_correction)
If False, returned data will not be modified based on solar zenith angle
Notes
Order of operations, based on the passed arguments, is:
Mask night
Mask day
Apply solar zenith correction
Apply gamma values
Apply scale factor
Convert units
Apply data range.
NOTE: If “norm=True” is specified, the “output_data_range” will NOT match the actual range of the returned data, since the normalized data will be returned between 0 and 1.
If you require a different order of operations than that specified within “single_channel” algorithm, please create a new algorithm for your desired order of operations.
- Returns:
numpy.ndarray or numpy.MaskedArray of appropriately scaled channel data, in units “output_units”.
- Return type:
numpy.ndarray
geoips.plugins.modules.algorithms.single_channel module#
Data manipulation steps for standard “single_channel” algorithm.
Generalized algorithm to apply data manipulation steps in a standard order to apply corrections to a single channel output product.
- geoips.plugins.modules.algorithms.single_channel.call(arrays, output_data_range=None, input_units=None, output_units=None, min_outbounds='crop', max_outbounds='crop', norm=False, inverse=False, sun_zen_correction=False, mask_night=False, max_day_zen=None, mask_day=False, min_night_zen=None, gamma_list=None, scale_factor=None, satellite_zenith_angle_cutoff=None)[source]#
Apply data range and requested corrections to a single channel product.
Data manipulation steps for applying a data range and requested corrections to a single channel product
- Parameters:
arrays (list of numpy.ndarray) –
list of numpy.ndarray or numpy.MaskedArray of channel data
MUST be length one for single_channel algorithm.
If applying solar zenith corrections and diurnal masking, the second index in the arrays list must be the solar zenith angle array. This is controlled in product YAML.
If applying a satellite zenith angle cutoff, the final index in the arrays list must be the satellite zenith angle array. This is controlled in the product YAML.
output_data_range (list of float, default=None) –
list of min and max value for output data product.
This is applied LAST after all other corrections/adjustments
If None, use data min and max.
input_units (str, default=None) –
Units of input data, for applying necessary conversions
If None, no conversion
output_units (str, default=None) –
Units of output data, for applying necessary conversions
If None, no conversion
min_outbounds (str, default='crop') –
Method to use when applying bounds. Valid values are:
retain: keep all pixels as is
mask: mask all pixels that are out of range
crop: set all out of range values to either min_val or max_val as appropriate
max_outbounds (str, default='crop') –
Method to use when applying bounds. Valid values are:
retain: keep all pixels as is
mask: mask all pixels that are out of range
crop: set all out of range values to either min_val or max_val as appropriate
norm (bool, default=False) –
Boolean flag indicating whether to normalize (True) or not (False)
If True, returned data will be in the range from 0 to 1
If False, returned data will be in the range from min_val to max_val
inverse (bool, default=False) –
Boolean flag indicating whether to inverse (True) or not (False)
If True, returned data will be inverted
If False, returned data will not be inverted
sun_zenith_correction (bool, default=False) –
Boolean flag indicating whether to apply solar zenith correction (True) or not (False)
If True, returned data will have solar zenith correction applied (see data_manipulations.corrections.apply_solar_zenith_correction)
If False, returned data will not be modified based on solar zenith angle
satellite_zenith_angle_cutoff (float, default=None) –
Cutoff for masking data where satellite zenith angle exceeds threshold
If None, no masking
Notes
Order of operations, based on the passed arguments, is:
Mask night
Mask day
Apply satellite zenith angle cutoff
Apply solar zenith correction
Apply gamma values
Apply scale factor
Convert units
Apply data range.
NOTE: If “norm=True” is specified, the “output_data_range” will NOT match the actual range of the returned data, since the normalized data will be returned between 0 and 1.
If you require a different order of operations than that specified within “single_channel” algorithm, please create a new algorithm for your desired order of operations.
- Returns:
numpy.ndarray or numpy.MaskedArray of appropriately scaled channel data, in units “output_units”.
- Return type:
numpy.ndarray
Module contents#
geoips algorithms init file.