pueoAnalysisTools
Loading...
Searching...
No Matches
calibration.py File Reference

main() shows how to minimize() the objective function() for antenna phase center calibration. More...

Go to the source code of this file.

Functions

pl.DataFrame generate_antenna_phase_center_pairs_with_placeholders (Path qrh_dot_dat, Path|None offset_inSIM=None, ant_type='MI')
 Creates antenna pairs with placeholder integers as antenna phase centers.
 
[int] __get_all_run_numbers (Path pueo_data)
 A temporary helper function of load_dataset_and_measure_time_delays()
 
pl.DataFrame load_dataset_and_measure_time_delays (ROOT.pueo.Dataset dataset, pl.DataFrame phase_center_pairs, str pulser_station='taylor_dome', MC=False, AntType='MI', str IcefinalFileDir='', int singlerun='', list event_list=None, UPSAMPLE=1)
 Uses SciPy's correlate() to "measure" the delays of waveforms between antenna pairs.
 
pl.DataFrame _scipy_cross_correlate_all_pairs_for_one_event (pl.DataFrame phase_center_pairs, pl.DataFrame waveforms)
 A helper function of load_dataset_and_measure_time_delays()
 
 retrieve_relevant_antennas_from_all_pairs (pl.DataFrame phase_center_pairs)
 Retrieves the (unique) antennas, given a bunch of antenna pairs.
 
float objective_function (pl.Series phase_center_guess, pl.Series phase_center_placeholders, pl.DataFrame pulser_directions_and_measured_time_delays, str axis, str loss_type="l2", float delta=0.3)
 Computes the expected time delays and compares them with the measured time delays, designed to be run by SciPy's minimizer.
 
pl.DataFrame compute_time_delay_residuals (np.ndarray phase_center_guess, pl.Series phase_center_placeholders, pl.DataFrame pulser_directions_and_measured_time_delays, str axis)
 Computes the time delays and residuals, given a solution.
 
 _plot_calibration_result (str axis, pl.DataFrame before, np.ndarray after, anttype='MI')
 

Detailed Description

main() shows how to minimize() the objective function() for antenna phase center calibration.

Definition in file calibration.py.

Function Documentation

◆ compute_time_delay_residuals()

pl.DataFrame compute_time_delay_residuals ( np.ndarray phase_center_guess,
pl.Series phase_center_placeholders,
pl.DataFrame pulser_directions_and_measured_time_delays,
str axis )

Computes the time delays and residuals, given a solution.

This can be used to track residuals evolution during minimization

Parameters
[in]phase_center_guessThe assumed solution to fill in placeholder
[in]phase_center_placeholdersThe output of #retrieve_relevant_antennas_from_all_pairs
[in]pulser_directions_and_measured_time_delaysThe output of #load_dataset_and_measure_time_delays
[in]axisAxis to fit: \(\rho\), \(\phi\), or \(z\)
[in]loss_typeThe loss function type to minimize, "l2" is sum(residual square), "l1" is sum(abs(residual)), "huber_loss" is a combined of l1 and l2. l2 is default.
[in]deltaparamter if you use "huber_loss"
Return values
pulser_directions_and_measured_time_delayswith an additional column of pairwise delta t residual

Definition at line 526 of file calibration.py.