helper module

Define utility functions for electric fields.

read_e_field_probe_calibration(data)[source]

Read the field probe attenuation, rf racks calibration from data file.

Parameters:

data (DataFrame) – Data as returned by the loader.load() function.

Return type:

tuple[dict[str, float], dict[str, float], dict[str, float]]

Returns:

  • dict[str, float] – Associates every field probe name (eg "E1") with it’s attenuation in \(\mathrm{dBm}\).

  • dict[str, float] – Associates every field probe name (eg "E1") with it’s rack calibration slope in \(\mathrm{dBm/V}\).

  • dict[str, float] – Associates every field probe name (eg "E1") with it’s rack calibration offset in \(\mathrm{dBm}\).

Raises:

NotImplementedError

load_rf_calibration_files(calibration_folder, freq_mhz, freq_col='Frequency [MHz]', a_col='a [dBm / V]', b_col='b [dBm]')[source]

Load rf calibration files, interpolate proper calibration data.

calibration_folder must look like:

calibration_folder/
├── 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

Where the given CSV must hold data like:

# some comments
Probe   Frequency [MHz] a [dBm / V]     b [dBm]
E1      80.0    10.232945073011583      -51.43251555580861
E1      88.0    10.244590821913084      -51.46188696517617
E1      100.0   10.270347916270323      -51.578312368686596
E1      120.0   10.301710211286146      -51.73648053093371
E1      140.0   10.33558455881163       -51.83334288966003
E1      160.0   10.375268145607556      -51.91758233328844
E1      180.0   10.398407751401276      -51.87058673739318

The preferred way to create such a file is to use the dedicated tool.

Parameters:
  • calibration_folder (Path) – Path to the folder holding CSV calibration files.

  • freq_mhz (float) – RF frequency for this test in \(\mathrm{MHz}\).

  • freq_col (str, default: 'Frequency [MHz]') – Name of the column holding the measure frequency in \(\mathrm{MHz}\).

  • a_col (str, default: 'a [dBm / V]') – Name of the column holding the measured slope in \(\mathrm{dBm/V}\).

  • b_col (str, default: 'b [dBm]') – Name of the column holding the measured bias in \(\mathrm{dBm}\).

Return type:

tuple[dict[str, float], dict[str, float]]