Skip to content

Commit

Permalink
Put list into a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
thuiop committed May 18, 2021
1 parent 4774bc3 commit 10246a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions btk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import numpy as np
from astropy.table import Table

BLEND_RESULT_KEYS = ("blend_images", "isolated_images", "blend_list")


def load_blend_results(path, survey):
"""Load results exported from a DrawBlendsGenerator.
Expand Down Expand Up @@ -114,13 +116,13 @@ def load_all_results(path, surveys, measure_names, n_batch):
The three dictionnaries corresponding to the results.
"""
blend_results = {}
for key in ["blend_images", "isolated_images", "blend_list"]:
for key in BLEND_RESULT_KEYS:
blend_results[key] = {}
measure_results = {}
metrics_results = {}
for s in surveys:
blend_results_temp = load_blend_results(path, s)
for key in ["blend_images", "isolated_images", "blend_list"]:
for key in BLEND_RESULT_KEYS:
blend_results[key][s] = blend_results_temp[key]

for meas in measure_names:
Expand Down

0 comments on commit 10246a1

Please sign in to comment.