phys2bids
phys2bids copied to clipboard
If an AcqKowledge file is both in .txt and .acq format and you input the txt, the program reads the acq file instead
Expected Behavior
Reading txt file: phys2bids -in Test_belt_pulse_samefreq.txt -info -chtrig 2 File extension is .txt Reading the file phys2bids detected that your file is in AcqKnowledge format Interval is not in seconds. Converting its value. RESP - RSP100C PULSE - Custom, DA100C MR TRIGGER - Custom, HLT100C - A 5 PPG100C CO2 O2 Reading infos File Test_belt_pulse_samefreq.txt contains:
- RESP - RSP100C; sampled at 10000.0 Hz
- MR TRIGGER - Custom, HLT100C - A 5; sampled at 10000.0 Hz
- PPG100C; sampled at 10000.0 Hz
- CO2; sampled at 10000.0 Hz
- O2; sampled at 0.0 Hz saving channels plot at plot at Test_belt_pulse_samefreq.png
Actual Behavior
Steps to Reproduce the Problem
phys2bids -in phys2bids/phys2bids/tests/data/Test_belt_pulse_samefreq.txt -info -chtrig 2 File extension is .acq Reading the file 00. Channel RESP - RSP100C: 1336815 samples, 10000.0 samples/sec, loaded: True 01. Channel PULSE - Custom, DA100C: 1336815 samples, 10000.0 samples/sec, loaded: True 03. Channel PPG100C: 1336815 samples, 10000.0 samples/sec, loaded: True 04. Channel CO2: 1336815 samples, 10000.0 samples/sec, loaded: True 05. Channel O2: 1336815 samples, 10000.0 samples/sec, loaded: True Reading infos File phys2bids/phys2bids/tests/data/Test_belt_pulse_samefreq.acq contains:
- RESP - RSP100C; sampled at 10000.0 Hz
- PULSE - Custom, DA100C; sampled at 10000.0 Hz
- PPG100C; sampled at 10000.0 Hz
- CO2; sampled at 10000.0 Hz
- O2; sampled at 10000.0 Hz saving channels plot at plot at Test_belt_pulse_samefreq.png
Specifications
- Python version: Python 3.6.9
- phys2bids version:phys2bids v1.2.0-beta+36.g24df90f.dirty
- Platform: ubuntu
Possible solution
@smoia, should we left this as it is? or if the user inputs the .txt format that should prevail?
@vinferrer, I think we have many options here:
- we can tweak the "automatic extension finder" so that it gives priority to whatever extension the user provides
- we can remove the "automatic extension finder" and always ask for an extension
- we can decide that an extension is more important.
In the latter case, I would privilege native file formats, as theoretically they should contain more information. In this case, acq would be privileged compared to txt. However, option 1 makes total sense, shall we want to proceed in that direction. Why don't we discuss about it during a dev call? Maybe this month the agenda is a bit packed, but next time for sure!