Browse Source

More informative warning if gap frames encountered and filled with np.nan

zolfa-add_slices_loading
unknown 5 years ago
parent
commit
17881d60f1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nd2reader/parser.py

+ 1
- 1
nd2reader/parser.py View File

@ -288,7 +288,7 @@ class Parser(object):
# errors with ND2-files with missing frames. Array is filled with nan to reflect that data is missing.
else:
empty_frame = np.full((height, width), np.nan)
warnings.warn('ND2 file contains gap frames which are represented by np.nan-filled arrays')
warnings.warn('ND2 file contains gap frames which are represented by np.nan-filled arrays; to convert to zeros use e.g. np.nan_to_num(array)')
return timestamp, Frame(empty_frame, metadata=self._get_frame_metadata())
def _get_frame_metadata(self):


Loading…
Cancel
Save