Giter Site home page Giter Site logo

cellpy's People

Contributors

amundmr avatar anonymoussnek avatar asbjorul avatar chonmj avatar jayceslesar avatar jepegit avatar juliawind avatar ozzstein avatar pyup-bot avatar torvara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cellpy's Issues

Better API and naming

We should improve the API for the cellpy.cellreader.CellpyData objetct.

  1. renaming the DataFrames

    1. dfsummary to summary
    2. dfdata to ?
    3. step_table to ?
  2. define a getter for datasets

  3. other things?

Option to load step definitions

Instead of relying on the automatic assignment on step types made by cellpy, it should be possible to import them from a file

  • decide upon format
  • implement importing it

missing data when aborting before cycle is finished

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

Res file reader fails with no data for Test_ID

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.

Cellpy format

Fix cellpy file format

  • review method for cellpy file version checking
  • refactor and move load method into own module?
  • method for quickly checking for custom columns
  • decide on run-specific values
  • option to load older versions (or script to translate?)
  • the 'new' format should be valid until v.0.5.0

sget_current

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.

Tutorial

Create a tutorial on readthedocs including:

  • read cell data
  • extract current-voltage graphs
  • extract summaries of runs
  • create dQ/dV plots
  • save / export data
  • data-mining / using a database

Add weights to ocvrlx-fitting

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).

Standard batch-script IFE meeting

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.

Use git flow

We will use git flow from here on. Initialisation of git flow should be done.

option for notebook templates

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.

Batch journal file - include masked cells and cycles

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:

  • bad / masked cells
  • bad / masked cycles in each cell

Might also be nice to have:

  • notes or some kind of log on what was done

Doc does not build at RTD - missing package

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.

Easily plot datafiles

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)

Update parameter handling

The parameter file should be augmented to include settings on:

  • instrument
  • database settings
  • and more?

unclear merging

Cellpy output empty values when merging files if last cycle does not have any capacity.

Add initial IR drop to ocvrlx method

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.

Option for setting estimation of nominal capacity

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.

Constant voltage steps

Need to check that constant voltage steps are treated correctly.

  • add suitable data files to test_data
  • add tests

Make the C-rate available in the summary file

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.

Convenience method for getting voltage and current versus time (step-time)

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.

A more complete set of files for testing

We should include more cell-testing-files for testing purposes.

  • Small files
  1. Standard (simple) life-time test of half-cell with CC (OK)
  2. Full cell test (simple) (MISSING)
  3. Tests with CV steps (MISSING)
  4. Tests with taper steps (MISSING)
  5. Tests with GITT (MISSING)
  • Big files
  1. Complete test with many cycles that should be used in integration test(s) (MISSING)

In addition, we should probably include different versions of cellpy-files to check that it is possible to still load them (and convert them).

cellpy setup -i seems to not make the notebooks folder

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:

  • edit the cli.py file so that the notebook folder is made during setup.

Create a pull request

Should learn how to do it the "github" way

  • create a pull request
  • do a code review

Option for retrieving cycles / summaries filtered on C-rate

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.

get_cap improvements

  • should add an option to insert nan between charge and discharge
  • should includes settings in the prm for default get_cycles behaviour

Add some features for the cellpy setup-script

The following features should (could) be implemented in the cellpy setup-script

  1. option for creating default folders and insert that into the config file
  2. check for MS Access driver

Maybe have an option for diagnostics

Data files for Biologics support

Need to add more mpr files for finalising support for Biologics. Should also get corresponding csv files generated by the Biologics software.

  1. 2-electrode
  • EIS
  • cycles
  • EIS + cycles
  1. 3-electrode
  • EIS
  • cycles
  • EIS + cycles

Docstring style

I find the rst format docstrings like :param x: stuff not to my liking. Better to choose either Google or NumPy format. Agree?

Refactoring

Refactor to

>>> r1 = cellpy.get(filename)
>>> summary = r1.cell.summary
>>> steps = r1.cell.steps
>>> raw = r1.cell.raw

evaluate relaxation functions

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.

New batch feature

The new batch feature should be implemented gradually.

  1. Make a couple of engines, journals, and dumpers
  2. Create batch script examples
  3. Create method for making "new" jupyter notebooks based on templates (e.g. by cellpy batch command).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.