cellpy.utils.easyplot#

easyplot module for cellpy. It provides easy plotting of any cellpy-readable data using matplotlib. Author: Amund M. Raniseth Date: 01.07.2021

Module Contents#

Classes#

EasyPlot

Main easyplot class.

Functions#

get_effective_C_rates(steptable)

get_effective_C_rates_and_caps(steptable)

help()

Method of the EasyPlot class which prints some helptext in addition to all supported params.

main()

Attributes#

USER_PARAMS

hdr_journal

class EasyPlot(files=None, nicknames=None, journal=None, **kwargs)[source]#

Main easyplot class. Takes all the inputs from the user in its kwargs upon object initialization. Gathers data, handles and plots it when object.plot() is called.

Help: type easyplot.help()

Initialization function of the EasyPlot class. Input parameters: filenames (list of strings). nicknames (list of strings), must match length of filenames. journal (str or pathlib.Path object): journal file name (should not be used if files is given). any kwargs: use easyplot.help() to print all kwargs to terminal.

Returns: easyplot object

Most basic usage: ezpltobj = easyplot.EasyPlot([“name1”, “name2”], None)

fill_input()[source]#

Fill in the rest of the variables from self.user_params if the user didn’t specify

fix_cap_from_rc(fig, ax, handles)[source]#

Makes the finishing touches to the capacity vs inverse C-rate plot

fix_cyclelife(fig, ax)[source]#

Makes the finishing touches to the cyclelife plot

fix_dqdv(fig, ax)[source]#

Makes the finishing touches to the dQdV plot

fix_gc(fig, ax)[source]#

Makes the finishing touches to the voltage-curves plot

fix_gc_and_dqdv(fig, axs)[source]#

Makes the finishing touches to the dQdV / Voltage curves plot

give_color()[source]#

Picks the first color from the color list and gives it away

give_fig()[source]#

Gives figure to whoever asks and appends it to figure list

handle_outpath()[source]#

Makes sure that self.outpath exists, or creates it.

plot()[source]#

This is the method the user calls on his/hers easyplot object in order to gather the data and plot it. Usage: object.plot()

plot_cap_from_rc()[source]#

Takes all the parameters inserted in the object creation and plots capacity VS inverse c-rate

plot_cyclelife()[source]#

Takes all the parameters inserted in the object creation and plots cyclelife

plot_dQdV()[source]#

Takes all the parameters inserted in the object creation and plots dQdV

plot_gc()[source]#

Takes all the parameters inserted in the object creation and plots Voltage-Capacity curves

plot_gc_and_dQdV()[source]#

Takes all the parameters inserted in the object creation and plots Voltage-Curves and dQdV data together

save_fig(fig, savepath)[source]#

The point of this is to have savefig parameters the same across all plots (for now just fig dpi and bbox inches)

set_arbin_sql_credentials(server='localhost', uid='sa', pwd='Changeme123', driver='ODBC Driver 17 for SQL Server')[source]#

Sets cellpy.prms.Instruments.Arbin details to fit what is inserted. Parameters: Server = ‘IP of server’, uid = ‘username’, pwd = ‘password’, driver = ‘ODBC Driver 17 for SQL Server’

verify_input()[source]#

Verifies that the users’ input to the object is correct.

get_effective_C_rates(steptable)[source]#
get_effective_C_rates_and_caps(steptable)[source]#
help()[source]#

Method of the EasyPlot class which prints some helptext in addition to all supported params.

main()[source]#
USER_PARAMS[source]#
hdr_journal[source]#