  Purpose: Commercial UHDR platforms deliver Ultra-High Dose Rate (UHDR) doses
at discrete combinations of pulse parameters including pulse width (PW), pulse
repetition frequency (PRF) and number of pulses (N), which dictate unique
combinations of dose and dose rates. Currently, obtaining pulse parameters for
the desired dose and dose rate is a cumbersome manual process involving
creating, updating, and looking up values in large spreadsheets for every
treatment configuration. The purpose of this work is to present a pulse
parameter optimizer application to match intended dose and dose rate precisely
and efficiently.
  Methods: Dose and dose rate calculation have been described for a commercial
electron FLASH platform. A constrained optimization for the dose and dose rate
cost function was modelled as a mixed integer problem in MATLAB (The MathWorks
Inc., Version9.13.0 R2022b, Natick, Massachusetts). The beam and machine data
required for the application were acquired using GafChromic film and
Alternating Current Current Transformers (ACCTs). Variables for optimization
included dose per pulse (DPP) for every collimator at a specific treatment
configuration, PW and PRF measured using ACCT, and airgap factors.
  Results: Using PW, PRF, N and airgap factors as the parameters, the
application was created to optimize for dose and dose rate. Largely automating
dose and dose rate calculation reduces safety concerns associated with manual
look up and calculation of these parameters, especially when many subjects at
different doses and dose rates are to be safely managed.
  Conclusion: A pulse parameter optimization application was built in MATLAB
for a commercial electron UHDR platform to increase efficiency in the dose,
dose rate, and pulse parameter prescription process.
