Пример #1
0
 def __init__(self):
     self.logger = logging.getLogger(__name__)
     self.headers_normal = get_headers_normal()
     self.current_chunk = 0  # use this to set chunks to load
     self.mpr_data = None
     self.mpr_log = None
     self.mpr_settings = None
     self.cellpy_headers = get_headers_normal()
Пример #2
0
 def __init__(self):
     self.headers_normal = get_headers_normal(
     )  # should consider to move this to the Loader class
     self.current_chunk = 0  # use this to set chunks to load
     self.pec_data = None
     self.pec_log = None
     self.pec_settings = None
     self.number_of_header_lines = 32
     self.cellpy_headers = get_headers_normal(
     )  # should consider to move this to the Loader class
Пример #3
0
    def __init__(self):
        """initiates the NdaLoader class"""
        # could use __init__(self, cellpydata_object) and
        # set self.logger = cellpydata_object.logger etc.
        # then remember to include that as prm in "out of class" functions
        # self.prms = prms
        self.logger = logging.getLogger(__name__)

        self.headers_normal = get_headers_normal()
        self.headers_global = self.get_headers_global()
        self.current_chunk = 0  # use this to set chunks to load
Пример #4
0
    def __init__(self):
        """initiates the class"""

        self.logger = logging.getLogger(__name__)
        self.headers_normal = get_headers_normal()
        self.definition_file = self.pick_definition_file()
        self.units = None
        self.limits = None
        self.headers = None
        self.variables = None
        self.structure = None
        self.parse_definition_file()
Пример #5
0
    def __init__(self):
        """initiates the ArbinLoader class"""
        # could use __init__(self, cellpydata_object) and set self.logger = cellpydata_object.logger etc.
        # then remember to include that as prm in "out of class" functions
        # self.prms = prms
        self.logger = logging.getLogger(__name__)
        # use the following prm to limit to loading only one cycle or from cycle>x to cycle<x+n
        # prms.Reader["limit_loaded_cycles"] = [cycle from, cycle to]

        self.headers_normal = get_headers_normal()
        self.headers_global = self.get_headers_global()
        self.current_chunk = 0  # use this to set chunks to load
Пример #6
0
from cellpy.parameters.internal_settings import (
    ATTRS_CELLPYFILE,
    cellpy_limits,
    cellpy_units,
    get_headers_summary,
    get_headers_normal,
    get_headers_step_table,
)

CELLPY_FILE_VERSION = 5
MINIMUM_CELLPY_FILE_VERSION = 1
STEP_TABLE_VERSION = 5
RAW_TABLE_VERSION = 5
SUMMARY_TABLE_VERSION = 5

HEADERS_NORMAL = get_headers_normal()
HEADERS_SUMMARY = get_headers_summary()
HEADERS_STEP_TABLE = get_headers_step_table()


class FileID(object):
    """class for storing information about the raw-data files.

        This class is used for storing and handling raw-data file information.
        It is important to keep track of when the data was extracted from the
        raw-data files so that it is easy to know if the hdf5-files used for
        @storing "treated" data is up-to-date.

        Attributes:
            name (str): Filename of the raw-data file.
            full_name (str): Filename including path of the raw-data file.
Пример #7
0
        "#D0BBFF",
        "#FFFEA3",
        "#B0E0E6",
    ],
    "seaborn-dark-palette": [
        "#001C7F",
        "#017517",
        "#8C0900",
        "#7600A1",
        "#B8860B",
        "#006374",
    ],
}

hdr_summary = get_headers_summary()
hdr_raw = get_headers_normal()
hdr_steps = get_headers_step_table()
hdr_journal = get_headers_journal()


def _hv_bokeh_available():
    if not hv_available:
        print("You need holoviews. But I cannot load it. Aborting...")
        return False
    if not bokeh_available:
        print("You need Bokeh. But I cannot find it. Aborting...")
        return False
    return True


def find_column(columns, label=None, end="cycle_index"):
Пример #8
0
import cellpy
from cellpy import prms
from cellpy.parameters.internal_settings import (
    get_headers_summary,
    get_headers_step_table,
    get_headers_normal,
    ATTRS_CELLPYDATA,
    ATTRS_DATASET,
)

from cellpy import prmreader
from cellpy.utils import batch, ica

hdr_summary = get_headers_summary()
hdr_steps = get_headers_step_table()
hdr_normal = get_headers_normal()


def update_journal_cellpy_data_dir(pages,
                                   new_path=None,
                                   from_path="PureWindowsPath",
                                   to_path="Path"):
    """Update the path in the pages (batch) from one type of OS to another.

    I use this function when I switch from my work PC (windows) to my home
    computer (mac).

    Args:
        pages: the (batch.experiment.)journal.pages object (pandas.DataFrame)
        new_path: the base path (uses prms.Paths.cellpydatadir if not given)
        from_path: type of path to convert from.
Пример #9
0
        "#D0BBFF",
        "#FFFEA3",
        "#B0E0E6",
    ],
    "seaborn-dark-palette": [
        "#001C7F",
        "#017517",
        "#8C0900",
        "#7600A1",
        "#B8860B",
        "#006374",
    ],
}

headers_summary = get_headers_summary()
headers_data = get_headers_normal()
headers_steps = get_headers_step_table()


def _hv_bokeh_available():
    if not hv_available:
        print("You need holoviews. But I cannot load it. Aborting...")
        return False
    if not bokeh_available:
        print("You need Bokeh. But I cannot find it. Aborting...")
        return False
    return True


def create_colormarkerlist_for_info_df(info_df,
                                       symbol_label="all",