fixers module
Define functions to fix measurement errors.
- fix_wrong_e_field_calibration(freq_mhz, g_probe_new, rack_calibration_folder, filepath_bad, filepath_new=None, g_probe_bad=None, a_rack_bad=None, b_rack_bad=None, sep=',', **kwargs)[source]
Recover proper electric field measurements.
Use this when the attenuation and/or the rf rack data in LabView was incorrect.
- Parameters:
freq_mhz (
float) – Test frequency in \(\mathrm{MHz}\).g_probe_new (
dict[str,float]) – Correct attenuation at current frequency for every field probe. Keys are the names of the field probes, eg"E1","E2", etc.rack_calibration_folder (
Path) –Folder holding all the rack calibration files. It should look like:
outputs ├── E1_fit_calibration.csv ├── E2_fit_calibration.csv ├── E3_fit_calibration.csv ├── E4_fit_calibration.csv ├── E5_fit_calibration.csv ├── E6_fit_calibration.csv └── E7_fit_calibration.csv
filepath_bad (
Path) – Path to the original data file, generallyXLSXfile.filepath_new (
Path|None, default:None) – Path to the new corrected data file, generallyCSVfile.g_probe_bad (
dict[str,float] |None, default:None) – Dictionaries linking every field probe to the electric field probe parameters as found infilepath_bad. If not provided, should be read fromfilepath_baddirectly.a_rack_bad (
dict[str,float] |None, default:None) – Dictionaries linking every field probe to the electric field probe parameters as found infilepath_bad. If not provided, should be read fromfilepath_baddirectly.b_rack_bad (
dict[str,float] |None, default:None) – Dictionaries linking every field probe to the electric field probe parameters as found infilepath_bad. If not provided, should be read fromfilepath_baddirectly.sep (
str, default:',') – Column delimiter in input and outputCSVfiles.
- Raises:
NotImplementedError – When the bad electric field probes parameters are not provided and they should be read from
filepath_baddirectly.- Return type: