## 2 Methods and Materials
### Online Correction Method: Pulsed Radiation
#### 2.1.2 Analytic Online Correction Method--Pulsed Beams  
In a pulsed beam with period \(T\) and dose per pulse \(D_{0}\), we can define the average dose rate as:  
\[\langle\dot{D}\rangle=\frac{D_{0}}{T} \tag{4}\]  
Equally, we can define the average ionization current associated with the full charge collected without recombination effects:  
\[\langle I\rangle=\frac{e\;D_{0}\;m}{W\;T} \tag{5}\]  
where \(e\) stands for the elementary charge, \(m\) is the mass of the active volume of the chamber and \(W\) is the average energy per electron-ion pair released in the medium.  
The chamber actual average electrical current can be obtained through the integration in a time interval of duration \(\Delta t\) in the form:  
\[\langle I_{col}(t)\rangle=\frac{1}{\Delta t}\int_{t}^{t+\Delta t}I_{col}(t)\;dt \tag{6}\]where \(I_{col}(t)\) is the actual instantaneous readout current. This moving average value, \(\langle I_{col}(t)\rangle\), can suffer fluctuations depending on the size of the time integration interval \(\Delta t\), the actual shape of the instantaneous current of the detector after each pulse, and due to variations in time of the irradiation delivery (i.e., dose per pulse and pulse repetition rate). However, if \(\Delta t\) is sufficiently large compared with pulse period \(T\), and considering that irradiation conditions are steady during that interval, the relative standard deviation of \(\langle I_{col}(t)\rangle\) could be reasonably small for the application of the method proposed in this work. For example, taking \(\Delta t\geq 50T\) provides a standard deviation for \(\langle I_{col}(t)\rangle\) below 1%.  
Under these conditions, we may assume that for a given average ionization current \(\langle I\rangle\) there is an associated charge collection efficiency \(f(\langle I\rangle)\), and thus we can write that  
\[\langle I_{col}\rangle\approx f(\langle I\rangle)\cdot\langle I\rangle \tag{7}\]  
where \(f(\langle I\rangle)\) is the collection efficiency associated to the ionization current \(\langle I\rangle\), which is proportional to the dose rate in the detector, \(\langle\dot{D}\rangle\).  
We can use the two-voltage method, or any other method, to determine the collection efficiency at a reference dose per pulse, \(D_{0}^{ref}\), or, equivalently, at a given ionization reference current \(\langle I_{ref}\rangle\). We will denote the value of \(u\) in this reference condition as \(u_{ref}\). Then, the variable \(u\) at a different dose per pulse \(D_{0}\) verifies that:  
\[\frac{u}{u_{ref}}=\frac{D_{0}}{D_{0}^{ref}}=\frac{\langle I\rangle}{\langle I _{ref}\rangle} \tag{8}\]  
consequently,  
\[f(\langle I\rangle)=\frac{\langle I_{ref}\rangle}{u_{ref}\ \langle I\rangle} \log\Biggl{[}1+u_{ref}\ \frac{\langle I\rangle}{\langle I_{ref}\rangle}\Biggr{]} \tag{9}\]  
From Equation (7), we can express \(\langle I\rangle\) as  
\[\langle I\rangle\approx\frac{\langle I_{col}\rangle}{f(\langle I\rangle)} \tag{10}\]  
and substituting in Equation (9), we can obtain  
\[f(\langle I\rangle)\approx\frac{\langle I_{ref}\rangle\ f(\langle I\rangle)} {u_{ref}\ \langle I_{col}\rangle}\log\Biggl{[}1+u_{ref}\ \frac{\langle I_{col}\rangle}{\langle I_{ref}\rangle\ f(\langle I\rangle)} \Biggr{]} \tag{11}\]  
We can solve the above equation for \(f(\langle I\rangle)\) to obtain:  
\[f(\langle I\rangle)\approx\frac{u_{ref}\ \langle I_{col}\rangle}{\langle I _{ref}\rangle\ \left[\exp\Bigl{(}\frac{\langle I_{col}\rangle\ u_{ref}}{\langle I _{ref}\rangle}\Bigr{)}-1\right]} \tag{12}\]  
This expression can be used to correct online the readout signal. The correction factor only depends on the own value of \(\langle I_{col}\rangle\) and a single parameter, \(k_{ref}^{p}=u_{ref}/\langle I_{ref}\rangle\), which can be experimentally determined. Thus, we can write that:  
\[f(\langle I\rangle)\approx\frac{k_{ref}^{p}\ \langle I_{col}\rangle}{\exp \Bigl{(}k_{ref}^{p}\ \langle I_{col}\rangle\Bigr{)}-1} \tag{13}\]  
\[\langle I_{corrected}(t)\rangle\approx\frac{\langle I_{col}\rangle}{f(\langle I \rangle)} \tag{14}\]