cellpy.utils.batch_tools.batch_core
#
Module Contents#
Classes#
Base class for all the classes that do something to the experiment(s). |
|
An experiment contains experimental data and meta-data. |
|
An exporter exports your data to a given format. |
|
A journal keeps track of the details of the experiment. |
|
Base class for all the classes that do something to the experiment(s). |
|
Base class for all the classes that do something to the experiment(s). |
|
Class that is used to access the experiment.journal.pages DataFrame. |
|
Base class for all the classes that do something to the experiment(s). |
Attributes#
- class BaseAnalyzer(*args)[source]#
Bases:
Doer
Base class for all the classes that do something to the experiment(s).
- experiments#
list of experiments.
- farms#
list of farms (one pr experiment) (containing pandas DataFrames).
- barn#
identifier for where to place the output-files (i.e. the animals) (typically a directory path).
- Type:
str
The do-er iterates through all the connected engines and dumpers (the dumpers are run for each engine).
It is the responsibility of the engines and dumpers to iterate through the experiments. The most natural way is to work with just one experiment.
Setting up the Do-er.
- Parameters:
*args – list of experiments
- class BaseExperiment(*args)[source]#
An experiment contains experimental data and meta-data.
- class BaseExporter(*args)[source]#
Bases:
Doer
An exporter exports your data to a given format.
Setting up the Do-er.
- Parameters:
*args – list of experiments
- run_engine(engine, **kwargs)[source]#
Set the current_engine and run it.
The method sets and engages the engine (callable) and provide appropriate binding to at least the class attributes self.farms and self.barn.
Example
self.current_engine = engine self.farms, self.barn = engine(experiments=self.experiments, farms=self.farms, **kwargs)
- Parameters:
engine (callable) – the function that should be called.
**kwargs – additional keyword arguments sent to the callable.
- class BaseJournal[source]#
A journal keeps track of the details of the experiment.
The journal should at a mimnimum contain information about the name and project the experiment has.
- pages#
table with information about each cell/file.
- Type:
pandas.DataFrame
- name#
the name of the experiment (used in db-lookup).
- Type:
str
- project#
the name of the project the experiment belongs to (used for making folder names).
- Type:
str
- file_name#
the file name used in the to_file method.
- Type:
str or path
- project_dir#
folder where to put the batch (or experiment) files and information.
- batch_dir#
folder in project_dir where summary-files and information and results related to the current experiment are stored.
- raw_dir#
folder in batch_dir where cell-specific information and results are stored (e.g. raw-data, dq/dv data, voltage-capacity cycles).
- from_db()[source]#
Make journal pages by looking up a database.
Default to using the simple excel “database” provided by cellpy.
If you don’t have a database, or you don’t know how to make and use one, look in the cellpy documentation for other solutions (e.g. manually create a file that can be loaded by the
from_file
method).
- class BasePlotter(*args)[source]#
Bases:
Doer
Base class for all the classes that do something to the experiment(s).
- experiments#
list of experiments.
- farms#
list of farms (one pr experiment) (containing pandas DataFrames).
- barn#
identifier for where to place the output-files (i.e. the animals) (typically a directory path).
- Type:
str
The do-er iterates through all the connected engines and dumpers (the dumpers are run for each engine).
It is the responsibility of the engines and dumpers to iterate through the experiments. The most natural way is to work with just one experiment.
Setting up the Do-er.
- Parameters:
*args – list of experiments
- abstract run_engine(engine, **kwargs)[source]#
Set the current_engine and run it.
The method sets and engages the engine (callable) and provide appropriate binding to at least the class attributes self.farms and self.barn.
Example
self.current_engine = engine self.farms, self.barn = engine(experiments=self.experiments, farms=self.farms, **kwargs)
- Parameters:
engine (callable) – the function that should be called.
**kwargs – additional keyword arguments sent to the callable.
- class BaseReporter(*args)[source]#
Bases:
Doer
Base class for all the classes that do something to the experiment(s).
- experiments#
list of experiments.
- farms#
list of farms (one pr experiment) (containing pandas DataFrames).
- barn#
identifier for where to place the output-files (i.e. the animals) (typically a directory path).
- Type:
str
The do-er iterates through all the connected engines and dumpers (the dumpers are run for each engine).
It is the responsibility of the engines and dumpers to iterate through the experiments. The most natural way is to work with just one experiment.
Setting up the Do-er.
- Parameters:
*args – list of experiments
- abstract run_engine(engine)[source]#
Set the current_engine and run it.
The method sets and engages the engine (callable) and provide appropriate binding to at least the class attributes self.farms and self.barn.
Example
self.current_engine = engine self.farms, self.barn = engine(experiments=self.experiments, farms=self.farms, **kwargs)
- Parameters:
engine (callable) – the function that should be called.
**kwargs – additional keyword arguments sent to the callable.
- class Data(experiment, *args)[source]#
Bases:
collections.UserDict
Class that is used to access the experiment.journal.pages DataFrame.
The Data class loads the complete cellpy-file if raw-data is not already loaded in memory. In future version, it could be that the Data object will return a link allowing querying instead to save memory usage…
Remark that some cellpy (cellreader.CellpyCell) function might not work if you have the raw-data in memory, but not summary data (if the cellpy function requires summary data or other settings not set as default).
- class Doer(*args)[source]#
Base class for all the classes that do something to the experiment(s).
- experiments#
list of experiments.
- farms#
list of farms (one pr experiment) (containing pandas DataFrames).
- barn#
identifier for where to place the output-files (i.e. the animals) (typically a directory path).
- Type:
str
The do-er iterates through all the connected engines and dumpers (the dumpers are run for each engine).
It is the responsibility of the engines and dumpers to iterate through the experiments. The most natural way is to work with just one experiment.
Setting up the Do-er.
- Parameters:
*args – list of experiments
- abstract run_engine(engine, **kwargs)[source]#
Set the current_engine and run it.
The method sets and engages the engine (callable) and provide appropriate binding to at least the class attributes self.farms and self.barn.
Example
self.current_engine = engine self.farms, self.barn = engine(experiments=self.experiments, farms=self.farms, **kwargs)
- Parameters:
engine (callable) – the function that should be called.
**kwargs – additional keyword arguments sent to the callable.