Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntanRecordingInterface should not be allowed to write streams other than the amplifier channels #790

Closed
h-mayorquin opened this issue Mar 27, 2024 · 2 comments · Fixed by #794
Assignees

Comments

@h-mayorquin
Copy link
Collaborator

From the current discussionin #789 it seems that IntanRecordingInterface should only write data with stream_id=0: the amplifier channels. Reason being that we write the data as an ElectricalSeries following the ecephys pipeline. This means that if any other stream is choosen the data will be incorrectly written.

The current signature of IntanRecordingInterface allows the user to specify the stream_id which leads to the problem described above.

def __init__(
self,
file_path: FilePathType,
stream_id: str = "0",
verbose: bool = True,
es_key: str = "ElectricalSeries",
):
"""
Load and prepare raw data and corresponding metadata from the Intan format (.rhd or .rhs files).
Parameters
----------
file_path : FilePathType
Path to either a rhd or a rhs file
stream_id : str, optional
The stream of the data for spikeinterface, "0" by default.
verbose : bool, default: True
Verbose
es_key : str, default: "ElectricalSeries"

Should we change this to avoid this scenario?
Pros and cons?

@h-mayorquin h-mayorquin self-assigned this Mar 27, 2024
@h-mayorquin h-mayorquin changed the title IntanRecordingInterface should not be allow to write streams other than the amplifier channels IntanRecordingInterface should not be allowed to write streams other than the amplifier channels Mar 27, 2024
@CodyCBakerPhD
Copy link
Member

If Intan as a format is that reliable in terms of a particular stream ID mapping onto proper neural channels, then sure we can just restrict the interface to that stream

The argument is usually left open for other formats though out of necessity to select which neural stream in the event of multiple probes, channel groups, bands, etc.

@h-mayorquin
Copy link
Collaborator Author

Yeah, stream_0 is fixed at neo to be the amplifier channels.

It is not clear to me if all the amplifier channels should always be ElectricalSeries but at that point there is nothing we do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants