pipeline.hifa.tasks.applycal.ampphase_vs_freq_qa

Functions

PHASE_REF_FN(all_fits, accessor)

Get the median best fit from a list of best fits.

calc_vk(wrapper)

Return a NumPy array containing time-averaged visibilities for each baseline in the input MSWrapper.

consolidate_data_selections(outliers)

Consolidate a list of Outliers into a smaller set of equivalent Outliers by consolidating their data selection arguments.

data_selection_contains(proposed, ds_args)

Return True if one data selection is contained within another.

fit_angular_model(angular_model, nu, …)

get_amp_fit(amp_model_fn, frequencies, …)

Fit a linear amplitude vs frequency model to a set of time-averaged visibilities.

get_angular_linear_function(midpoint, x_scale)

Angular linear model to fit phases only.

get_best_fits_per_ant(wrapper)

Calculate and return the best amp/phase vs freq fits for data in the input MSWrapper.

get_chi2_ang_model(angular_model, nu, omega, …)

get_linear_function(midpoint, x_scale)

Return a scaled linear function (a function of slope and intercept).

get_median_fit(all_fits, accessor)

Get the median best fit from a list of best fits.

get_phase_fit(amp_model_fn, ang_model_fn, …)

Fit a linear model for phase vs frequency to a set of time-averaged visibilities.

robust_stats(a)

Return median and estimate standard deviation of numpy array A using median statistics

score_X_vs_freq_fits(all_fits, attr, …)

Score a set of best fits, comparing the fits identified by the ‘attr’ attribute against a reference value calculated by the ref_value_fn, marking outliers that deviate by more than sigma_threshold from this reference value as outliers, to be returned as Outlier objects created by the outlier_fn.

score_all(all_fits, outlier_fn[, flag_all])

Compare and score the calculated best fits based on how they deviate from a reference value.

score_all_scans(ms, intent[, flag_all])

Calculate best fits for amplitude vs frequency and phase vs frequency for time-averaged visibilities, score each fit by comparison against a reference value, and return outliers.

score_amp_intercept(all_fits, outlier_fn, …)

Score the intercept of the best fit against the intercept of the median best fit, marking fits that deviate by sigma_threshold from the median dispersion as outliers.

score_amp_slope(all_fits, outlier_fn, …)

For all amplitude vs frequency fits, score the slope of the fit against the slope of the median best fit, marking fits that deviate by sigma_threshold from the median dispersion as outliers.

score_fits(all_fits, reference_value_fn, …)

Score a list of best fit parameters against a reference value, identifying outliers as fits that deviate by more than sigma_threshold * std dev from the reference value.

score_phase_intercept(all_fits, outlier_fn, …)

For all phase vs frequency fits, score the intercept of the fit against the intercept of the median best fit, marking fits that deviate by sigma_threshold from the median dispersion as outliers.

score_phase_slope(all_fits, outlier_fn, …)

For all phase vs frequency fits, score the slope of the fit against the slope of the median best fit, marking fits that deviate by sigma_threshold from the median dispersion as outliers.

to_linear_fit_parameters(fit, err)

Convert tuples from the best fit evaluation into a LinearFitParameters namedtuple.

Classes

AntennaFit(ant, pol, amp, phase)

LinearFitParameters(slope, intercept)

Outlier(vis, intent, scan, spw, ant, pol, …)

ValueAndUncertainty

alias of pipeline.hifa.tasks.applycal.ampphase_vs_freq_qa.FitAndError