We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08d1291 commit 63dbd12Copy full SHA for 63dbd12
element_array_ephys/readers/spikeglx.py
@@ -165,8 +165,12 @@ def validate_file(self, file_type="ap"):
165
file_path = self.root_dir / (self.root_name + f".{file_type}.bin")
166
file_size = file_path.stat().st_size
167
168
- meta_mapping = {"ap": self.apmeta, "lf": self.lfmeta}
169
- meta = meta_mapping[file_type]
+ if file_type == "ap":
+ meta = self.apmeta
170
+ elif file_type == "lf":
171
+ meta = self.lfmeta
172
+ else:
173
+ raise KeyError(f"Unknown file_type {file_type} - must be 'ap' or 'lf'")
174
175
if file_size != meta.meta["fileSizeBytes"]:
176
raise IOError(
0 commit comments