Skip to content

Commit

Permalink
doc string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Anthony committed Dec 6, 2021
1 parent dc08b83 commit 0cf20f2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/pwspy/dataTypes/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,23 @@ def loadRoi(self, name: str, num: int, fformat: RoiFile.FileFormats = None) -> R
return RoiFile.loadAny(self.filePath, name, num, acquisition=self)

def saveRoi(self, roiName: str, roiNumber: int, roi: Roi, overwrite: bool = False) -> RoiFile:
"""Save a Roi to file in the acquisition's file path."""
"""
Save a Roi to file in the acquisition's file path.
Args:
roiName: The name to identify this ROI
roiNumber: The number to identify this ROI
roi: The ROI object defining the ROI geometry
overwrite: If True then any existing ROIFile matching this name and number will be overwritten. Otherwise an OSError is raised.
Returns:
A reference to the new ROIFile
Raises:
OSError: If `overwrite` is False and an ROI of the same name and number
already exists then an OSError will be raised.
"""
return RoiFile.toHDF(roi, roiName, roiNumber, self.filePath, overwrite=overwrite, acquisition=self)

def deleteRoi(self, name: str, num: int, fformat: t_.Optional[RoiFile.FileFormats] = None):
Expand Down

0 comments on commit 0cf20f2

Please sign in to comment.