backscatter.fitacf.fitting module

class backscatter.fitacf.fitting.ACFFitting[source]

Bases: object

This class is a container for methods that initiate fitting to the data

There are static methods to perform fits for power, velocity and elevation, as well the methods to calculate sigmas and unwrap phase for ACF and XCF phases.

static acf_phase_fitting(range_list)[source]

Initiates least square fitting for ACF phase

Performs a least squares fit for the one parameter linear model to ACF phase for each range.

Parameters:

range_list – list of Range objects with data to fit

static acf_phase_unwrap(range_list, raw_data)[source]

Unwraps the ACF phase data to be able to fit a straight line

Takes phase data in a wrapping domain and converts it to a sloped line using a 2 stage iterative process. This is to be able to fit using linear least squares. Performed after sigma values are calculated.

Parameters:

range_list – list of Range object with phase data

static acf_pwr_fitting(range_list)[source]

Initiates least square fitting for power

Performs a least squares fit for two parameter linear and quadratic models to ACF power for each range. Performs additional linear and quadratic fits using log-corrected sigmas for correct errors.

Parameters:

range_list – list of Range objects with data to fit

static calculate_phase_and_elev_sigmas(range_list, raw_data)[source]

Calculates correct weightings for ACF and XCF phases

ACF phase and XCF phase sigmas can only be computed after ACF power has been fitted. This method computes the correct values for sigmas for each range.

Parameters:
  • range_list – list of Range objects with phase data and fitted power

  • raw_data – a dictionary of raw data parameters

static phase_correction(slope_estimate, phase_values, t_values)[source]

Adds the estimated number of 2*pi corrections to phase values

Parameters:
  • slope_estimate – predicted slope from iterative unwrap

  • phase_value – a particular phase to correct

  • t_value – a value in time for a particular phase point

Returns:

phase shifted by number 2*pi corrections, total 2pi corrections.

static xcf_phase_fitting(range_list)[source]

Initiates least square fitting for XCF phase

Performs a least squares fit for the two parameter linear model to XCF phase for each range.

Parameters:

range_list – list of Range objects with data to fit

static xcf_phase_unwrap(range_list)[source]

Unwraps the ACF phase data to be able to fit a straight line

Takes phase data in a wrapping domain and converts it to a sloped line. XCF unwrapping only needs 1 stage of iteration because it uses the ACF phase fit as an initial guess. This is to be able to fit using linear least squares. Performed after ACF phase is fit.

Parameters:

range_list – list of Range object with phase data