Skip to content

Commit

Permalink
Merge 4769aaa into 0232234
Browse files Browse the repository at this point in the history
  • Loading branch information
crcrewso committed Mar 17, 2021
2 parents 0232234 + 4769aaa commit 6ed9803
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pylinac/winston_lutz.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,23 @@ def results(self, as_list: bool=False) -> str:
if not as_list:
result = '\n'.join(result)
return result

def results_data(self):
"""Return the analysis results as a dictionary."""
return_dict = {}
return_dict['cax2bb max'] = self.cax2bb_distance('max')
return_dict['cax2bb median'] = self.cax2bb_distance('median')
return_dict['cax2epid max'] = self.cax2epid_distance('max')
return_dict['cax2epid median'] = self.cax2epid_distance('median')
return_dict['coll iso size'] = self.collimator_iso_size
return_dict['couch iso size'] = self.couch_iso_size
return_dict['gantry iso size'] = self.gantry_iso_size
return_dict['gantry coll iso size'] = self.gantry_coll_iso_size
return_dict['MechRad x'] = -1 *self.bb_shift_vector.x
return_dict['MechRad y'] = -1 * self.bb_shift_vector.y
return_dict['MechRad z'] = -1 * self.bb_shift_vector.z
return_dict['axis rms dev'] = self.axis_rms_deviation
return return_dict

def publish_pdf(self, filename: str, notes: Optional[Union[str, List[str]]]=None, open_file: bool=False, metadata: Optional[dict]=None):
"""Publish (print) a PDF containing the analysis, images, and quantitative results.
Expand Down
4 changes: 4 additions & 0 deletions tests_basic/test_winstonlutz.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def test_bb_shift_instructions(self):
self.assertTrue("RIGHT" in move)
self.assertTrue("VRT" in move)

def test_results_data(self):
self.assertTrue(bool(self.wl.results_data())) # empty dictionaries evaluate to false



class TestPublishPDF(TestCase):

Expand Down

0 comments on commit 6ed9803

Please sign in to comment.