When using mSTIR.AcqusitionData
, the code checks for a .
in the filename. If there isn't a .
, a confusing error is thrown.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
if there is no '.' the argument is interpreted as a scanner name
what error do you get?
I accidentally entered the filename without an extension and it threw the error below:
ERROR: construct_proj_data_info: span 1 is too large for a scanner with 0 rings
Error using mUtilities.check_status (line 29)
???
ERROR: construct_proj_data_info: span 1 is too large for a scanner with 0 rings
exception thrown at line 482 of /Users/rich/Documents/OneDrive-UCL/Code/SIRF/Source/src/xSTIR/cSTIR/cstir.cpp
Error in mSTIR.AcquisitionData (line 93)
mUtilities.check_status(self.name, self.handle_);
Error in reconstruction (line 10)
randoms = mSTIR.AcquisitionData(randoms_file);
The error is understandable now that you've said that it would be interpreted as a scanner name. However, it might be confusing for a user that makes a silly error (like me).
ok I will make it throw 'unknown scanner' error (I thought STIR would do it, but apparently not)
better still 'unknown scanner or missing file extension'
I would say that the latter of the two suggestions is better.
done on devel
Closed #125.