def test_pre_and_post_align(prescans, postscans): # pylint: disable=redefined-outer-name keys = prescans.keys() assert keys == postscans.keys() if not CREATE_BASELINE: with open(ALIGNMENT_BASELINES_FILEPATH, "r") as a_file: baselines = json.load(a_file) else: baselines = {str(key): None for key in keys} results = {} # keys_to_use = keys keys_to_use = [0.0, 1000.0] for key in keys_to_use: results[key] = np.around( get_alignment(prescans[key], postscans[key], baseline=baselines[str(key)]), decimals=4, ).tolist() if CREATE_BASELINE: with open(ALIGNMENT_BASELINES_FILEPATH, "w") as a_file: json.dump(results, a_file)
def test_net_od(prescans, postscans): # pylint: disable=redefined-outer-name keys = prescans.keys() assert keys == postscans.keys() results = {} keys_to_use = keys keys_to_use = [200, 600] for key in keys_to_use: results[key] = calc_net_od(prescans[key], postscans[key])