Skip to content

Conversation

@laspsandoval
Copy link
Contributor

@laspsandoval laspsandoval commented Dec 17, 2025

Change Summary

Overview

The SWE I-ALiRT data is based on a spin period that is exact. During commissioning the spin has been varying. The resolution to this was to create a packet with zero data for all SWE variables, including the variable "swapi_seq_number". The sequence numbers are used to group the data so having duplicate values of "0" was causing the data to be thrown out. This PR addresses that issue.

Updated Files

  • process_swe.py
    • add ability to pass a flag
  • grouping.py
    • nominally swe_nom_flag is equal to 1. We use this information to inform what data to filter.

Testing

  • test_process_swe.py

@laspsandoval laspsandoval marked this pull request as draft December 17, 2025 03:41
@laspsandoval laspsandoval changed the title Swapi fixes I-ALiRT - SWAPI fixes Dec 17, 2025
# Conflicts:
#	imap_processing/ialirt/l0/process_swapi.py
#	imap_processing/tests/ialirt/unit/conftest.py
#	imap_processing/tests/ialirt/unit/test_process_swapi.py
@laspsandoval laspsandoval changed the title I-ALiRT - SWAPI fixes I-ALiRT - SWE fixes Dec 17, 2025
@laspsandoval laspsandoval self-assigned this Dec 17, 2025
@laspsandoval laspsandoval marked this pull request as ready for review December 17, 2025 17:40
@laspsandoval laspsandoval added the bug Something isn't working label Dec 17, 2025
@laspsandoval laspsandoval added this to the December 2025 milestone Dec 17, 2025
@laspsandoval laspsandoval added Ins: SWE Related to the SWE instrument I-ALiRT labels Dec 17, 2025
Comment on lines +478 to +480
grouped_data = find_groups(
accumulated_data, (0, 59), "swe_seq", "met", "swe_nom_flag"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing this in two locations? We have a find that takes in the flag and the filter_valid_groups which takes in the flag. Since this is only swe-specific at this point what if you put it right after this instead?

# Drop any off-nominal SWE groups
grouped_data = grouped_data.where(
            filtered_data["swe_nom_flag"] != 0,
            drop=True,
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working I-ALiRT Ins: SWE Related to the SWE instrument

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants