Comments (5)
I'm doing my Masters and will probably continue with my PhD working with EC-Lab quite a bit and I've just about had it with the .mpr file format which requires me to export the data manually every single time.
I completely agree!!!
I can't seem to get it to work as I get "ValueError: Unrecognised version for data module: 3" when I run
BioLogic.MPRfile("some_file.mpr")
Yup this is a bug. Well actually it's not implemented yet. It looks like they made a new version of their undocumented proprietary data format again. So it needs to be reverse engineered again.
@SomePythonUser Since I don't have that version yet. It would be a great help if you could attach a zip file to this issue containing the .mpr and the exported .mpt file so I can see what needs to be changed.
from galvani.
Thanks for your reply.
I'm using EC-Lab V11.30.
I've attached a zip file with a random .mpt file and the corresponding .mpr file below.
from galvani.
@SomePythonUser I think I have fixed the problem. It would be great if you could test it as I don't have the new software version.
To test:
- Download
BioLogic.py
from here:
https://raw.githubusercontent.com/echemdata/galvani/72d79146e65b4f7fc598d78cb3df07824bd65b92/galvani/BioLogic.py - Place
BioLogic.py
into your python script directory or working directory - In you script run
from BioLogic import MPRfile mpr = MPRfile('191007_Cu(100)_CV_03_CVA_C01.mpr') print(mpr.data)
- Try it with a few different files.
It would also be great if you could attach a zip file here with a .mpr and .mpt like before only this time for a very short run so the data file would be short enough to include with galvani for testing.
from galvani.
It works really well now. I've tried quite a few different files and I have no issues at all.
I've attached the smallest file, I could find below.
small_sample_files.zip
So, now I just have to stick with this version of EC-Lab, I guess.
Thank you for all your help, and thanks for sharing your work!
from galvani.
It works really well now. I've tried quite a few different files and I have no issues at all.
That's great, if you use pandas here's some code that you might find usefull. It cleans up the column names so they can be used with the df.column_name access:
def sanitize_labels(label):
return label.split('/')[0].lower().lstrip('-').translate(dict.fromkeys(map(ord, " ,|()-"),'_')).rstrip('_')
mpr = BioLogic.MPRfile("file_name.mpr")
df = pd.DataFrame(mpr.data)
df.columns = [sanitize_labels(label) for label in df.columns]
df['redox'] = mpr.get_flag('ox/red')
I've attached the smallest file, I could find below.
Looks great, thanks!
So, now I just have to stick with this version of EC-Lab, I guess.
They don't really seem to change the version of the data files that often, so upgrading shouldn't be problem again for a while.
from galvani.
Related Issues (20)
- CI is using up too much git-lfs bandwidth HOT 4
- Read Arbin files without writing temporary database
- Column 16/17 are not readable - `Analog IN 1/V`
- BioLogic: Unexpected end of file while reading data current module: b'VMP settings HOT 1
- NotImplementedError: Column ID 174 after column time/s is unknown HOT 2
- Use contextmanagers to ensure files are closed on errors
- Add a release checklist HOT 2
- Column ID 175, 176, 177, 182, 215, 475, 478, 481, 503 unknown HOT 5
- how to find Dtype for unknown columns ? HOT 1
- more of a question than an issue, i am not seeing all of the columns that are in the data set in the output of the biologic.mprfile data HOT 5
- Not implemented error (Column ID 185) HOT 1
- Numpy 2.0.0 breaks BioLogic.MPTfile() HOT 1
- column 6 has wrong label HOT 1
- column 11 has wrong label
- Incompatibility with EC-Lab>=11.50 - BioLogic.MPRfile issue HOT 27
- Unable to read res files with mdbtools>=1.0 HOT 3
- Maintenance status + sustainability HOT 10
- Something to cite HOT 2
- OSError: Unexpected end of file while reading data might due incompatibility with EC-lab 11.50 HOT 1
- [sugestion] Get more precise start date without log module HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from galvani.