Skip to content

Commit

Permalink
repack
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Sep 12, 2024
1 parent 03e2c66 commit 520b5a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions h5_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,8 @@ def add_weights(self):
weight_out[:, :, :, m, :] *= newvals[:, :, :, 0, :]
elif weight_out.shape[dirind] != newvals.shape[dirind]:
sys.exit(
'ERROR: Upsampling of weights because same direction exists multiple times in input h5 (verify and/or remove --propagate_flags)')
'ERROR: Upsampling of weights because same direction exists multiple times in input h5 '
'(verify and update directions or remove --propagate_flags)')
else:
weight_out *= newvals

Expand Down Expand Up @@ -2761,7 +2762,7 @@ def running_mean(nparray, avgfactor):
def repack(h5):
"""Repack function"""
print(f'Repack {h5}')
os.system(f'mv {h5} {h5}.tmp && h5repack {h5}.tmp {h5}')
os.system(f'mv {h5} {h5}.tmp && h5repack {h5}.tmp {h5} && rm {h5}.tmp')


def merge_h5(h5_out=None, h5_tables=None, ms_files=None, h5_time_freq=None, convert_tec=True, merge_all_in_one=False,
Expand Down

0 comments on commit 520b5a1

Please sign in to comment.