Skip to content

Commit

Permalink
json-dump a dict, not list (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans authored Jul 21, 2022
1 parent b766e65 commit 0b9ec77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skymap_scanner/server/scan_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def is_close(
file containing every diff at the pixel-data level.
"""
close: Dict[str, bool] = {} # one bool for each nside value
diffs = [] # a large (~4x size of self.results) list of dicts w/ per-pixel info
diffs: Dict[str, list] = {} # (~4x size of self.results) w/ per-pixel info

# now check individual nside-iterations
for nside in sorted(self.result.keys() & other.result.keys(), reverse=True):
Expand Down Expand Up @@ -202,7 +202,7 @@ def is_close(
nside_diffs.append(pix_diff)

if dump_json_diff: # can be a lot of data, so only save it if we're dumping
diffs.append(nside_diffs)
diffs[nside] = nside_diffs

# aggregate test-truth values
nside_equal = {
Expand Down

0 comments on commit 0b9ec77

Please sign in to comment.