backscatter.fitacf.determinations module

class backscatter.fitacf.determinations.Determinations(raw_data, range_list, noise_pwr, tdiff)[source]

Bases: object

This is a class to construct a new dictionary of final determinations

This class holds the methods to convert fitted data into the final measurements of the plasma

find_elevation(range_list, raw_data, hdw_info)[source]

Computes elevation angle for each range

Computes fitted elevation angle, unfitted elevation angle, and error in elevation all in one method

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

  • hdw_info – a dictionary of the radar hardware information

Returns:

a tuple of arrays with errors,fitted elevation, and unfitted elevation

lag_0_pwr_in_dB(raw_data, noise_pwr)[source]

Converts lag 0 powers to dB

Parameters:
  • raw_data – a dictionary of raw data parameters

  • noise_pwr – minimum power for which an ACF is pure noise

Returns:

an array of lag 0 powers in dB

new_parameter_dictionary(hdw_info, raw_data, range_list, noise_pwr)[source]

Creates the new dictionary of parameters from fitted data

Parameters:
  • hdw_info – a dictionary of the radar hardware information

  • raw_data – a dictionary of raw data parameters

  • range_list – a list of Range objects with fitted data

  • noise_pwr – minimum power for which an ACF is pure noise

Returns:

a new dictionary of the fitacf parameters

set_gsct(vel_arr, w_l_arr)[source]

Computes whether scatter comes from ground or ionsphere for each range

Parameters:
  • vel_arr – an array of determined velocities

  • w_l_arr – an array of determined spectral widths(lambda)

Returns:

an array of ground scatter flags

set_nlag(range_list)[source]

Sets the number of points used for power fitting

Parameters:

range_list – a list of Range objects with data points

Returns:

an array of the number of points left for fitting at each range

set_p_l(range_list, noise_pwr)[source]

Computes the power in dB of the linear power fit at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • noise_pwr – minimum power for which an ACF is pure noise

Returns:

an array of fitted lambda powers in dB

set_p_l_err(range_list)[source]

Computes the power in dB of the linear power fit error at each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of fitted lambda power errors in dB

set_p_s(range_list, noise_pwr)[source]

Computes the power in dB of the quadratic power fit at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • noise_pwr – minimum power for which an ACF is pure noise

Returns:

an array of fitted sigma powers in dB

set_p_s_err(range_list)[source]

Computes the power in dB of the quadratic power fit error at each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of fitted sigma power errors in dB

set_qflg(range_list)[source]

Creates a qflg array

All data is valid at this point so this just makes an array of ones the length of the range list.

Parameters:

range_list – a list of Range objects after filtering

Returns:

an array of ones

set_sdev_l(range_list)[source]

Sets the chi_2 value of the linear power fit for each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of chi_2 values

set_sdev_phi(range_list)[source]

Sets the chi_2 value of the ACF phase fit for each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of chi_2 values

set_sdev_s(range_list)[source]

Sets the chi_2 value of the quadratic power fit for each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of chi_2 values

set_slist(range_list)[source]

Creates the array of good ranges

Parameters:

range_list – a list of Range objects left after filtering

Returns:

an array of range numbers left after filtering

set_v(range_list, raw_data, hdw_info)[source]

Computes the fitted velocity at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

  • hdw_info – a dictionary of the radar hardware information

Returns:

an array of computed velocites

set_v_err(range_list, raw_data, hdw_info)[source]

Computes the fitted velocity error at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

  • hdw_info – a dictionary of the radar hardware information

Returns:

an array of computed velocites

set_w_l(range_list, raw_data)[source]

Computes the spectral width from the linear power fit at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

Returns:

an array of computed spectral widths

set_w_l_err(range_list, raw_data)[source]

Computes the spectral width error from the linear power fit errors at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

Returns:

an array of computed spectral width errors

set_w_s(range_list, raw_data)[source]

Computes the spectral width from the quadratic power fit at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

Returns:

an array of computed spectral widths

set_w_s_err(range_list, raw_data)[source]

Computes the spectral width error from the quadratic power fit errors at each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

Returns:

an array of computed spectral width errors

set_xcf_phi0(range_list, raw_data, hdw_info)[source]

Sets the unfitted offset of the XCF phase for each range

Parameters:
  • range_list – a list of Range objects after fitting

  • raw_data – a dictionary of raw data parameters

  • hdw_info – a dictionary of the radar hardware information

Returns:

an array of unfitted XCF phases offsets

set_xcf_phi0_err(range_list)[source]

Sets the fitted offset error of the XCF phase for each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of fitted XCF phases offset errors

set_xcf_sdev_phi(range_list)[source]

Sets the chi_2 value for the XCF phase fit for each range

Parameters:

range_list – a list of Range objects after fitting

Returns:

an array of chi_2 values