jepegit / cellpy

extract and tweak data from electrochemical tests of cells
MIT License
88 stars 30 forks source link

Update simple_reader_cellpy.py #229

Closed kevinsmia1939 closed 2 years ago

kevinsmia1939 commented 2 years ago

Using summary["Cycle_Index"] would result in https://github.com/jepegit/cellpy/issues/228 and likewise summary["Cumulated_Coulombic_Difference(mAh/g)"]. Adding print(summary.columns) show possible column names,

Index(['data_point', 'test_time', 'date_time', 'end_voltage_charge_u_V',
       'end_voltage_discharge_u_V', 'charge_capacity', 'discharge_capacity',
       'discharge_capacity_u_mAh_g', 'charge_capacity_u_mAh_g',
       'cumulated_discharge_capacity_u_mAh_g',
       'cumulated_charge_capacity_u_mAh_g',
       'coulombic_efficiency_u_percentage', 'coulombic_difference_u_mAh_g',
       'cumulated_coulombic_efficiency_u_percentage',
       'cumulated_coulombic_difference_u_mAh_g',
       'discharge_capacity_loss_u_mAh_g',
       'cumulated_discharge_capacity_loss_u_mAh_g',
       'charge_capacity_loss_u_mAh_g',
       'cumulated_charge_capacity_loss_u_mAh_g', 'low_level_u_percentage',
       'high_level_u_percentage', 'cumulated_ric_u_none',
       'cumulated_ric_sei_u_none', 'cumulated_ric_disconnect_u_none',
       'shifted_charge_capacity_u_mAh_g', 'shifted_discharge_capacity_u_mAh_g',
       'normalized_cycle_index', 'charge_c_rate', 'discharge_c_rate'],
      dtype='object')

which is use to replace the previous column keys.

Test on openSUSE Tumbleweed 20221107 Spyder 5.4.0 Python version: 3.10.8 cellpy: 0.4.2.post1 pandas: 1.5.1

jepegit commented 2 years ago

Hi @kevinsmia1939,

Great - thanks.

Could I ask you to push the pull-request to the "release_0_4_2" branch instead of "master"?

I will try to explain why:

We (I guess mostly I) started to work towards an updated layout of cellpy. One of the things we/I am trying to achieve is to make cellpy a bit more "unit agnostic". So that people can set what kind of units they want to use (with some restrictions).
One result of that is that the column headers of new versions will have names like "cumulated_coulombic_difference_gravimetric" instead of "cumulated_coulombic_difference_u_mAh_g" etc. At least that is how it is in the (not released) 0.5.0 version.

Not sure what is the best way to structure git/github branches etc, but I decided to use "master" for the new cellpy versions and make a branch called "release_0_4_2" for all the changes that fixes stuff in cellpy prior to changing the column-names.

I guess that it also means that (if you have time) you could introduce the same change for the new cellpy (using "..._gravimetric" instead of "..._u_mAh_g" and make a pull request of that to "master".

Let me know if this did not make any sense.

All the best, Jan Petter