Closed t-b closed 4 years ago
I like these checks, though this would create errors on read for pynwb files that are technically to spec but have one of these mistakes. If a file is written in MatNWB where these checks don't exist, then it may not be able to be read in pynwb. So maybe it's better if we throw warnings instead?
These checks are applied during write in pynwb only. So this should not be a problem for existing buggy data.
All arguments should be optional, of course skipping all does not make sense.
If both stimulus and response are PatchClampSeries they should also both reference the same electrode and sweep (if not raise an exception).
It should also raise an error if you mix stimulus and response in a intracellular recording in an erroneous way.
The valid combinations are: