Git Product home page Git Product logo

ges-echem-suite's People

Contributors

ges-ihauspergher avatar ges-mpalermo avatar lbabetto avatar ppravatto avatar

Stargazers

 avatar

ges-echem-suite's Issues

read_mpt_cycles() does not work if .mpt file contains a single cycle:

.mpt files which contain a single cycle are not correctly processed by the read_mpt_cycles() routine.

The program expects a line containing "Number of loops : " to read the number of cycles and a series of lines starting with "Loop " to determine the cycles position:

for line_num, line in enumerate(file):
    if "Number of loops : " in line:
        ncycles = int(line.split(" ")[-1])

    # Before the output of the experiment, EClab lists the
    # starting and ending line of each loop. These will be used
    # to slice the pandas dataframe into the different cycles.
    if "Loop " in line:
        loop_num = int(line.split(" ")[1])
        first_pos = int(line.split(" ")[-3])
        second_pos = int(line.split(" ")[-1])
        delims.append([loop_num, first_pos, second_pos])

    if "mode\t" in line:
        beginning = line_num
        break

This section is not present if the file contains a single cycle, which causes the program to not process the file correctly.

Suggested fix: after finding the line containing "mode", all the rest of the file is a single cycle, therefore it might be better to default ncycles = 1 and overwrite it only if "Number of loops : " is found. If ncycles == 1, then keep reading the file until the end.

Implement module to analyze and plot EIS data

The module should allow:

  • Loading of EIS data from GAMRY and Biologic instruments
  • Access to the impedance value based on frequency and/or index in cartesian and polar form
  • Plot of real and imaginary impedance plots
  • Plot of nyquist style plots

Possible nice to have features:

  • Implement DRT routine analysis
  • Interface to circuit-based fitting routines

Tip: consider impedance.py as a possible library to use.

Rimozione spike nei plot

esimi dottori <3,

può capitare che durante la registrazione di curve di carica/scarica lo strumento registri degli spike.
Sarebbe carino se poteste implementare un filtro che li rimuovesse qualora fosse desiderato.

Vi mando per mail l'esempio in cui mi è capitato di vederli con relativo file del nostro pittone preferito a computational boyz con annessi esempi.

un abbraccio

The Lannisters Send Their Regards

Implement support and easy access to multi-step cycling experiments

  • Implement a "container" capable of handling multiple cell-cycling objects containing data points recorded at different current densities.
  • Implement a loader/parser of the new battery-module format generated by Biologic instruments.
  • Implement capacity retention across multiple experiments with fixed reference.
  • Implement volume and electrode area to explicitly access volumetric and unit-surface data.
  • Write tests and update the module documentation.

Cell cycling cannot handle biologic files containing loops, rests and PEIS data

Biologic output files for experimental protocols containing loops and PEIS measurements have a different structure than typical cell cycling-only files.

In particular, the output file contains a header where the type of each operation performed in the protocol and an ID are stated.

Cycle Definition : Charge/Discharge alternance
Ns                  0                   1                   2                   3                   4                   5                   6                   7                   8                   9                   10                  11                  12                  13                  14                  15                  16                  17                  18                  
ctrl_type           Rest                CC                  CC                  Rest                PEIS                CC                  Loop                CC                  CC                  Rest                PEIS                CC                  Loop                CC                  CC                  Rest                PEIS                CC                  Loop                
Apply I/C           I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   I                   
current/potential   current             current             current             current             current             current             current             current             current             current             current             current             current             current             current             current             current             current             current             
ctrl1_val                               1,000               1,000                                   10,000              1,000               1,500               1,500               1,500                                   10,000              1,500               1,500               2,000               2,000                                   10,000              2,000               2,500               
ctrl1_val_unit                          A                   A                                       mV                  A                                       A                   A                                       mV                  A                                       A                   A                                       mV                  A                                       
ctrl1_val_vs                            <None>              <None>                                                      <None>                                  <None>              <None>                                                      <None>                                  <None>              <None>                                                      <None>        
...                          

Then, in the measurement data, a column with the ID of the operation is introduced:

mode	ox/red	error	control changes	Ns changes	counter inc.	Ns	I Range	time/s	control/V/mA	Ewe/V	I/mA	dq/mA.h	(Q-Qo)/mA.h	|Energy|/W.h	freq/Hz	|Z|/Ohm	Phase(Z)/deg	Q charge/discharge/mA.h	half cycle	Ece/V	P/W	<Ece>/V	|Ece|/V	Phase(Zce)/deg	|Zce|/Ohm	Re(Zce)/Ohm	-Im(Zce)/Ohm	Phase(Zwe-ce)/deg	|Zwe-ce|/Ohm	Re(Zwe-ce)/Ohm	-Im(Zwe-ce)/Ohm	z cycle	Energy charge/W.h	Energy discharge/W.h	Capacitance charge/µF	Capacitance discharge/µF	Re(Z)/Ohm	-Im(Z)/Ohm	Re(Y)/Ohm-1	Im(Y)/Ohm-1	|Y|/Ohm-1	Phase(Y)/deg	Q discharge/mA.h	Q charge/mA.h	Capacity/mA.h	Efficiency/%	control/V	control/mA	cycle number	Ewe-Ece/V	R/Ohm	
3	0	0	0	0	0	0	6	1,191880056575610E+002	-1,6322504E-001	-1,6124701E-001	0,0000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	0	-4,2314586E-004	0,0000000E+000	-4,2314586E-004	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	-1,6082387E-001	0,0000000E+000
3	0	0	0	0	0	0	14	1,291880054049398E+002	0,0000000E+000	-1,6267009E-001	0,0000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	0	8,8169865E-005	0,0000000E+000	8,8169865E-005	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,000000000000000E+000	0,0000000E+000	0,0000000E+000	0,0000000E+000	0,000000000000000E+000	-1,6275826E-001	0,0000000E+000
...

The current implementation of the cell cycling module of GES-echem-suite does not support this kind of data organization.

A modification of the code is required to maintain compatibility with this more advanced type of output file.

Move Cycle attributes within __init__ method and add full cycle attributes

  1. Declaration of Cycle instance attributes should be moved within __init__ method. Their initialization can be delegated to a class method.

  2. Implement Cycle class properties that return a concatenation of charge and discharge data, e.g.:

    @property
    def time(self):
        return self._time_charge.append(self._time_discharge)

Unificare scariche parziali

Ho un problema per plottare un profilo di scarica in Python.
La scarica è stata fermata a metà del processo (pausa pranzo) e avviata dopo. Conseguentemente si sono generati 2 file.
Quando se avvia la seconda parte della scarica, il tempo (valori X) inizia da 0.
Quindi, per plottare la scarica completa, si devono unificare questi due file modificando i valori di X (tempo) del secondo file in maniera che parta dall'ultimo valore del primo file.
(Se la prima scarica è stata fermata a 784 secondi, il primo valore del secondo file deve essere 785 secondi)

Come si può fare?

Implement capacity retention fitting with different functions

Implement CellCycling class methods to return an estimate of the capacity retention at a given cycle and to find the cycle number after which it falls below a certain threshold:

# object cellcycling has already been previously initialized 
def fit_function(x, a, b):
    return a*x+b

fit_parameters = cellcycling.capacity_retention_fit(function=fit_function)

cycle_numbers = [0, 100, 200, 400]
# or cycle_numbers = range(0, 20000, 100)
retentions = cellcycling.capacity_retention_predict(cycle_numbers)

thresholds = [0.95, 0.8] # cret 95% and 80%
cycle_numbers = cellcycling.capacity_retention_threshold(thresholds)

Write a developer's guide according to Team Leader request

The developer's guide should integrate the already existing documentation with:

  • Codebase Overview: Start with a high-level overview of your codebase. Describe the purpose of the library, its main features, and how it is structured at a high level. This includes the main modules, classes, and their relationships.

  • Directory Structure: Provide a clear explanation of the directory structure of your codebase. This should include the purpose of each directory and the type of files that can be found in them.

  • Key Components: Identify the key classes, functions, and modules in your codebase. For each of these, provide a brief description of its purpose, how it works, and how it interacts with other parts of the codebase.

Error in the computation of the capacity fade?

The capacity_fade property, pointing to the _capacity_fade inner variable assumes values not compatible with a percentage. A better explanation of the parameter definition or a bug-fix is required.

If the capacity fade is intended as the linear capacity loss associated to each charge/discharge cycle the value computed do not appear to match physical meaning. The source of error can be located at this line. The _retention_fit_parameters.slope already derives from the fitting of percentage capacity_retention values and, as such, the multiplication by the factor 100 should not be required.

Allow user to hide cycles in CellCycling instances

Allow the user to manually hide cycles from CellCycling instances. Cycles should not be deleted so that data can be shown again if necessary?

Example:

...
cycles.indexes # to be implemented
# returns [0, 1, 2, 3, 4, 5]
cycles.coulombic_efficiencies
# returns [99, 96, 57, 98, 94, 33]

cycles.mask([2, 4, 5]) # use list of cycles indexes

cycles.indexes
# returns [0, 1, 3]
cycles.coulombic_efficiencies
# returns [99, 96, 98]

cycles.unmask([2]) # unmask selected cycles
cycles.indexes
# returns [0, 1, 2, 3]
cycles.coulombic_efficiencies
# returns [99, 96, 57, 98]

cycles.unmask() # unmask all cycles
cycles.indexes
# returns [0, 1, 2, 3, 4, 5]
cycles.coulombic_efficiencies
# returns [99, 96, 57, 98, 94, 33]

It could be done by modifiying the __iter__ method to check on a list of hidden cycles, and editing the properties to cycle on self rather than on the self._cycles instance attribute.

The capacity_retention property should be modified to calculate the retentions on the spot, e.g.:

cycles.capacities
# returns [100, 50, 50, 50]
cycles.capacity_retention
# returns [100, 50, 50, 50]

cycles.reference = 1
cycles.capacity_retention
# returns [200, 100, 100 ,100]

We can then remove the function calculate_capacity_retention. @GES-lbabetto what do you think?

We should implement the capacity retentions calculation via numpy instead of cyclying in a python for loop :)

Inverted timeseries cycle plotting does not work properly

If the sampling rate of the cellcycling is based on constant mV and not seconds, then the timeserie will have different time deltas between each element. This generate an artifact when reversing the series, for which the elementwise delta is not conserved, and therefore the plot is not shown properly.

Fix this issue in order to get the correct inverted plot.

Update the cyclic-voltammetry module

Complete a general update of the cyclic-voltammetry module to improve ease of use:

  1. Refresh the code structure and implement detailed docstrings.
  2. Write unit tests to verify the correct working of the module.
  3. Write documentation and examples to improve usability.

Add Pandas requirement of version >= 1.3.0

Pandas version < 1.3.0 do not have the encoding_errors keyword for the dataframe read_table function and will throw an error when the user reads a file.

Fix meta.yaml with the correct dependency specifying the correct version number.

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.