Example #1
0
    def do2(self):
        for experiment, farm in zip(self.experiments, self.farms):
            for cell_label in experiment.cell_data_frames:
                logging.info(f"Analyzing {cell_label}")
                if experiment.all_in_memory:
                    logging.debug("CellpyData picked from memory")
                    cell = experiment.cell_data_frames[cell_label]
                    if cell.empty:
                        logging.warning("Oh-no! Empty CellpyData-object")
                else:
                    logging.debug("CellpyData loaded from Cellpy-file")
                    cell = experiment.data[cell_label]
                    if cell.empty:
                        logging.warning("Oh-no! Empty CellpyData-object")

                df = select_ocv_points(
                    cell,
                    selection_method=self.selection_method,
                    number_of_points=self.number_of_points,
                    interval=self.interval,
                    relative_voltage=self.relative_voltage,
                    report_times=self.report_times,
                    direction=self.direction,
                )
                farm.append(df)
        return self.farms
Example #2
0
def test_select_ocv_points(dataset):
    out = ocv_rlx.select_ocv_points(dataset)
    # print()
    # print(" ocv rlx points ".center(80, "="))
    # print(" all defaults ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, relative_voltage=True)
    # print(" relative voltage ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, number_of_points=1)
    # print(" seven points ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, report_times=True)
    # print(" report times ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, selection_method="fixed_times")