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

Implement functionality to read Matrix device files (format: .bin) #1253

Open
jhmigueles opened this issue Jan 22, 2025 · 5 comments
Open

Implement functionality to read Matrix device files (format: .bin) #1253

jhmigueles opened this issue Jan 22, 2025 · 5 comments
Assignees

Comments

@jhmigueles
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Matrix devices store binary (bin) files, currently reading of these files is not supported by GGIR or GGIRread.

Describe the solution you'd like
Implementation of reading of bin files stored by Matrix devices.

Describe alternatives you've considered
The manufacturer has a python script to convert bin files into csv files. These csv files can be read in GGIR through the read.myacc.csv functionality, but it is cumbersome to convert files to csv.

@vincentvanhees
Copy link
Member

Hi Jairo, one general observation. If possible, could you try to refer to this device in the code with a specific and recognisable name. The term "matrix" already has a meaning in R context, which would make the code difficult to read if we also use Matrix in this context. Also when searching online for a sensor named Matrix it is impossible to find anything based on that name alone.

How about including the name of the manufacturer and abbreviating the word matrix? For example, if the sensor is made by company Abc then maybe refer to it as AbcMTX, AbcMat? In the documentation you could then clarify in detail what it is.

@jhmigueles
Copy link
Collaborator Author

Thanks Vincent, I have referred to the Matrix as parmay_mtx following your recommendation.

I am nearly finished with the updates to GGIRread and GGIR. However, we now need to coordinate the next steps to ensure everything integrates smoothly. The key change is that GGIRread includes a new function, readMatrix, which will be introduced in version 1.0.3. Since this function is used in GGIR, the Imports field in the DESCRIPTION file in GGIR has been updated to require GGIRread (>= 1.0.3). The challenge is that the checks for the GGIR branch are failing because the 1.0.3 version of GGIRread is not available yet.

Next Steps:

  • I asked my contacts to collect some new data using different sampling frequencies to make sure that the blocksize definition for reading the matrix data in GGIR makes sense across sampling frequencies.
  • I will request them to also provide a small file (5–10 minutes in duration) to include in the test files for GGIRread.

@vincentvanhees
Copy link
Member

Ok, I will wait for the PR in the GGIRread repo first. In that way I will also be able to understand a later PR for GGIR.

Maybe also rename readMatrix to readParmayMatrix? It is an internal function, so for GGIR users it will not make a difference. I am only concerned about readability for GGIR(read) code contributors.

Btw - I noticed you tried to rebuild the gh-pages in your branch. I think it is easier for both of us if we do not do this in branches, instead I think it is best if only I do it in the master branch prior to each new release. In this way we never risk merge problems with the hundreds of files related to the gh-pages.

@jhmigueles
Copy link
Collaborator Author

Maybe also rename readMatrix to readParmayMatrix?

Yes, makes sense, done.

Btw - I noticed you tried to rebuild the gh-pages in your branch.

That's right, should I go back to the previous version? Not sure if that's possible since I already pushed the changes, sorry about that.

@vincentvanhees
Copy link
Member

vincentvanhees commented Jan 23, 2025

should I go back to the previous version?

In GitHub desktop you can undo a specific commits, I think that is the easier solution. Just make sure the PR does not have change to all those html files in it.

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

No branches or pull requests

2 participants