lstid_processing.model.analysis
Analyse concatonated SAMI3 files.
Functions
|
Get the default indices for the C/NOFS and DMSP F16 field lines. |
|
Retrieve the index corresponding to the closest time value. |
|
Get the F2 peak locations for a specified field line. |
Get the dominant acceleration variation term indices. |
|
|
Get the variation peaks across a range of altitudes. |
|
Identify the breaks in peaks that indicate a change in wavefront. |
|
Calculate linear fits to the maxima and minima for each pass. |
Module Contents
- lstid_processing.model.analysis.get_default_indices(time_array=None, lat_array=None)[source]
Get the default indices for the C/NOFS and DMSP F16 field lines.
- Parameters:
- time_arrayarray-like or NoneType
Array of times, from which the conjugate time index may be selected.
- lat_arrayarray-like or NoneType
Array of latitudes with dimensions of time x nl x nf x nz.
- Returns:
- nlindint
SAMI3 ‘nl’ index for the C/NOFS and DMSP F16 location
- nfindcint
SAMI3 ‘nf’ index for the C/NOFS location
- nfindcint
SAMI3 ‘nf’ index for the DMSP F16 location
- ntint or NoneType
None if time_array is None, time index for the satelite conjuction otherwise
- nzindcint
None if lat_array or time_array is None; otherwise the altitude index for the C/NOFS location
- nzinddint
None if lat_array is None or time_array is None; otherwise altitude index for the DMSP F16 location
Notes
C/NOFS is at: 11.3 N, 33.2 E, 479.4 km DMSP F16 is at: 11.3 N, 33.2 E, 845.8 km Conjunction at: 26 March 2014 at 02:49:59 UT
- lstid_processing.model.analysis.get_time_index(time_array, dtime)[source]
Retrieve the index corresponding to the closest time value.
- Parameters:
- time_arrayarray-like
Array of times, from which the desired time index may be selected.
- dtimedt.datetime
Desired time as a datetime object
- Returns:
- ntint
Time index
- lstid_processing.model.analysis.get_f2_peaks(nlind, nfind, sami)[source]
Get the F2 peak locations for a specified field line.
- Parameters:
- nlindint
SAMI3 nl index for the field line
- nfindint
SAMI3 nf index for the field line
- samixr.Dataset
Dataset with SAMI3 values
- Returns:
- f2_indsdict
Dict with keys ‘south’ and ‘north’ that contain arrays of indicies corresponding to the altitude indices for the F2 peak across all times. Note that these will only be valid if the field line reaches into the topside ionosphere.
- lstid_processing.model.analysis.get_dominant_acceleration(sami)[source]
Get the dominant acceleration variation term indices.
- Parameters:
- samixr.Dataset
SAMI3 concatonated data with acceleration variation terms
- Returns:
- dom_accarray-like
Array of numbers indicating which acceleration term has the greatest variability; has values of 1, 2, and 3
Notes
1 is the plasma pressure gradient, 2 is the ion-neutral collisions, and 3 is the ion-ion collisions
- lstid_processing.model.analysis.get_topside_peaks(sami, nzinds, dat_keys, dat_scale, peak_height)[source]
Get the variation peaks across a range of altitudes.
- Parameters:
- samixr.Dataset
Dataset with SAMI3 values for the desired time period
- nzindslist-like
Lists of altitude indices at which peaks will be calculated
- dat_keyslist-like
List of data keys to evaluate, expects relative variation keys like [‘rel_dene_d’]
- dat_scalelist-like
List of scaling parameters to divide from the data
- peak_heightlist-like
List of heights that peaks must meet in order to qualify in the detection, can be None to include all peaks regardless of significance
- Returns:
- min_inddict
Dict with keys corresponding to data keys and values contianing a list of indices that locate significant peak minima
- max_inddict
Dict with keys corresponding to data keys and values contianing a list of indices that locate significant peak maxima
- lstid_processing.model.analysis.find_linear_breaks(sami, nlind, nfind, nzinds, peak_ind, lat_break=6.0, sec_break=900, max_lat=20.0)[source]
Identify the breaks in peaks that indicate a change in wavefront.
- Parameters:
- samixr.Dataset
Dataset with SAMI3 values for the desired time period
- nlindint
‘nl’ index for the relative data included in the minima and maxima data keys
- nfindint
‘nf’ index for the relative data included in the minima and maxima data keys
- nzindslist-like
Lists of altitude indices at which peaks were calculated
- peak_inddict
Dict with keys corresponding to data keys and values contianing a list of indices that locate significant peak minima or maxima
- lat_breakfloat
Change in latitude that indicates a break (default=6.0)
- sec_breakint
Change in time (seconds) that indicates a break (default=900)
- max_latfloat
Maximum latitude for data, starting point for breaks (default=20.0)
- Returns:
- peak_latdict
Latitudes corresponding to the peak indices with keys corresponding to data variables
- peak_secdict
Seconds from the starting time corresponding to the peak indices with keys corresponding to data variables
- lat_break_indsdict
Indices of the latitude breaks with keys corresponding to data variables
Notes
Only identifies North-to-South trends automatically
- lstid_processing.model.analysis.fit_lines_to_peaks(peak_lat, peak_sec, lat_break, min_pnts=40)[source]
Calculate linear fits to the maxima and minima for each pass.
- Parameters:
- peak_latdict
Latitudes corresponding to the peak indices with keys corresponding to data variables
- peak_secdict
Seconds from the starting time corresponding to the peak indices with keys corresponding to data variables
- lat_breakdict
Indices of the latitude breaks with keys corresponding to data variables
- min_pntsint
Minimum number of points needed to calculate a linear fit (default=40)
- Returns:
- lin_fitdict
Output from scipy.stats.linregress for each valid fit period