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

ValueError: Unexpected mismatching telegraph instruments #4

Open
AdityaAsopa opened this issue Jan 18, 2021 · 4 comments
Open

ValueError: Unexpected mismatching telegraph instruments #4

AdityaAsopa opened this issue Jan 18, 2021 · 4 comments

Comments

@AdityaAsopa
Copy link

Hi,
I get this error when I execute the simple command:
>x-to-nwb testRecording.abf

>>x-to-nwb testRec.abf
Converting testRec.abf
c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\ABF2Converter.py:168: UserWarning: Could not find the JSON file testRec.json with settings.
  warnings.warn(f"Could not find the JSON file {settings} with settings.")
Traceback (most recent call last):
  File "c:\users\adity\anaconda3\envs\lab\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\adity\anaconda3\envs\lab\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\adity\anaconda3\envs\lab\Scripts\x-to-nwb.exe\__main__.py", line 7, in <module>
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\conversion.py", line 217, in convert_cli
    convert(
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\conversion.py", line 97, in convert
    ABF2Converter(
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\ABF2Converter.py", line 95, in __init__
    self._check(abf)
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\ABF2Converter.py", line 213, in _check
    raise ValueError("Unexpected mismatching telegraph instruments.")
ValueError: Unexpected mismatching telegraph instruments.

Any information what is the source of the error. I am trying it on my personal machine after recording the data, and not on the rig computer.
Thanks

@AdityaAsopa
Copy link
Author

I have also tried, as described in the documentation:

>>x-to-nwb --no-searchSettingsFile testRec.abf

result: same error

>x-to-nwb --no-searchSettingsFile testRec.abf      
Converting testRec.abf
Traceback (most recent call last):
  File "c:\users\adity\anaconda3\envs\lab\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\adity\anaconda3\envs\lab\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\adity\anaconda3\envs\lab\Scripts\x-to-nwb.exe\__main__.py", line 7, in <module>
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\conversion.py", line 217, in convert_cli
    convert(
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\conversion.py", line 97, in convert
    ABF2Converter(
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\ABF2Converter.py", line 95, in __init__
    self._check(abf)
  File "c:\users\adity\anaconda3\envs\lab\lib\site-packages\x_to_nwb\ABF2Converter.py", line 213, in _check
    raise ValueError("Unexpected mismatching telegraph instruments.")
ValueError: Unexpected mismatching telegraph instruments.

@t-b
Copy link
Member

t-b commented Jan 19, 2021

@AdityaAsopa The error message is from

elif len(np.unique(abf._adcSection.nTelegraphInstrument)) > 1:
raise ValueError("Unexpected mismatching telegraph instruments.")

What does abf._adcSection.nTelegraphInstrument contain?

@AdityaAsopa
Copy link
Author

AdityaAsopa commented Jan 24, 2021

@t-b It prints an array:

abf._adcSection.nTelegraphInstrument = [24,0,0]
len(np.unique(abf._adcSection.nTelegraphInstrument))  = 2

My setup has only one channel (AI#0 of the DAC Digidata) telegraphed between multiclamp and clampex. Rest 2 channels are non-telegraphed external signals.

@AdityaAsopa
Copy link
Author

AdityaAsopa commented Jan 28, 2021

Out of the three inputs that the Digidata DAC is recording: AI0, AI1, AI2, only first channel is telegraphed. Rest two are manually set i.e. with no telegraphing.


>>> abf._adcSection.sTelegraphInstrument   
['MultiClamp 700', 'Unknown instrument (manual or user defined telegraph table).', 'Unknown instrument (manual or user defined telegraph table).']

That is incompatible with the def _check(self, abf): function as the following condition gets triggered:

elif len(np.unique(abf._adcSection.nTelegraphInstrument)) > 1:

What is the solution? For now, I have bypassed it in the source code and the conversion to NWB is working, although, it looks like the channel information is lost.

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

No branches or pull requests

2 participants