v2.2

Hello all,
At long last I have finished v2.2. This release focused on the VMAT module, flatness & symmetry, and adding TRS-398 capabilities. I am using Github projects now to track features; you can find v2.2 here. You can also view the next round of releases there to see what’s coming down the pipeline.

You can read about the 2.2 changes here and are copied here for convenience.

V 2.2.0### General- #131 Typing has been added to almost every function and class in pylinac.

  • F-strings have been incorporated. This bumps the minimum version for Python to 3.6.
  • The publish_pdf method of every module has had its signature changed. Before, not all the signatures matched and only included a few parameters like author and unit name. This has been changed to filename: str, notes: str, list of str, open_file: bool, metadata: dict. Filename and open file are straightforward. notes is a string or list of strings that are placed at the bottom of the report (e.g. ‘April monthly redo’). Metadata is a dictionary that will print both the key and value at the top of each page of the report (e.g. physicist and date of measurement)
  • The TG-51 module has been placed under a new module: Calibration module documentation. This is because:
  • A TRS-398 calibration module has been created TRS-398.
  • The default colormap for arrays is now Viridis, the matplotlib default.
  • A contributer’s guide has been added: Contributing.
  • #141 The Pylinac logo has been included in the package so that PDFs can be generated without needing www access.
  • A new dependency has been added: which handles input parameters.

Flatness & Symmetry- #130 The flatsym module has been completely rewritten. Documentation has also been updated and should be consulted given the number of changes: Flatness/Symmetry module documentation.

VMAT- The overall simplicity of use has been increased by automating & removing several parameters.

  • #128 The VMAT class has been split into two classes: DRGS and DRMLC. Although there are now two classes instead of one, the overall simplicity has been increased, such as the following:
    • The test parameter in analyze() is no longer required and has been removed.
    • The type is no longer required in .from_demo_images().
    • The demo method matches the other modules: .run_demo()
    • All naming conventions have been deprecated.
  • The x_offset parameter has been removed. The x-position is now based on the FWHM of the DMLC field itself. This means the x-position is dynamic and automatic.
  • The delivery_types parameter has been removed. The delivery types of the images are now automatically determined.
  • The methods for plotting and saving subimages (each image & the profiles) has been converted to a private method (_plot_subimage(), …). There is little need for a public method to plot individually.

TG-51/Calibration- #129 The TG-51 module has been refactored to add a TG51ElectronLegacy and TG51ElectronModern calibration class. The Legacy class uses the classic TG-51 values that require a kecal value and a Pgradient measurement. The Modern class uses the equations from Muir & Rogers 2014 to calculate kQ that updates and incorporates the Pgradient and kecal values. While not strictly TG-51, these values are very likely to be incorporated into the next TG-51 addendum as the kQ values for photons already have.

  • Certain parameters have been refactored: volt_high and volt_low have been refactored to voltage_reference and voltage_reduced, m_raw, m_low, and m_opp have been refactored to m_reference, m_reduced, and m_opposite. These parameters are also the same for the TRS-398 classes
  • The kq function has been separated into three functions: kq_photon_pdd10x, kq_photon_tpr2010, and kq_electron.
  • A PDD(20,10) to TPR(20,10) converter function has been added. This can be used in either TG-51 or TRS-398 to get TPR without actually needing to measure it.
  • Defaults were removed from most functions to avoid possible miscalibration/miscalculation.
  • Most parameters were changed to be keyword only. This will prevent accidental miscalculations from simple positional arguments.
  • #127 A TRS-398 module has been added. There are two main classes: TRS398Photon and TRS398Electron.

Bug Fixes- #138/#139: Too many arguments when plotting the leaf error subplot for picketfence.

  • #133: Trajectory log HDMLC status was reversed. This only affected fluence calculations using the equal_aspect arguement.
  • #134: Trajectory log fluence array values were not in absolute MU.

Looks good James! Thanks for #141 :slight_smile:

v2.2.2 is released today. This is a bugfix release. Changes can be viewed on the changelog.

v2.2.7 is released. See the changelog for bug fix details. https://pylinac.readthedocs.io/en/v2.2.7/changelog.html