Skip to content

Commit

Permalink
fixing overlong comment and updating wcs check per mit
Browse files Browse the repository at this point in the history
  • Loading branch information
Clara Brasseur committed Jun 20, 2019
1 parent cdb7c9e commit facf9f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions astrocut/cube_cut.py
Expand Up @@ -105,8 +105,8 @@ def _parse_table_info(self, table_header, table_data, verbose=False):
# Making sure we have a row with wcs info
while table_row is None:
table_row = table_data[data_ind]
ra_col = int([x for x in table_header.cards if x[1] == "CTYPE1"][0][0].replace("TTYPE", "")) - 1
if "RA" not in table_row[ra_col]:
ra_col = int([x for x in table_header.cards if x[1] == "WCSAXES"][0][0].replace("TTYPE", "")) - 1
if table_row[ra_col] == 2:
table_row is None
data_ind += 1
if data_ind == len(table_data):
Expand Down Expand Up @@ -147,7 +147,7 @@ def _parse_table_info(self, table_header, table_data, verbose=False):
self.img_kwds[kwd][0] = wcs_header.get(kwd)
# Adding the info about which FFI we got the
self.img_kwds["WCS_FFI"] = [table_data[data_ind]["FFI_FILE"],
"FFI filname used in cutout WCS calculation."]
"FFI used for cutout WCS"]


def _get_cutout_limits(self, cutout_size):
Expand Down
2 changes: 1 addition & 1 deletion astrocut/make_cube.py
Expand Up @@ -104,7 +104,7 @@ def make_cube(self, file_list, cube_file="img-cube.fits", sector=None, verbose=T
start_times[i] = ffi_data[1].header.get("TSTART") # TODO: optionally pass this in?

if good_header_ind is None: # Only check this if we don't already have it
if ffi_data[1].header.get("CTYPE1"): # Checking for WCS info
if ffi_data[1].header.get("WCSAXES", 0) == 2: # Checking for WCS info
good_header_ind = i

ffi_data.close()
Expand Down

0 comments on commit facf9f5

Please sign in to comment.