Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mapvbvd/twix_map_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,12 @@ def clean(self):
self.NIdc = np.max(self.Idc) + 1
self.NIdd = np.max(self.Idd) + 1
self.NIde = np.max(self.Ide) + 1

if int(self.NLin) == 1<<16:
if len(self.Lin) > self.NLin // self.NRep:
logging.warning('NLin is at maximum value for uint16, this may cause issues with indexing, trrying to fix')
self.NLin = len(self.Lin) // self.NRep
self.Lin = np.arange(self.NLin)

# ok, let us assume for now that all NCol and NCha entries are
# the same for all mdhs:

Expand Down
Loading