Skip to content

Commit

Permalink
fix typo in header creation
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Dec 3, 2023
1 parent d77d263 commit 855b843
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spectral_cube/cube_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def combine_headers(header1, header2, spectral_dx_threshold=0, **kwargs):
specw1 = WCS(header1).spectral
specw2 = WCS(header2).spectral
specaxis1 = [x[0] for x in WCS(header1).world_axis_object_components].index('spectral')
specaxis2 = [x[0] for x in WCS(header1).world_axis_object_components].index('spectral')
specaxis2 = [x[0] for x in WCS(header2).world_axis_object_components].index('spectral')
range1 = specw1.pixel_to_world([0,header1[f'NAXIS{specaxis1+1}']-1])
range2 = specw2.pixel_to_world([0,header2[f'NAXIS{specaxis1+1}']-1])

Expand Down Expand Up @@ -981,7 +981,8 @@ def log_(x):
if verbose:
class tqdm(std_tqdm):
def update(self, n=1):
hdu.flush() # write to disk on each iteration
if output_file is not None:
hdu.flush() # write to disk on each iteration
super().update(n)

if method == 'cube':
Expand Down

0 comments on commit 855b843

Please sign in to comment.