Schemas (batdata.schemas
)#
Schemas for battery data and metadata
- pydantic model batdata.schemas.BatteryMetadata#
Bases:
BaseModel
Representation for the metadata about a battery
The metadata captures the information about what experiment was run on what battery. A complete set of metadata should be sufficient to reproduce an experiment.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- field associated_ids: List[Url] | None = None#
Any identifiers associated with this data file. Identifiers can be any URI, such as DOIs of associated paper or HTTP addresses of associated websites
- field authors: List[Tuple[str, str]] | None = None#
Name and affiliation of each of the authors of the data. First and last names
- field battery: BatteryDescription | None = None#
Description of the battery being tested
- field cycle_stats_columns: Dict[str, str] [Optional]#
Descriptions of non-standard columns in the cycle stats
- field eis_data_columns: Dict[str, str] [Optional]#
Descriptions of non-standard columns in the EIS data
- field is_measurement: bool = True#
Whether the data was created observationally as opposed to a computer simulation
- field modeling: ModelMetadata | None = None#
Description of simulation approach
- field name: str | None = None#
Name of the cell. Any format for the name is acceptable, as it is intended to be used by the battery data provider.
- field raw_data_columns: Dict[str, str] [Optional]#
Descriptions of non-standard columns in the raw data
Battery Description (b.schemas.battery
)#
Schemas associated with the components of a battery
- pydantic model batdata.schemas.battery.BatteryDescription#
Bases:
BaseModel
Description of the entire battery
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- field anode: ElectrodeDescription | None = None#
Name of the anode material
- field cathode: ElectrodeDescription | None = None#
Name of the cathode material
- field electrolyte: ElectrolyteDescription | None = None#
Name of the electrolyte material
- pydantic model batdata.schemas.battery.ElectrodeDescription#
Bases:
BaseModel
Description of an electrode
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- field loading: float | None = None#
Amount of active material per area (units: mg/cm^2)
- Constraints:
ge = 0
- pydantic model batdata.schemas.battery.ElectrolyteAdditive#
Bases:
BaseModel
Additive to the electrolyte
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- pydantic model batdata.schemas.battery.ElectrolyteDescription#
Bases:
BaseModel
Description of the electrolyte
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- field additives: List[ElectrolyteAdditive] [Optional]#
Any additives present in the electrolyte
Metadata: Computation (b.schemas.modeling
)#
Metadata which describes how data produced by models were generated
- pydantic model batdata.schemas.modeling.ModelMetadata#
Bases:
BaseModel
Describe the type and version of a computational tool used to generate battery data
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Config:
extra: str = allow
- Fields:
- field models: List[str] | None = None#
Type of mathematical model(s) being used in physics simulation.Use terms defined in BattINFO, such as “BatteryEquivalentCircuitModel”.
- field simulation_type: str | None = None#
Type of simulation being performed. Use terms defined in BattINFO, such as “TightlyCoupledModelsSimulation”
- field type: ModelTypes | None = None#
Type of the computational method it implements.
- class batdata.schemas.modeling.ModelTypes(value)#
-
Type of computational method
- data = 'data'#
A computational application that uses existing data to predict the behaviour of a system without providing a identifiable analogy with the original object.
IRI: https://w3id.org/emmo#EMMO_a4b14b83_9392_4a5f_a2e8_b2b58793f59b
- empirical = 'empirical'#
A computational application that uses an empiric equation to predict the behaviour of a system without relying on the knowledge of the actual physical phenomena occurring in the object.
IRI: https://w3id.org/emmo#EMMO_67c70dcd_2adf_4e6c_b3f8_f33dd1512487
- physics = 'physics'#
A computational application that uses a physical model to predict the behaviour of a system, providing a identifiable analogy with the original object.
IRI: https://w3id.org/emmo#EMMO_8d4962d7_9608_44f7_a2f1_82a4bb173f4a
Data: Time Series (b.schemas.cycling
)#
Schemas related to describing cycling data
- class batdata.schemas.cycling.ChargingState(value)#
-
Potential charging states of the battery:
charging
: Battery is being chargedhold
: Battery is neither charging nor dischargingdischarging
: Battery is being dischargedunknown
: State was unable to be determined
- charging = 'charging'#
- discharging = 'discharging'#
- hold = 'hold'#
- unknown = 'unknown'#
- pydantic model batdata.schemas.cycling.ColumnSchema#
Bases:
BaseModel
Base class for schemas that describe the columns of a tabular dataset
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class batdata.schemas.cycling.ControlMethod(value)#
-
Method used to control battery during a certain step
short_rest
: A very short rest period. Defined as a step with 4 or fewer measurements with near-zero currentrest
: An extended period of neither charging nor dischargingshort_nonrest
: A very short period of charging or discharging. Defined as a step with 4 or fewer measurementswith at least one non-zero current.
constant_current
: A step where the current is held constantconstant_voltage
: A step where the voltage is held constantother
: A step that does not fit into any of the predefined categories
- constant_current = 'constant_current'#
- constant_power = 'constant_power'#
- constant_voltage = 'constant_voltage'#
- other = 'other'#
- pulse = 'pulse'#
- rest = 'rest'#
- short_nonrest = 'short_nonrest'#
- short_rest = 'short_rest'#
- pydantic model batdata.schemas.cycling.CycleLevelData#
Bases:
ColumnSchema
Statistics about the performance of a cell over a certain cycle
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field capacity_charge: List[float] = None#
Total amount of electrons stored during charge. Units: A-hr
- field capacity_discharge: List[float] = None#
Total amount of electrons released during discharge. Units: A-hr
- field coulomb_efficiency: List[float] = None#
Fraction of electric charge that is lost during charge and recharge. Units: %
- field cycle_start: List[float] = None#
Time since the first data point recorded for this battery for the start of this cycle. Units: s
- field energy_discharge: List[float] = None#
Total amount of energy released during discharge. Units: W-hr
- field temperature_average: List[float] = None#
Average observed battery temperature during cycle. Units: C
- pydantic model batdata.schemas.cycling.RawData#
Bases:
ColumnSchema
Schema for the time series data.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field current: List[float] [Required]#
Measured current of the system. Positive current represents the battery discharging and negative represents the batterycharging. Units: A
- field cycle_capacity: List[float] = None#
Cumulative change in amount of charge transferred from a battery since the start of a cycle. Positive values indicate the battery has discharged since the start of the cycle.
- field cycle_capacity_charge: List[float] = None#
Cycle capacity computed only during the ‘charging’ phase of a cycle
- field cycle_capacity_discharge: List[float] = None#
Cycle capacity computed only during the ‘discharging’ phase of a cycle
- field cycle_energy: List[float] = None#
Cumulative change in amount of energy transferred from a battery the start of a cycle. Positive values indicate the battery has discharged more than since the start of the cycle.
- field cycle_number: List[int] = None#
Index of the testing cycle, starting at 0. All indices should be nonnegative and be monotonically increasing
- field file_number: List[int] = None#
Used if test data is stored in multiple files. Number represents the index of the file. All indices should be nonnegative and monotonically increasing
- field method: List[ControlMethod] = None#
List of the method used to control the battery system
- field state: List[ChargingState] = None#
Determination of whether the battery is being charged, discharged or held at a constant charge
- field step_index: List[int] = None#
Index of the step number within a testing cycle. A step change is defined by a change states between charging, discharging, or resting.
- field substep_index: List[int] = None#
Index of the substep within a testing cycle. A substep change is defined by a change of the charging or discharging method, such as change from constant voltage to constant current
Data: EIS (b.schemas.eis
)#
Schemas associated with Electrochemical Impedance Spectroscopy
- pydantic model batdata.schemas.eis.EISData#
Bases:
ColumnSchema
Measurements for a specific EIS test
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field test_id: List[int] [Required]#
Integer used to identify rows belonging to the same experiment.
Utility: Ontologies (b.schemas.ontology
)#
Tools used for linking terms in our data format to the BattINFO ontology
- class batdata.schemas.ontology.TermInfo(name: str, iri: str, elucidation: str | None)#
Bases:
object
Information about a term as referenced from the BattINFO ontology
- classmethod from_thing(thing: Thing)#
- batdata.schemas.ontology.cross_reference_terms(model: Type[BaseModel]) dict[str, TermInfo] #
Gather the descriptions of fields from our schema which are cross-referenced to a term within the BattINFO/EMMO ontologies
- Parameters:
model – Schema object to be cross-referenced
- Returns:
Mapping between metadata fields in elucidation field from the ontology
- batdata.schemas.ontology.gather_descendants(term: Type[Thing] | str) List[TermInfo] #
Get descriptions of the descendants of a certain base type
- Parameters:
term – Term for which to gather all descendants. Either the class object itself or its preferred label or IRI
- Returns:
List of descriptions of the descendants
- batdata.schemas.ontology.load_battinfo()#
Download and store the latest ontology into an in-memory