pysiral.retracker.tfmra
Attributes
Classes
The default TFMRA retracker implementation using cythonized |
|
Level-2 processor step to compute elevations from a range of TFMRA thresholds. |
Functions
|
Bottleneck implementation of the IDL SMOOTH function |
Module Contents
- pysiral.retracker.tfmra.__author__ = 'Stefan Hendricks <stefan.hendricks@awi.de>'
- pysiral.retracker.tfmra.CYTFMRA_OK = True
- class pysiral.retracker.tfmra.cTFMRA
Bases:
pysiral.retracker.BaseRetrackerThe default TFMRA retracker implementation using cythonized functions for numerical perfomrance
- DOCSTR = 'Threshold first maximum retracker (TFMRA)'
- set_default_options(specified_options=None)
Set the default options for the cTFMRA retracker. This can be modified by the specified_options keyword that will overwrite the values in the default options dictionary :param specified_options: (dict or dict-like) specific options :return:
- property default_options_dict
- create_retracker_properties(n_records)
Mandatory method, but unused :param n_records: :return:
- l2_retrack(rng, wfm, indices, radar_mode, is_valid)
API Calling method for retrackers.
- Parameters:
rng – (np.array, dim:(n_records, n_bins)
wfm
indices
radar_mode
is_valid
- Returns:
- get_tfmra_threshold(indices)
Compute the TFMRA threshold for each waveform with several options. :param indices: A list of array indices for which to compute thresholds (e.g. for sea ice waveforms) :return: An array of thresholds with the dimensions of the l2 data object, but only values for <indices>
- get_preprocessed_wfm(rng, wfm, radar_mode, is_valid)
Returns the intermediate product (oversampled range bins, oversampled and filtered waveforms, indices of first maxima and peak power norm for custom applications
- get_thresholds_distance(rng, wfm, fmi, t0, t1, return_all_values=False)
Return the distance between two thresholds t0 < t1
- static get_filtered_wfm(rng, wfm, oversampling_factor, window_size)
Return a filtered version of the waveform. This process inclused oversampling, smoothing and normalization to the first maximum power. :param rng: (np.array, dim:n_records) window delay for each range bin :param wfm: (np.array, dim:n_records) the power for each range bin with
sensor dependent units
- Parameters:
oversampling_factor – (int) The waveform oversamling factor
window_size – (int) The filter size of the box filter
- Returns:
- static get_first_maximum_index(wfm, peak_minimum_power, first_valid_idx=0)
Return the index of the first peak (first maximum) on the leading edge before the absolute power maximum. The first peak is only valid if its power exceeds a certain threshold :param wfm: (np.array, dim=(n_range_bins)): Normalied waveform power :param peak_minimum_power: (float) threshold for normalized power that
a peak must surpass to be regarded as a first maximum candidate
- Parameters:
first_valid_idx – (int):
- Returns:
- static get_threshold_range(rng: numpy.ndarray, wfm: numpy.ndarray, first_maximum_index: int, threshold: float, first_valid_idx: int = 0) Tuple[float, float, int]
Return the range value and the power of the retrack point at a given threshold of the firsts maximum power
- Parameters:
rng – (np.array, dim=(n_range_bins) Window delay in meters
wfm – (np.array, dim=(n_range_bins) Waveform power in normalized units
first_maximum_index – (int) Index of first maximum
threshold – (float) Power threshold
first_valid_idx – (int) First valid index for first maximum / leading edge
- Returns:
tfmra range (float), tfmra power (float)
- class pysiral.retracker.tfmra.TFMRAMultiThresholdFreeboards(*args, **kwargs)
Bases:
pysiral.l2proc.procsteps.Level2ProcessorStepLevel-2 processor step to compute elevations from a range of TFMRA thresholds. NOTE: Computational expensive, should be handled with care
- execute_procstep(l1b, l2)
Computes the elevation of a range of defined of TFMRA retrackers thresholds to all lead or ice elevations. :param l1b: :param l2: :return: error_status_flag
- property l2_input_vars
- property l2_output_vars
- property auxid_fmt
- property error_bit
- pysiral.retracker.tfmra.bnsmooth(x, window)
Bottleneck implementation of the IDL SMOOTH function