Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmask aca image data columns (from get_aca_images) except for IMG #311

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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