Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jepegit opened this issue Jun 11, 2020 · 0 comments
Open
Assignees
Projects
Milestone

Comments

@jepegit
Copy link
Owner

jepegit commented Jun 11, 2020

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.

@jepegit jepegit added this to the v.0.5.0 milestone Dec 22, 2020
@jepegit jepegit added this to To do in Release 0.5 Aug 20, 2021
@jepegit jepegit removed this from To do in Release 0.5 Sep 15, 2021
@jepegit jepegit modified the milestones: v.0.5.0, v.0.6.0 Sep 15, 2021
@jepegit jepegit assigned asbjorul and unassigned carlerikfoss Apr 19, 2022
@jepegit jepegit modified the milestones: v.0.6.0, v.1.0.0 Sep 29, 2022
@jepegit jepegit assigned juliawind and unassigned asbjorul Jan 23, 2023
@jepegit jepegit modified the milestones: v.1.0.0, v.1.1.0 May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Release 0.6
Awaiting triage
Development

No branches or pull requests

4 participants