def main():

    csv_manager = CSVManager()
    csv_dto = csv_manager.parse_csv()

    path_with_name = os.path.join(csv_dto.path, csv_dto.filename + ".pdf")

    x = csv_dto.data["lambda"]
    y = csv_dto.data

    Graphics_generator.plot(x, r'$\lambda, мс^-1$', y, path_with_name)
def main():
    parser = ParametersParser()
    [parameters, config] = parser.parse_parameters()

    stat_manager = StatisticsManager(parameters)
    generated_stat = stat_manager.generate_statistics()

    csv_dto = stat_manager.transform_to_csv_dto(generated_stat, config)

    csv_manager = CSVManager()
    csv_manager.write_csv(csv_dto)

    print("Finish! Gathered ", len(generated_stat),
          " results to storage, all result saved in ", csv_dto.filename,
          " csv")
def main():
    W_max = 2000
    B_max = 0.05
    t_max = 2
    threshhold_diff = 2

    csv_manager = CSVManager()
    csv_dto = csv_manager.parse_csv()

    filter = ValuesFilter(csv_dto.data)

    filter.simple_filter(COLUMN.W_SYSTEM, CONDITION.LESS_OR_EQUAL, W_max)
    filter.simple_filter(COLUMN.B, CONDITION.LESS_OR_EQUAL, B_max)
    filter.simple_filter(COLUMN.UP_DOWN_TIME, CONDITION.GREATER_OR_EQUAL, t_max)

    filter.clever_filter({OPERATION.MINUS: [COLUMN.H, COLUMN.L]}, CONDITION.GREATER_OR_EQUAL, threshhold_diff)
    filter.clever_filter({OPERATION.MINUS: [COLUMN.C, COLUMN.c0]}, CONDITION.MIN, None)

    csv_dto.data = filter.filtered_csv
    csv_dto.filename = "[FILTERED]" + csv_dto.filename
    csv_manager.write_csv(csv_dto)
예제 #4
0
def main():
    parser = ParametersParser()
    [parameters, config] = parser.parse_parameters()

    stat_manager = StatisticsManager(parameters)
    generated_stat = stat_manager.generate_statistics()

    csv_dto = stat_manager.transform_to_csv_dto(generated_stat, config)

    csv_manager = CSVManager()
    csv_manager.write_csv(csv_dto)

    print("Finish! Gathered ", len(generated_stat), " results to storage, all result saved in ", csv_dto.filename, ".csv")

    W_max = 2000
    B_max = 0.05

    filter = ValuesFilter(csv_dto.data)

    filter.simple_filter(COLUMN.W_SYSTEM, CONDITION.LESS_OR_EQUAL, W_max)
    filter.simple_filter(COLUMN.B, CONDITION.LESS_OR_EQUAL, B_max)
    # filter.clever_filter({OPERATION.MINUS: [COLUMN.C, COLUMN.c0]}, CONDITION.MIN, None)
    filter.simple_filter(COLUMN.UP_DOWN_TIME, CONDITION.MAX, None)
    filter.simple_filter(COLUMN.UP_DOWN_COUNT, CONDITION.MIN, None)

    csv_dto.data = filter.filtered_csv
    csv_dto.filename = "[FILTERED]" + csv_dto.filename
    csv_manager.write_csv(csv_dto)
def generate(names, mode, strategy):
    parser = ParametersParser()

    for name in names:
        [parameters, config] = parser.parse_parameters(name + ".config")

        stat_manager = StatisticsManager(parameters, mode, strategy)
        generated_stat = stat_manager.generate_statistics()

        csv_dto = stat_manager.transform_to_csv_dto(generated_stat, config)

        csv_manager = CSVManager()
        csv_manager.write_csv(csv_dto)

        print("Finish! Gathered ", len(generated_stat), " results to storage, all result saved in ", csv_dto.filename,
              ".csv")

        csv_dto.filename = csv_dto.filename
        csv_manager.write_csv(csv_dto)