Skip to content

Commit

Permalink
slight lint
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Sep 11, 2024
1 parent 585f580 commit 0a7744c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SIRF_data_preparation/Mediso_NEMA_IQ/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cd Mediso_NEMA_IQ/
# trim sinograms to avoid "corner" problems in mult_factors
# TODO for next data: use 30 (as some problems remain)
for f in additive_term.hs mult_factors.hs prompts.hs; do
SSRB -t 20 $f $orgpath/sinograms/$f;
SSRB -t 20 $f $orgpath/sinograms/$f
done
# alternative if we don't need to trim
#cp -rp $orgpath/sinograms/* .
Expand Down
5 changes: 3 additions & 2 deletions SIRF_data_preparation/Mediso_NEMA_IQ/prepare.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Set NaNs to zero in additive_term
import sirf.STIR
import numpy as np

import sirf.STIR

additive = sirf.STIR.AcquisitionData('additive_term.hs')
add_arr = additive.as_array()
add_arr = np.nan_to_num(add_arr)
new_add = additive.clone()
new_add.fill(add_arr)
new_add.write('additive_term.hs')

3 changes: 2 additions & 1 deletion petric.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def keys(self):

class MetricsWithTimeout(cil_callbacks.Callback):
"""Stops the algorithm after `seconds`"""
def __init__(self, seconds=600, outdir=OUTDIR, transverse_slice=None, coronal_slice=None, sagittal_slice=None, **kwargs):
def __init__(self, seconds=600, outdir=OUTDIR, transverse_slice=None, coronal_slice=None, sagittal_slice=None,
**kwargs):
super().__init__(**kwargs)
self._seconds = seconds
self.callbacks = [
Expand Down

0 comments on commit 0a7744c

Please sign in to comment.