Skip to content

Commit

Permalink
Merge pull request #311 from sot/remove-mask
Browse files Browse the repository at this point in the history
Unmask aca image data columns (from get_aca_images) except for IMG
  • Loading branch information
jeanconn authored Nov 26, 2024
2 parents fd55941 + 5cf7011 commit 8c56ac2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mica/archive/aca_l0.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ def get_aca_images(
ok = slot_data_raw["QUALITY"] == 0
slot_data = Table(slot_data_raw[ok])

# Unmask everything that can be unmasked
# Remove mask from columns where no values are masked. IMGRAW is excepted because
# the mask reflects the presence of 4x4 or 6x6 images, not entirely missing data
# per row.
for col in slot_data.itercols():
if not np.any(col.mask) and col.name != "IMGRAW":
slot_data[col.name] = col.data.data

# Add slot number if there are any rows (if statement not needed after
# https://github.com/astropy/astropy/pull/17102).
# if len(slot_data) > 0:
Expand Down

0 comments on commit 8c56ac2

Please sign in to comment.