This allows the POI manager to load an ROI file with a single POI.
Description
Add the ndmin argument to loadtxt to ensure the shape is correct even when there is only one POI to load. Previously the resulting shape for poi_names was () and for poi_coords was (3,), but with the fix it now has the correct shapes (1,) and (1, 3).
I can confirm the bug and the fix looks fine.
@nbeaver Do you want to contribute this to qudi-iqo-modules as an PR as well? Alternatively, I can also push your fix there but this would drop your credit.
This allows the POI manager to load an ROI file with a single POI.
Description
Add the
ndmin
argument toloadtxt
to ensure the shape is correct even when there is only one POI to load. Previously the resulting shape forpoi_names
was()
and forpoi_coords
was(3,)
, but with the fix it now has the correct shapes(1,)
and(1, 3)
.Motivation and Context
Currently, the POI manager will fail with an IndexError when attempting to load an ROI with a single ROI since
loadtxt
defaults to squeezing the dimensions.How Has This Been Tested?
I have tested it manually by loading an ROI with a single POI.
Types of changes
Checklist:
documentation/changelog.md
)