Converting Ion Chamber readings to flux¶
The Epicsapps Ion Chamber application is non-GUI application that uses several Epics records to calculate the flux absorbed in and transmitted through an Ionization Chamber. uses a small Epics database that needs to be loaded in a soft IOC to hold values. A python program can then be run which will read settings from this database, calculate the fluxes, and write them back to the Epics database. An adl display file for the MEDM display manager is provided as a simple UI.
Loading IonChamber.db into a soft IOC¶
To use the Ion Chamber application, the IonChamber.db file (with related files at IonChamber IOC Files), needs to be loaded into a soft IOC, with a load command like:
dbLoadRecords("IonChamber.db","P=13IDE:,Q=I0")
where the values for “P” and “Q” will be used to generate standard PV prefixes. This will generate PV names listed in the Table of PVs for Ion Chamber.
Table of PVs for Ion Chamber These PVs will be used either as input or output for the Ion Chamber calculations. Here “In” means the user is expected to provide these, while “Out” values will be written to be the stripchart application.
PV Name
I/O
Description
$(P)$(Q):AmpPV
In
Prefix for SRS570 Amp
$(P)$(Q):VoltPV
In
PV for IonChamber Voltage
$(P)$(Q):EnergyPV
In
PV for X-ray Energy Value in eV
$(P)$(Q):Desc
In
Description of Ion Chamber
$(P)$(Q):Length
In
IonChamber Length (cm)
$(P)$(Q):Gas
In
IonChamber Gas (one of a selection)
$(P)$(Q):Volts
Out
IonChamber Voltage
$(P)$(Q):Energy
Out
X-ray energy (eV)
$(P)$(Q):AbsPercent
Out
percent of flux absorbed in Ion Chamber
$(P)$(Q):Current $(P)$(Q):FluxAbs
Out Out
current generated in Ion Chamber (uA) flux absorbed in Ion Chamber (Hz)
$(P)$(Q):FluxOut
Out
flux transmitted out of Ion Chamber (Hz)
$(P)$(Q):FluxOutS
Out
string for flux transmitted
$(P)$(Q):TimeStamp
Out
timestamp of last update
Running the Ionchamber script and Display¶
Once the database is loaded, you will need to set the PV names for:
the prefix for the current amplifier. This is assumed to be a Stanford SRS70 current amplifier.
the PV for the output voltage of that amplifier.
the PV for the X-ray energy, in eV.
You will also need to set the length of the ion chamber (in cm), and the gas in the ion chamber. The gas is assumed to be only one gas, either Air, He, N2, Ar, or Kr.
With these inputs set, you can run a script like this:
#!/usr/bin/python
import sys
from epicsapps.ionchamber import start_ionchamber
prefix = '13XRM:IC0:'
start_ionchamber(prefix=prefix)
which will continuously read the ion chamber sensitivity, voltages, and X-ray energy, and so forth. This will the compute the fluxes and update the output PVs list in Table of PVs for Ion Chamber.
You can run a display file (available at IonChamber IOC Files) to view these values by running MEDM with:
medm -x -macro "P=13XRM:,Q=IC0" IonChamber.adl
or a similar Epics display command.
Calculation details¶
The calculation of flux uses xraydb. Details of the calculation are given at Ion Chamber flux calculations. This includes both photo-electric absorption and the current generated from Compton scattering. See also xraydb flux calculation for examples.