DataMedSci / pymchelper

Python toolkit for SHIELD-HIT12A and FLUKA
http://datamedsci.github.io/pymchelper/
15 stars 7 forks source link

plan.py: needs to count unique layers only #640

Open nbassler opened 1 year ago

nbassler commented 1 year ago
$ PYTHONPATH=. python3 pymchelper/utils/radiotherapy/plan.py ../2022_DCPT_MICE/data/resources/plans/plan1/Plan2019-11_5.5.dcm -d
Diagnostics:
---------------------------------------------------
Patient Name           : 'chison^test_EKO_1'       []
Patient ID             : test_EKO_1
Plan label             : Plan5.5
Plan date              : 20191103
Number of Fields       :  1
---------------------------------------------------
   Field                  : 01/01:
   ------------------------------------------------
   Energy layers          :         16
   Total MUs              :  6992.1855
   Total particles        : 1.8765e+10 (estimated)
   ------------------------------------------------
      Layer   0:   106.4830 MeV           103 spots
      Layer   1:   106.4830 MeV           103 spots
      Layer   2:   103.1830 MeV           103 spots
      Layer   3:   103.1830 MeV           103 spots
      Layer   4:    99.8830 MeV           103 spots
      Layer   5:    99.8830 MeV           103 spots
      Layer   6:    96.5830 MeV           102 spots
      Layer   7:    96.5830 MeV           102 spots
      Layer   8:    93.2830 MeV            97 spots
      Layer   9:    93.2830 MeV            97 spots
      Layer  10:    89.9830 MeV            97 spots
      Layer  11:    89.9830 MeV            97 spots
      Layer  12:    86.6830 MeV            91 spots
      Layer  13:    86.6830 MeV            91 spots
      Layer  14:    83.3830 MeV            88 spots
      Layer  15:    83.3830 MeV            88 spots
   ------------------------------------------------
   Lowest energy          :    83.3830 MeV
   Highest energy         :   106.4830 MeV
   ------------------------------------------------
   Spot field min/max X   :   -13.6071   +20.4107 mm
   Spot field min/max Y   :   -60.2621   +60.2621 mm
   ------------------------------------------------

but there are only 8 layers.

Using https://github.com/APTG/2022_DCPT_MICE

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This issue reports a mismatch in the displayed energy layers when running a script from the 2022_DCPT_MICE repository. The output shows 16 energy layers, while there are actually only 8 layers in the plan.