Starshot issues

Greetings, I’m a bit new to the project and have been trying unsuccessfully to perform a Starshot analysis using multiple dicom images acquired on a Varian Halcyon v1.0 EPID.
This run was performed on a Ubuntu 16.04 with python3.6.9 and e venv for the pylinac, I’ve also tried running on anaconda with the same result. The same test set of images was successfully analyzed by a colleague of mine using pylinac at his center.

The script I’m trying to use looks something like this

from pylinac import Starshot

star_imgs = [
“./films/RI.QA_MV_0_0a.dcm”,
“./films/RI.QA_MV_0_0a1.dcm”,
“./films/RI.QA_MV_0_0a2.dcm”,
“./films/RI.QA_MV_0_0a3.dcm”
]

mystar = Starshot.from_multiple_images(star_imgs)
mystar.analyze()

And i get this error message

/home/sysadm/.local/lib/python3.6/site-packages/numpy/core/_methods.py:160: RuntimeWarning: overflow encountered in reduce
ret = umr_sum(arr, axis, dtype, out, keepdims)
/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/image.py:547: RuntimeWarning: invalid value encountered in double_scalars
dist_to_5 = abs(p50 - p5)
/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/image.py:548: RuntimeWarning: invalid value encountered in double_scalars
dist_to_95 = abs(p50 - p95)
/home/sysadm/.local/lib/python3.6/site-packages/numpy/lib/function_base.py:1280: RuntimeWarning: invalid value encountered in subtract
a = op(a[slice1], a[slice2])
Traceback (most recent call last):
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 237, in _get_initial_peak
initial_peak = initial_peak_arr[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “starshot.py”, line 11, in
mystar.analyze()
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/decorators.py”, line 73, in wrapper
return func(*args, **kwargs)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/starshot.py”, line 214, in analyze
start_point = self._get_reasonable_start_point()
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/starshot.py”, line 157, in _get_reasonable_start_point
fwxm_x_point = SingleProfile(x_sum).fwxm_center(80) + left_third
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 371, in fwxm_center
fwxm = self.fwxm(x, interpolate=interpolate)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 359, in fwxm
li = self._penumbra_point(LEFT, x, interpolate)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/decorators.py”, line 73, in wrapper
return func(*args, **kwargs)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 275, in _penumbra_point
peak = copy.copy(self._initial_peak_idx)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 214, in _initial_peak_idx
x_idx = self._get_initial_peak(self._passed_initial_peak)
File “/home/sysadm/.local/lib/python3.6/site-packages/pylinac/core/profile.py”, line 243, in _get_initial_peak
raise ValueError(“A reasonable initial peak was not found in the profile. Ensure peak is not at profile edge”)
ValueError: A reasonable initial peak was not found in the profile. Ensure peak is not at profile edge

The .from_multiple_images() method is a bit finicky because there’s a lot of error checking that needs to be done and pylinac doesn’t handle all of them properly. Can you upload the images here and I’ll see what I can do: https://www.dropbox.com/request/YKRu4AmuPsXu55uQq761

Thanks

I uploaded the images last week and was wondering have you had the time to try them out.

Thanks in advance

This should be fixed in the upcoming release.