Skip to content

Commit

Permalink
Potential solution to issue #375
Browse files Browse the repository at this point in the history
  • Loading branch information
crcrewso committed Apr 21, 2021
1 parent 90f261b commit 4fc8237
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pylinac/ct.py
Expand Up @@ -1295,20 +1295,20 @@ def results_data(self) -> Dict:
'CatPhan roll (degrees)': self.catphan_roll,
'Origin slice (CTP404)': self.origin_slice,
'Num images': self.num_images,
'Modules': [{mod.attr_name: offset} for mod, offset in self.modules.items()]}
'Modules': {mod.attr_name: offset for mod, offset in self.modules.items()}}

# CTP 404 HU stuff
data['CTP404 HU ROI settings'] = self.ctp404.roi_settings
data['CTP404 HU ROI background settings'] = self.ctp404.background_roi_settings
data['CTP404 HU ROI values'] = [{name: {'avg value': val.pixel_value, 'cnr': val.cnr,
data['CTP404 HU ROI values'] = {name: {'avg value': val.pixel_value, 'cnr': val.cnr,
'difference': val.value_diff, 'nominal value': val.nominal_val,
'passed': val.passed}} for name, val in self.ctp404.rois.items()]
'passed': val.passed} for name, val in self.ctp404.rois.items()}
data['CTP404 HU tolerance (HU)'] = self.ctp404.hu_tolerance
data['CTP404 HU linearity passed?'] = self.ctp404.passed_hu

# CTP 404 Geometry stuff
data['CTP404 Geometry ROI analysis size setting (mm)'] = self.ctp404.geometry_roi_size_mm
data['CTP404 Geometry ROI distances (mm)'] = [{name: l.length_mm} for name, l in self.ctp404.lines.items()]
data['CTP404 Geometry ROI distances (mm)'] = {name: l.length_mm for name, l in self.ctp404.lines.items()}
data['CTP404 Geometry AVG distance (mm)'] = self.ctp404.avg_line_length
data['CTP404 Geometry passed?'] = self.ctp404.passed_geometry

Expand All @@ -1330,7 +1330,7 @@ def results_data(self) -> Dict:
if self._has_module(CTP528CP504):
data['CTP528 Spatial Resolution ROI settings'] = self.ctp528.roi_settings
data['CTP528 Spatial Resolution start angle (radians)'] = self.ctp528.start_angle
data['CTP528 Spatial Resolution rMTFs (lp/mm)'] = [{p: self.ctp528.mtf.relative_resolution(p)} for p in (80, 50, 30)]
data['CTP528 Spatial Resolution rMTFs (lp/mm)'] = {p: self.ctp528.mtf.relative_resolution(p) for p in (80, 50, 30)}

# CTP 515 stuff
if self._has_module(CTP515):
Expand Down

0 comments on commit 4fc8237

Please sign in to comment.