kylemath / pyoptical

Imagent optical imaging interface to MNE loading
MIT License
4 stars 1 forks source link

Read multiple boxy files #17

Open kuziekj opened 4 years ago

kuziekj commented 4 years ago

Right now, the boxy2mne function will only read a single boxy data file. However, participants may have multiple files associated with an experiment and boxy2mne should be able to read all relevant files. Naming scheme of files may be as follows (from p-pod manual):

"SS+subj+cf.nnn where SS is the "session label", subj is the (zero padded 3 or 4 digit) subject number, cf is the montage label and nnn is the 3 digit padded block number."

So, for example, a participant may have 4 files for an experiment (ar0738a.001, ar0738a.002, ar0738b.001, ar0738b.002). boxy2mne should be able to read all the participant files, along with a single .mtg and .elp file (since those contain channel information for all montages and blocks), and return a single raw object containing all the relevant data, info, channels, etc. for that participant.

kylemath commented 4 years ago

remember we are trying to match the nirx.py function - https://github.com/kylemath/pyoptical/blob/master/nirx.py so I think we want this function to load in single files, and then run it over and over and append the results? No?

kuziekj commented 4 years ago

Yeah running the function for each file would be the easiest way, so long as we can keep it in a format mne likes. We also need to make sure we can easily identify the data once it's all appended. Probably best to do that by editing channel names, or adding fields to the raw object (using info.update)

Either way, the boxy2mne function will need to know where to look in the .mtg when loading channel info since channels from all blocks (and montages?) are there. Unless we want to create separate .mtg files for each block and montage combination?

kylemath commented 4 years ago

yes I think that is better, we probably want to play for the future instead of making it work in the past data sets, as that is an infinite rabbit hole so what would our files be like?

an .elp file from the subject and a montage file of locations that match the channels of data file?

On Mon, Apr 27, 2020 at 9:35 AM kuziekj notifications@github.com wrote:

Yeah running the function for each file would be the easiest way, so long as we can keep it in a format mne likes. We also need to make sure we can easily identify the data once it's all appended. Probably best to do that by editing channel names, or adding fields to the raw object (using info.update)

Either way, the boxy2mne function will need to know where to look in the .mtg when loading channel info since channels from all blocks (and montages?) are there. Unless we want to create separate .mtg files for each block and montage combination?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kylemath/pyoptical/issues/17#issuecomment-620097090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA36GFNQQURNBH7YRP2LYSDROWX6RANCNFSM4MSALQSA .

-- Kyle E. Mathewson, Ph.D. Assistant Professor - Department of Psychology, Faculty of Science Director - Attention Perception and Performance Lab Affiliate - Neuroscience and Mental Health Institute, Faculty of Medicine and Dentistry University of Alberta P455 - Biological Sciences Building 11455 Saskatchewan Dr. Edmonton, Alberta, Canada, T6G 2E9 Phone: 1-780-492-2662 Email: kyle.mathewson@ualberta.ca Web: www.kylemathewson.com

kuziekj commented 4 years ago

yeah I think that file setup would be best (.elp for each participant and a .mtg file for each data file).

boxy2mne should already be able to handle such a setup.

do we want a separate function to combine the raw objects for each participant then?

kylemath commented 4 years ago

nope that isn't needed yet, that would be part of the example/tutorial

we need to push forward to making our function work more like the nirx import

On Mon, Apr 27, 2020 at 9:52 AM kuziekj notifications@github.com wrote:

yeah I think that file setup would be best (.elp for each participant and a .mtg file for each data file).

boxy2mne should already be able to handle such a setup.

do we want a separate function to combine the raw objects for each participant then?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kylemath/pyoptical/issues/17#issuecomment-620106452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA36GFPUNFHNPYEHXHAA5S3ROWZ6XANCNFSM4MSALQSA .

-- Kyle E. Mathewson, Ph.D. Assistant Professor - Department of Psychology, Faculty of Science Director - Attention Perception and Performance Lab Affiliate - Neuroscience and Mental Health Institute, Faculty of Medicine and Dentistry University of Alberta P455 - Biological Sciences Building 11455 Saskatchewan Dr. Edmonton, Alberta, Canada, T6G 2E9 Phone: 1-780-492-2662 Email: kyle.mathewson@ualberta.ca Web: www.kylemathewson.com