cellpy.readers.instruments.biologics_mpr#

This file contains methods for importing Bio-Logic mpr-type files. This is based on the work by Chris Kerr (chatcannon/galvani)

Module Contents#

Classes#

DataLoader

Class for loading biologics-data from mpr-files.

Functions#

datetime2ole(dt)

converts from datetime object to ole datetime float

ole2datetime(oledt)

converts from ole datetime float to datetime

Attributes#

MINIMUM_SELECTION

OLE_TIME_ZERO

SEEK_CUR

SEEK_END

SEEK_SET

class DataLoader(*args, **kwargs)[source]#

Bases: cellpy.readers.instruments.base.BaseLoader

Inheritance diagram of cellpy.readers.instruments.biologics_mpr.DataLoader

Class for loading biologics-data from mpr-files.

instrument_name = 'biologics_mpr'[source]#
raw_ext = 'mpr'[source]#
abstract dump(file_name, path)[source]#

Dumps the raw file to an intermediate hdf5 file.

This method can be used if the raw file is too difficult to load and it is likely that it is more efficient to convert it to an hdf5 format and then load it using the from_intermediate_file function.

Parameters:
  • file_name – name of the raw file

  • path – path to where to store the intermediate hdf5 file (optional)

Returns:

full path to stored intermediate hdf5 file information about the raw file (needed by the from_intermediate_file function)

static get_raw_limits()[source]#

Include the settings for how to decide what kind of step you are examining here.

The raw limits are ‘epsilons’ used to check if the current and/or voltage is stable (for example for galvanostatic steps, one would expect that the current is stable (constant) and non-zero). It is expected that different instruments (with different resolution etc.) have different ‘epsilons’.

Returns: the raw limits (dict)

static get_raw_units()[source]#

Include the settings for the units used by the instrument.

The units are defined w.r.t. the SI units (‘unit-fractions’; currently only units that are multiples of Si units can be used). For example, for current defined in mA, the value for the current unit-fraction will be 0.001.

Returns: dictionary containing the unit-fractions for current, charge, and mass

inspect(run_data)[source]#

inspect the file.

loader(file_name, bad_steps=None, **kwargs)[source]#

Loads data from BioLogics mpr files.

Parameters:
  • file_name (str) – path to .res file.

  • bad_steps (list of tuples) – (c, s) tuples of steps s (in cycle c) to skip loading.

Returns:

new test

abstract repair(file_name)[source]#

try to repair a broken/corrupted file

datetime2ole(dt)[source]#

converts from datetime object to ole datetime float

ole2datetime(oledt)[source]#

converts from ole datetime float to datetime

MINIMUM_SELECTION = ['Data_Point', 'Test_Time', 'Step_Time', 'DateTime', 'Step_Index', 'Cycle_Index', 'Current',...[source]#
OLE_TIME_ZERO[source]#
SEEK_CUR = 1[source]#
SEEK_END = 2[source]#
SEEK_SET = 0[source]#