Gantry speed and dose-rate from ControlPoint?

May 6, 2015 at 2:12 PM
I'm using the ControlPoint object but there seems to be no gantry speed or dose-rate property. Is this available elsewhere? Are there plans to include this? There is a nominal dose-rate on the Beam.

May 6, 2015 at 6:39 PM
Hi Dave,

There is no segment-by-segment dose rates or gantry speeds directly available in the API for VMAT fields. It's pretty straightforward to calculate them based on the control point data, knowing that the Linac will always try to minimize the treatment time of the field. It will maximize the gantry speed or the dose rate in each segment.
    double GetDeltaAngle (double a1, double a2)
      double diff = Math.Abs(a1 - a2);
      return diff > 180 ? 360 - diff : diff;

    double CalculateSDT(double deltaAngle, double deltaMU, double maxGantrySpeed, double maxDoseRate)
      double rotationTimeUsingMaxSpeed = deltaAngle / maxGantrySpeed;
      double deliveryTimeUsingMaxDoseRate = deltaMU / maxDoseRate;

      return Math.Max(deliveryTimeUsingMaxDoseRate, rotationTimeUsingMaxSpeed);
      ExternalPlanSetup eps = context.ExternalPlanSetup;

      Beam beam = eps.Beams.First();
      double mu = beam.Meterset.Value;
      double maxGantrySpeed = 0.8 * 360.0 / 60.0; //default value is 0.8 RPM. There may be an operating limit for this.
      using (System.IO.StreamWriter file = new System.IO.StreamWriter("C:\\temp\\VMAT.txt"))
        for (int i = 1; i < beam.ControlPoints.Count; i++)
          var cpPrev = beam.ControlPoints[i - 1];
          var cp = beam.ControlPoints[i];
          double deltaAngle = GetDeltaAngle(cpPrev.GantryAngle, cp.GantryAngle);
          double deltaMU = mu * (cp.MetersetWeight - cpPrev.MetersetWeight);
          double segmentDeliveryTime = CalculateSDT(deltaAngle, deltaMU, maxGantrySpeed, beam.DoseRate / 60.0);
          double doserate = deltaMU / segmentDeliveryTime * 60.0;
          double gantrySpeed = deltaAngle / segmentDeliveryTime;
          double muPerDeg = deltaMU / deltaAngle;

          file.Write(" ");
          file.Write(" ");
          file.Write(" ");
          file.Write(" ");
          file.Write(" ");
          file.Write(" ");


Some caveats: The max gantry speed is not available from the API; here a hard coded value was used. This speed is usually what C-Linacs use. TrueBeams may have a higher gantry rotation speed.
Elekta machines have discreet dose rate steps. The formula would be different for them.
May 7, 2015 at 11:57 AM
Thanks Stu (?),

Happy to calculate the dose-rate from the ControlPoints. I was hoping not to assume a gantry speed in the process. We do have the odd field that has gantry speed modulation, though we try to avoid it.

Out of curiosity, are you aware of any plans to expand what's available from the API? E.g. this or on/offline review matching info ...

Thanks again