lstid_processing.smoothing.fill_rout
Data filtering routines, specifically designed to support TID analysis.
Functions
|
Pad instances of unspecified or bad data using grid interpolation. |
|
Pad instances of unspecified or bad data using 1D interpolation. |
Module Contents
- lstid_processing.smoothing.fill_rout.fill_data(data, data_time=None, data_loc=None, min_val=np.nan, max_val=np.nan, fill_val=np.nan, method='linear')[source]
Pad instances of unspecified or bad data using grid interpolation.
- Parameters:
- dataarray-like
ND data array with potential bad values
- data_timearray-like or NoneType
Temporal data as datetime objects, must be along axis 0 of data array (default=None)
- data_loclist of array-like or None
Location coordinate data, contained as a list, in axis order corresponding to their order in the data array. For example, in a data array with time along the first axis and altitude along the second axis, this would be a list with the first and only element containing an array of the altitude data. Alternatively, for a data array with longitude along the first axis and altitude along the second axis, time_data would be none, and this would be a list with the longitude array as the first element and the altitude array as the second element. (default=None)
- min_valfloat
Minimum allowed value for data, applied if a number (default=NaN)
- max_valfloat
Maximum allowed value for data, applied if a number (default=NaN)
- fill_valfloat
Value used to fill in for requested points outside of the convex hull of the input points. This option has no effect for the ‘nearest’ method. (default=np.nan)
- methodstr
Interpolation method, see scipy.interpolate.griddata (default=’linear’)
- Returns:
- good_dataarray-like
ND array with no bad values
See also
scipy.interpolate.griddata
- lstid_processing.smoothing.fill_rout.fill_time_series(data_time, data, samp_period, min_val=np.nan, max_val=np.nan, method='linear', fill_val=np.nan)[source]
Pad instances of unspecified or bad data using 1D interpolation.
- Parameters:
- data_timearray-like
Temporal data as datetime objects, must be along axis 0 of data array
- dataarray-like
1D data array with potential bad values
- samp_periodfloat
Sample period in minutes at which the data should be observed
- min_valfloat
Minimum allowed value for data, applied if a number (default=NaN)
- max_valfloat
Maximum allowed value for data, applied if a number (default=NaN)
- methodstr
Interpolation method, see kind in scipy.interpolate.interp1d (default=’linear’)
- fill_valarray-like or ‘extrapolate’
Fill value if no interpolation possible, see scipy.interpolate.interp1d (default=np.nan)
- Returns:
- good_timearray-like
1D array of time data without gaps
- good_dataarray-like
1D array with no bad values
See also
scipy.interpolate.interp1d