jrkerns / pylinac

An image analysis library for medical physics
https://pylinac.readthedocs.io/en/latest/
MIT License
157 stars 99 forks source link

Passing picket_spacing to PicketFence.analyze throws UnboundLocalError #381

Open randlet opened 3 years ago

randlet commented 3 years ago

Describe the bug

If you specify picket_spacing in the PicketFence.analyze method, peak_idxs doesn't get calculated and therefore throws an UnboundLocalError here.

To Reproduce Steps to reproduce the behavior:

from pylinac.picketfence import PicketFence

picket = PicketFence("picket.dcm")
picket.analyze(picket_spacing=115)