rithwiks commited on
Commit
74f9799
2 Parent(s): 9e009dc f6e0586

Merge branch 'main' of https://huggingface.co/datasets/AstroCompress/SBI-16-3D into main

Browse files
Files changed (1) hide show
  1. utils/eval_baselines.py +3 -3
utils/eval_baselines.py CHANGED
@@ -78,11 +78,11 @@ def main(dim):
78
 
79
  for path in tqdm(file_paths):
80
  with fits.open(path) as hdul:
81
- if dim == '2d':
82
  arrs = [hdul[1].data[0][0]]
83
- elif dim == '2d_diffs' and len(hdul[1].data[0]) > 1:
84
  arrs = [hdul[1].data[0][i + 1] - hdul[1].data[0][i] for i in range(len(hdul[1].data[0]) - 1)]
85
- elif dim == '3dt' and len(hdul[1].data[0]) > 2:
86
  arrs = [hdul[1].data[0][0:3]]
87
  else:
88
  continue
 
78
 
79
  for path in tqdm(file_paths):
80
  with fits.open(path) as hdul:
81
+ if dim == '2d': # run on just 2d arrays of the first timestep frame
82
  arrs = [hdul[1].data[0][0]]
83
+ elif dim == '2d_diffs' and len(hdul[1].data[0]) > 1: # run on ALL residual frame images
84
  arrs = [hdul[1].data[0][i + 1] - hdul[1].data[0][i] for i in range(len(hdul[1].data[0]) - 1)]
85
+ elif dim == '3dt' and len(hdul[1].data[0]) > 2: # compress the first 3 timestep frames as a 3D tensor
86
  arrs = [hdul[1].data[0][0:3]]
87
  else:
88
  continue