From e9cd68bd4402fe51f1dd7ff636371ad4e288271a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Sep 2019 14:03:30 -0400 Subject: [PATCH] removed NoImageError call, class def, and import references since now redundant --- nd2reader/exceptions.py | 11 ----------- nd2reader/parser.py | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/nd2reader/exceptions.py b/nd2reader/exceptions.py index 55c598b..cb1b1fb 100644 --- a/nd2reader/exceptions.py +++ b/nd2reader/exceptions.py @@ -6,17 +6,6 @@ class InvalidVersionError(Exception): """ pass - -class NoImageError(Exception): - """No image found. - - Some apparent images in ND2s are just completely blank placeholders. These are used when the number of images per - cycle are unequal (e.g. if you take fluorescent images every 2 minutes, and bright field images every minute). - - """ - pass - - class EmptyFileError(Exception): """This .nd2 file seems to be empty. diff --git a/nd2reader/parser.py b/nd2reader/parser.py index 2bdcb58..746a79d 100644 --- a/nd2reader/parser.py +++ b/nd2reader/parser.py @@ -7,7 +7,7 @@ from pims.base_frames import Frame import numpy as np from nd2reader.common import get_version, read_chunk -from nd2reader.exceptions import InvalidVersionError, NoImageError +from nd2reader.exceptions import InvalidVersionError from nd2reader.label_map import LabelMap from nd2reader.raw_metadata import RawMetadata @@ -289,8 +289,6 @@ class Parser(object): empty_frame = np.zeros([height, width]) return timestamp, Frame(empty_frame, metadata=self._get_frame_metadata()) - # raise NoImageError # <-- delete? - def _get_frame_metadata(self): """Get the metadata for one frame