pyIntensityFeatures

Package to identify intensity features in imager data.

Submodules

Attributes

logger

__version__

Classes

AuroralBounds

Manage intensity data and obtain auroral luminosity boundaries.

Package Contents

pyIntensityFeatures.logger[source]
class pyIntensityFeatures.AuroralBounds(inst_data, time_var, glon_var, glat_var, intensity_var, alt, transpose=False, opt_coords=None, hemisphere=1, stime=None, etime=None, slice_func=satellites.get_auroral_slice, slice_kwargs=None, clean_func=None, clean_kwargs=None)[source]

Bases: object

Manage intensity data and obtain auroral luminosity boundaries.

Parameters:
inst_dataobject

Instrument data of any type (e.g., pysat.Instrument, xr.Dataset, pds.DataFrame, dict of arrays) with appropriate observations.

time_varstr or int

Time key, attribute, variable name, or index

glon_varstr

Geographic longitude key, attribute, variable name, or index

glat_varstr

Geographic latitude key, attribute, variable name, or index

intensity_varstr

Observed intensity key, attribute, variable name, or index

altfloat or int

Altitude in km at which the aurora is observed

transposebool or dict

Flag that indicates whether or not the 2D data accessed by glon_var, glat_var, and intensity_var needs to be transposed. If a dict is supplied, the keys should correspond the the different variable names and allows different flags for each set of data. (default=False)

opt_coordsdict or NoneType

Dict of coordinates to include in boundaries or None to only have the required coordinates (default=None)

hemipshereint

Integer denoting hemisphere, 1 for North and -1 for South (default=1)

stimeobject or NoneType

Time object or None to use earliest time from inst_data (default=None)

etimeobject or NoneType

Time object or None to use latest time from inst_data (default=None)

slice_funcfunction

Appropriate function to retrieve an auroral image slice (default=pyIntensityFeatures.instruments.satellites.get_auroral_slice)

slice_kwargsdict or NoneType

Kwargs to be used by slice_func (default=None)

clean_funcfunction or NoneType

Appropriate function to clean the intensity data (default=None)

clean_kwargsdict or NoneType

Kwargs to be used by clean_func (default=None)

Attributes:
inst_data
time_var
glon_var
glat_var
intensity_var
alt
opt_coords
hemipshere
stime
etime
slice_func
clean_func
boundariesxr.Dataset or NoneType

Dataset with Auroral Luminosity Boundaries or NoneType if not run

Methods

set_boundaries

Set the boundaries attribute using the assigned data.

update_times

Update stime and etime attributes to reflect current data in inst_data, if available.

inst_data
property alt

Altitude in km at which the intensity data is located.

time_var
glon_var
glat_var
intensity_var
property hemisphere

Hemisphere for data processing (1 for North, -1 for South).

property stime

Starting time for loaded data.

property etime

Ending time for loaded data.

boundaries = None
__eq__(other)[source]

Perform equality check.

Parameters:
otherany

Other object to compare for equality

Returns:
bool

True if objects are identical, False if they are not.

__repr__()[source]

Print basic class properties.

__str__()[source]

Descriptively print the class properties.

_get_variable(var)[source]

Get the data variable data as an array from the data object.

Parameters:
varstr

Data variable name

Returns:
ret_data :array-like

numpy array of the desired data.

Notes

Uses the transpose attribute to determine whether or not returned data will be transposed.

set_boundaries(min_mlat_base=59.0, mag_method='ALLOWTRACE', mlat_inc=1.0, mlt_inc=0.5, un_threshold=1.25, dayglow_threshold=300.0, strict_fit=False, lt_out_bin=5.0, max_iqr=1.5)[source]

Set boundaries with auroral boundaries from intensity data.

Parameters:
min_mlat_basefloat

Base minimum co-latitude for intensity profiles. (default=59.0)

methodstr

Method for converting between geographic and magnetic coordinates. (default=’ALLOWTRACE’)

mlat_incfloat

Magnetic latitude increment for gridding intensity. (default=1.0)

mlt_incfloat

Magnetic local time increment for gridding intensity. (default=0.5)

un_thresholdfloat

Maximum acceptable uncertainty value in degrees (default=1.25)

dayglow_thresholdfloat

Maximum allowable background intensity value in Rayleighs (default=300.0)

strict_fitbool

Enforce positive values for the x-offsets in quadratic-Gaussian fits (default=False)

lt_out_binfloat

Size of local time bin in hours over which outliers in the data will be identified (default=5.0)

max_iqrfloat

Maximum multiplier for the interquartile range (IQR) used to identify outliers above or below the upper or lower quartile (default=1.5)

Notes

Luminosity boundary identification finding and verification based on, but not identical to, the method developed by Longden, et al. (2010).

References

Longden, N. S., et al. (2010) Estimating the location of the open-closed magnetic field line boundary from auroral images, 28 (9), p 1659-1678, doi:10.5194/angeo-28-1659-2010.

update_times()[source]

Update stime and etime based on potentially updated data.

pyIntensityFeatures.__version__[source]