-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Milestone
Description
SIRF Python: I am allocating an ImageData using the allocate. In CIL we can allocate just the memory, without setting it. I have done the same with a SIRF DataContainer but it fails. What I see is
python ../../../../buildVM/sources/SIRF/examples/Python/PETMR/PET_MCIR.py -T "fwd_tm_ms_*.txt" -t tm -S "raw_FDG_ms*hs" -r "FGP_TV" -i 100 -s 100 --visualisations -v 0 -o spdhg --algorithm="spdhg"
Setting up acquisition models...
Setting up reconstructor...
Will output results to: spdhg.log
SPDHG setting up
wrong fill value. Should be ImageData, numpy.ndarray, float or int
Notice that the program ends without raising an exception but just printing to screen. So I don't have a clue where it all went wrong. There's a clue: it is a fill method, either ImageData.fill or AcquisitionData. Turns out to be the second.
In this particular case, we could change the raise error("wrong fill value") call with a
raise TypeError("Wrong fill value. Expecting ImageData, numpy.ndarray, float or int, got {}"\
.format(type(value))I'd suggest that we use standard Python error types in our calls and create a new exception for errors that come from the engine: EngineError
Metadata
Metadata
Assignees
Labels
No labels