-
Notifications
You must be signed in to change notification settings - Fork 17
Intan loader #73
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
Intan loader #73
Conversation
Thanks @tdincer. Drafted this pull request since we wouldn't want to add hardcoded paths to this package. |
@kabilar This PR is to a new branch. It's meant to keep track of the changes. Iterations should be done forking this PR. Not by copy pasting the content. |
@JaerongA What do we need to return to make this loader useful for array-ephys? |
The original intan code used to ouput everything (including all the parameters) into a single dictionary format. We might needs parameter values as well. To be completely sure of what's really needed, it'd be worth ingesting some sample data in the |
return header | ||
|
||
|
||
def load_rhs(folder: str, file_expr: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def load_rhs(folder: str, file_expr: str): | |
def load_rhs(folder: str): |
I don't think regex need to be specified here as an argument. This is supposed to fetch whatever that's inside the data folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It adds flexibility to not read everything. Say the files are amp-B-000.dat ... to amp-B-015.dat
, amp-D-000.dat ... to amp-D-015.dat
and board-DIGITAL-IN-01.dat
.
To read all channels (A and B) in the working directory:
load_rhs(".", "amp*")
To read only the B
channels in the working directory:
load_rhs(".", "amp-B*")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Then we can keep that and set the default to e.g.,*.dat
(read everything) and allow a user to specify if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdincer. Looks like this only reads from amp.dat files. Some sessions have digital input and stimulus files.
Based on the "One file per channel type format" section of the official intan manual (page 11): https://intantech.com/files/Intan_RHS2000_data_file_formats.pdf
Task list:
read_qstring
andread_header
functions should be imported from intan. We need to decide on how to operate the intan. I guess the decision will be made with Alessio.For the completeness of the discussion: