Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Bianco <[email protected]>
  • Loading branch information
rlwastro and snbianco authored Nov 16, 2024
1 parent 4eed99c commit 667fd83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astrocut/cutouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def fits_cut(input_files, coordinates, cutout_size, correct_wcs=False, extension
with fits.open(in_fle, mode='denywrite', memmap=True, fsspec_kwargs=fsspec_kwargs) as hdulist:

# Sorting out which extension(s) to cutout
all_inds = np.where([x.is_image and (x.size > 0) for x in hdulist])[0]
all_inds = np.where([hdu.is_image and hdu.size > 0 for hdu in hdulist])[0]
cutout_inds = _parse_extensions(all_inds, in_fle, extension)

num_cutouts += len(cutout_inds)
Expand Down Expand Up @@ -537,7 +537,7 @@ def img_cut(input_files, coordinates, cutout_size, stretch='asinh', minmax_perce
with fits.open(in_fle, mode='denywrite', memmap=True) as hdulist:

# Sorting out which extension(s) to cutout
all_inds = np.where([x.is_image and (x.size > 0) for x in hdulist])[0]
all_inds = np.where([hdu.is_image and hdu.size > 0 for hdu in hdulist])[0]
cutout_inds = _parse_extensions(all_inds, in_fle, extension)

for ind in cutout_inds:
Expand Down

0 comments on commit 667fd83

Please sign in to comment.