I was asked what needs to be done to convert kappa c into real physical units [mA/pm].
KappaC is a dimensionless number that represents the current optical gain as a fraction of what it was at some point in the past. In O4 that time corresponds to when the front end calibration was last updated (or 'exported'). You can see a list of calibration reports that have been exported to the front end on the H1 cal page. The entries with the 'exported' tag were used to update the front end and are used as reference for KappaC afterwards until the front end is updated once again.
Since the meaning of KappaC=1 changes over time, you cannot easily trend the KappaC channel over long periods of time to compare optical gain values (yet*). You have to be sure to look at the most recently exported report and look up the optical gain (shown on the first page of the report PDF and in the enclosed pydarm_H1.ini file as "coupled_cavity_optical_gain).
Moreover, the optical gain is reported in [DARM_ERR counts/m], not in physical units. To convert to mA/m (or mA/pm) we need to take the transfer function OMC-DCPD_SUM_OUT/DARM_IN1 [mA/ct]. However, this TF can change from lock to lock (see LHO:76000 for some discussion of this). So, given a particular GPS time, if you want to convert KappaC to mA/m you need to get the latest exported report to figure out what KappaC is in DARM_ERR cts/m, measure the OMC-DCPD_SUM_OUT/DARM_IN1 [mA/cts] transfer function (this is pretty flat so really you can condense this to a single number instead of a frequency dependent array) and multiply them.
Ultimately, you end up with the following conversion:
KappaC * Opt gain [DARM_ERR cts/m] * OMC-DCPD_SUM_OUT/DARM_IN1 [mA/cts] = Opt gain [mA/m]
I've written a script that does this. It takes a single argument: the time at which to evaluate the optical gain. It uses the functionality I set up for a component of the noise budget (first mentioned in LHO:76000).
On gitlab the script lives at https://git.ligo.org/louis.dartez/pydarm-utils/-/blob/4018924870892f1f3ecd2fb7281e47f5df2a3f29/scripts/optical_gain.py.
On the workstation, it currently lives at /ligo/home/louis.dartez/repos/pydarm-utils/scripts/optical_gain.py
To run the script:
1.) activate the pydarm-utils environment: conda activate /ligo/home/louis.dartez/conda/pydarm-utils
2.) run python /ligo/home/louis.dartez/repos/pydarm-utils/scripts/optical_gain.py TIME
, where TIME is either a GPS time or a date string (use the -h option for formatting)
It will download 10 minutes of data starting at the provided time so it may take a short while.
Here is what the output should look like:
(/ligo/home/louis.dartez/conda/pydarm-utils) louis.dartez@cdsws22: python optical_gain.py 1397102112.6
Using reference report: 20240330T211519Z
Reference optical gain [DARM_ERR cts/m]: 3438377.6611055154
________________________________________________________________________________
[Memory] Calling pydarm_utils.io.gwpy_utils.get_data...
get_data([ 'H1:OMC-DCPD_SUM_OUT_DQ',
'H1:LSC-DARM1_IN1_DQ',
'H1:CAL-CS_TDEP_KAPPA_C_OUTPUT'],
1397102112.6, 1397102712.6)
Opening new connection to nds.ligo-wa.caltech.edu... connected
[nds.ligo-wa.caltech.edu] set ALLOW_DATA_ON_TAPE='True'
Checking channels list against NDS2 database... done
Downloading data: |█████████████████████████████████████████████████████████████| 601.0/601.0 (100%) ETA 00:00 _________________________________________________________get_data - 9.4s, 0.2min
KappaC: 1.0068259239196777
Optical gain [DARM_ERR cts/m]: 3461847.765427341
DARM_IN1/OMC-DCPD_SUM_OUT [DARM_ERR cts/mA]: 4.0557094393989246e-07
optical gain [mA/pm]: 8.535739103490618