jepegit / cellpy Goto Github PK
View Code? Open in Web Editor NEWextract and tweak data from electrochemical tests of cells
License: MIT License
extract and tweak data from electrochemical tests of cells
License: MIT License
We should improve the API for the cellpy.cellreader.CellpyData objetct.
renaming the DataFrames
define a getter for datasets
other things?
Instead of relying on the automatic assignment on step types made by cellpy, it should be possible to import them from a file
Arbin didnt log file when changing from cycle 2 to cycle 3. Filename: 20170519_SM_sic020_09_cc_01.res
between cycle 2 and cycle 3.
This happens because arbin did not include the last cycle in its statistics table, probably due to abort before cycle was finished.
Maybe also add last row and check if it is included in stat-file
When trying to read a .res Arbin file, if the Test_ID
exists in the Global_Table
but no data exists in the Channel_Normal_Table
, the program will fail. Why there is no data for the first test is unclear, but this case exists. Interestingly enough, the failure manifests itself in two different places depending on whether you run on Linux or Windows. On Windows normal_df
is set to None by default, where as on Linux you just get a dataframe with columns but no data.
Fix cellpy file format
The CellpyData.sget_current
method is not properly implemented yet. It should operate in the same way as CellpyData.sget_voltage
(almost copy-paste).
The method is in the cellreader.py file.
Create a tutorial on readthedocs including:
To get the initial voltage relaxation due to ohmic resistance (IR), we need the first measured points to be weighed extra "heavy". This should both be an 1) "method" option (e.g. "initial_hard") and 2) user supplied 1d np array with weights or uncertainties (with same length as the data to be fitted).
Implement density of states type of creating dqdv as an option in utils.ica
The "standard" script used for batch-processing runs is severely outdated and should be completely rewritten.
We need to agree on what we want the script to do etc.
Step 3. meta data extraction
Step 4. implement into Batch
We will use git flow from here on. Initialisation of git flow should be done.
It would be beneficial (for some users, for example me) to have a cli command for creating a new Jupyter
notebook session.
It could for example be:
$ cellpy new -n exp001 -t batch -s lab -d cellpydir\processing
It then creates a starting (a set of) notebook(s) and (optionally) runs a Jupyter
server.
There should be sensible default options.
The directory for saving the files should be taken from the config file if not specified.
It should be possible to define location (and "label") for the template (-t) files in the config file(at least when finished).
It is probably beneficial to rig the templates so that they can be run by papermill
also.
We should also provide a batch file and a short-cut for windows users.
Python 3 compatibility by using futurize
The journal file currently only stores the original info about the different cells. It would be nice if it could also store some history about post-processing of the cell tests - and in particular:
Might also be nice to have:
The build at RTD crashes. This time it is missing the pyodbc package. Need to include it into the dependencies. Note to myself: It is probably worth to do the devel in a virtual environment.
I'll work on a feature where a user can easily insert a file name and eventual additional information (e.g. active material mass) and get plots out straight away. Speed and ease of use will be prioritized.
It will be accessible from a premade jupyter notebook for easy access for non-tech-savvy users.
Done list
[x] Galvanostatic cycling data plot
[x] dqdv plot (integrated in GC plot and alone)
[x] Cyclelife plot with arbitrary amount of datafiles and coulombic efficiency
[x] flip single dQdV plot to have dQdV on y axis
[x] remove decimal ticklabels for small amounts of cycles in cyclelife plot
[x] add space between "Cycle" and cycle number when you plot specific cycles.
[x] Make sure user cannot break the output directory
[x] Arbin5 SQL integration
[x] Plot GC curves from multiple files in same window (e.g. to compare formation cycles)
[x] Colorbars expand figure in stead of squishing the plot
[x] Exclude specific cycles
Todo list:
[] be able to insert entire folder in files list
[] Beeing able to normalize capacity on GC plot
[] File-specific input parameters, e.g. nickname, active mass, specific cycles
[] Add calculated C-rate possibility on cyclelife plot
[] Add IR data possibility on cyclelife plot
[] Notify users if they exceed 8 datafiles (thus more than 8 colors available in the tableau palette of matplotlib)
The parameter file should be augmented to include settings on:
Work by Vilde (summer student) supervised by Asbjørn
Cellpy output empty values when merging files if last cycle does not have any capacity.
The model for fitting ocv rlx is missing the first event due to the ohmic drop when turning off the current. This should be implemented and tested.
Limited support for csv files exported manually from Arbin (NTNU)
The routines for reading experimental data files etc should be gradually moved into the repo.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Need to check that constant voltage steps are treated correctly.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
One way now to get voltage and current vs time for a specific step is to use something alike:
# first find the correct step
charge_steps = c.get_step_numbers(steptype="charge")
cycle = 1
raw = c.cell.raw
charge_step_cycle_one = charge_steps[cycle][0] # selecting only the first charge step
df_absolutely_all = raw[(raw.cycle_index == cycle) & (raw.step_index == charge_step_cycle_one)]
df_all = df_absolutely_all[["step_time", "current", "voltage"]]
Another way is to use the sget_something
methods:
# first find the correct step
charge_steps = c.get_step_numbers(steptype="charge")
cycle = 1
raw = c.cell.raw
charge_step_cycle_one = charge_steps[cycle][0] # selecting only the first charge step
timestamp = c.sget_timestamp(cycle, charge_step_cycle_one )
voltage = c.sget_voltage(cycle, charge_step_cycle_one )
df_all = pd.concat([timestamp, voltage], keys=["time", "voltage"], axis=1)
It would be nice to have one method that takes as input the cycle number, the type of step (e.g. "charge") (or maybe a list of steps), and optional settings like if you would like to select only one step (in case there are more "charge" steps in that cycle), and also if the time should start from zero, or as it is in the raw data, or a starting value given when calling the function.
How can you parse the temperature data from the .res Arbin file? It does not seem that that data is contained in the output
We should include more cell-testing-files for testing purposes.
In addition, we should probably include different versions of cellpy-files to check that it is possible to still load them (and convert them).
During installation and setup of cellpy for a student, the check reports an error in the parameter file. The notebook folder seems to be missing. Fix:
Fix docs for prms - not using pure dicts anymore (using python-box).
Should learn how to do it the "github" way
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Create reader for PEC csv-files
The following features should (could) be implemented in the cellpy setup-script
Maybe have an option for diagnostics
Need to add more mpr files for finalising support for Biologics. Should also get corresponding csv files generated by the Biologics software.
Add more options for c.get_cap
Check that the instrument loading method is easy to understand and that it is clear how to make new loaders.
I find the rst format docstrings like :param x: stuff not to my liking. Better to choose either Google or NumPy format. Agree?
Dont need a template
Refactor to
>>> r1 = cellpy.get(filename)
>>> summary = r1.cell.summary
>>> steps = r1.cell.steps
>>> raw = r1.cell.raw
I need you to pull the last updates from "cellpy". Clone cellpy, and pull from master while checked out in master. Checkout "develop" and pull "develop". Then start a "git flow feature start FEATURENAME". You should be checked out to the new feature with this command. When you are sure that you are checked out in the new feature/FEATURENAME, please look at "cell_ocv.py". Run the script and look at the output and plots.
Notice that r_ir has not been fitted, only guessed. The calculations of r_ir are in the function "guessing_parameters". I guess we could include the voltage across r_ir to the "ocv_relax_func". With that I mean calculate v_ir with guessed r_ir and add it to the return of "ocv_relax_func".
Do also notice that v_rlx and ocv from best fitted parameters are the same as in guessed. First of all, v_rlx is not that necessary, but I chose to get it anyway. Second, I'm not sure how to fit ocv other than extracting the last measured voltage-point from the relaxation data and saying that is the ocv of the cell.
Can we maybe use what PEI. al. (2014) concluded with? But wouldn't the last measured voltage-point be more "accurate" than what PEI. al. (2014) would give?
If you have time, double-check that you agree with the calculations made in the functions (I have already done the calculations by hand as I did debugging to see if they were correct. I will implement tests later that will do this too).
Do any changes you like while in "feature/FEATURENAME", but remember to commit every now and push to remote so that I can keep track with your changes.
The new batch feature should be implemented gradually.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.