Unable to load intan file with extension .rhs

I am using intan RHS2116 for getting eeg data. my file extension is in .rhs, while the extension option is .rhd
please, tell me if I can read the file?

@mpompolas ?

I wasn't aware of the .rhs when I supported the Intan system.

I worked on the .rhd, which has 3 ways of saving the data:

  1. traditional - one single file for everything
  2. one file per signal
  3. one file per signal type
    So far I supported types 1 and 2 (I plan on adding the 3rd one soon.)

I see on the website that the .rhs also uses these 3 ways of saving the data.
I would assume that the .rhs and .rhd would use the same importer that I currently modified for Brainstorm, and just check for a different "magic number" (automated testing of the loader). However this might not be true since I modified an older importer (version 2016).

I can't find an .rhs dataset @afraiz. If you can send me a very small example dataset, I can do a quick check on the existing code to see if it can be quickly modified to accomodate the "magic number" check. If more work is needed unfortunately I won't be able to help you since I don't currently have time for working on this.

I'll leave the link here, in case this is not a quick fix and someone is interested in adding support for .rhs:
http://intantech.com/downloads.html

Thank you dear mpompolas for your response.

I am saving the data as first file format (traditional).

I have shared the .rhs dataset example

[https://www.dropbox.com/s/zxclu32bo3fzb7e/eeg2_190522_151747.zip?dl=0]

Thanks,

@afraiz Unfortunately the importer needs a new modified .rhs loader.
This would need some time.

@Francois @MartinC you can decide if you'd like to work on this.
Here is the link for the loader:
http://intantech.com/files/RHS2000_MATLAB_functions_v1_0.zip

I can take care of this, it shouln't be too complicated.

1 Like

I tried to reproduce what @mpompolas did for the RHD files. I copied and pasted most of it, but even with an example file, I can't test anything because I have no idea what I'm manipulating, it might be completely wrong.
https://github.com/brainstorm-tools/brainstorm3/commit/01d27eb7f972f34ea9500890215e6f6d1b139159

@afraiz Please update Brainstorm and see what you get.
If it doesn't make any sense, please post additional information on what your example file is supposed to look like.

Thank you guys mpompolas and Francois and Sorry for late reply because of holidays here.

I can upload the data (.rhs) now, but After uploading data I am getting the following error

111125

can you tell about it??

I didn't have this problem because I don't have the Matlab toolbox that includes this function "bi2de", and the replacement in Brainstorm seems to be working well.
Can you try commenting out the lines 236-239 in function brainstorm3/toolbox/io/in_fopen_intan.m?
This way you should be able to move forward (to the next problem...) while we figure this detail out.

@mpompolas Why using bi2de if your bst_bi2de works?
Do you suspect there is another issue one level up in in_fopen_intan?

1 Like

I didn't add the Bst_bi2de. This was added on a later version by Martin in order to avoid the usage of the toolbox it needs.

I tried to import an .rhd to debug this but the magic number appears to be faulty (there is a different magic number for .rhd and .rhs).

Just confirmed that both bst_bi2de and bi2de give the same result so I removed the one with the toolbox dependency.

Corrected these in: https://github.com/brainstorm-tools/brainstorm3/pull/218

Thank you guys,
I have commented lines 236-239 in that function (in_fopen_intan.m) and now there is no error..Thanks

We fixed the problem in a more permanent way.
Please update Brainstorm, and let us know if everything works correctly now.