Esempio n. 1
0
import logging
import warnings
import sys

import itertools
import pandas as pd

from cellpy.utils.batch_tools.batch_core import BasePlotter
from cellpy.utils.batch_tools.batch_experiments import CyclingExperiment
from cellpy.parameters.internal_settings import get_headers_journal, get_headers_summary
from cellpy.exceptions import UnderDefined
from cellpy import prms

hdr_journal = get_headers_journal()
hdr_summary = get_headers_summary()
# print(prms.Batch.backend)

# TODO: add palette to prms.Batch

if prms.Batch.backend == "bokeh":
    try:
        import bokeh
        import bokeh.plotting
        import bokeh.palettes
        import bokeh.models
        import bokeh.layouts
        import bokeh.models.annotations

    except ImportError:
        prms.Batch.backend = "matplotlib"
        logging.debug("could not import bokeh -> using matplotlib instead")
Esempio n. 2
0
    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.
            size (float): Size of the raw-data file.