dgbowl / yadg

yadg: yet another datagram
https://dgbowl.github.io/yadg
GNU General Public License v3.0
35 stars 12 forks source link

Extract data from BioLogic mpr files for "Constant Current" and "Constant Voltage" techniques #185

Open carla-terboven opened 1 day ago

carla-terboven commented 1 day ago

Hello, I wonder if it is possible to add the BioLogic techniques Constant Current and Constant Voltage to your mpr extractor.

At the moment Constant Current gives me a Key Error 118 and Constant Voltage gives Key Error 117.

Complete Error Message

Traceback (most recent call last):
  File "/localpath/Downloads/example_files/mpr_data.py", line 82, in <module>
    data = yadg.extractors.extract(filetype='eclab.mpr', path=file_path)
  File "/localpath/.venvs/eclab/lib/python3.10/site-packages/yadg/extractors/__init__.py", line 54, in extract
    return extract_from_path(path, extractor)
  File "/localpath/.venvs/eclab/lib/python3.10/site-packages/yadg/extractors/__init__.py", line 75, in extract_from_path
    ret: DataTree = func(fn=path, **vars(extractor))
  File "/localpath/eclab/lib/python3.10/site-packages/yadg/extractors/eclab/mpr.py", line 610, in extract
    settings, params, ds, log, loop = process_modules(mpr)
  File "/localpath/.venvs/eclab/lib/python3.10/site-packages/yadg/extractors/eclab/mpr.py", line 570, in process_modules
    settings, params = process_settings(module_data, minver)
  File "/localpath/.venvs/eclab/lib/python3.10/site-packages/yadg/extractors/eclab/mpr.py", line 260, in process_settings
    technique, params_dtypes = technique_params_dtypes[data[0x0000]]
KeyError: 118
PeterKraus commented 1 day ago

Hello @carla-terboven, do you have example mpr files I could use to implement this?

carla-terboven commented 1 day ago

Thank you for the fast response. I need to check if I have permission to upload the data here and hopefully share the file soon.

PeterKraus commented 1 day ago

If you cannot share the data here for confidentiality reasons, see if you can share the files with me privately, in confidence; if yes, please email me at peter.kraus@tu-berlin.de. Thanks!

carla-terboven commented 6 hours ago

Thank you for the offer with your mail. It was about confidence but we managed to create example files for the issue. Please find them here: examplefiles.zip