Skip to content

Half orbit mixin#7

Merged
robin-cls merged 6 commits into
mainfrom
half_orbit_mixin
May 12, 2026
Merged

Half orbit mixin#7
robin-cls merged 6 commits into
mainfrom
half_orbit_mixin

Conversation

@robin-cls
Copy link
Copy Markdown
Collaborator

Add a mixin for the half orbit range query.

The main difficulty for the implementation is to rely on the information from the folder instead from the files. Scanning the folders is much quicker. Generally, we expect that the cycle_number information is in the folders. The pass_number information should still be fetched from the files with a reduced scan because the files are organized per half orbits so this information will not be in the folders (folders are used to group the files). The implementation of the half orbit mixin also needs to override the time_coverage implementation, because knowing the first and last cycles will reduce the number of folders to scan.

All these issues are adressed in this PR. The implementation always falls back to a full scan if a PerformanceWarning is issued. However, this warning is suppressed for all methods of the mixin except cycle_range. This warning suppression is wanted because there will always be a partial scan of the files for the pass_number component of the half_orbit_range.

The documentation has been updated with a section describing the mixin-related methods for each implementation.

Other points of interest is :

  • Lixins now relies on filter_values for extracting the information. This enforces subset unmixing which will raise an error if subset filters are not properly configured by the user.
  • A small refactoring introduced _pick_subset_before_files_scan to improve the code readability and reduce code duplication.
  • Parameters for filter_values were not sanitized (ie. converted to the expected type). This is now the case.

List of breaking changes:

  • PeriodMixin methods will raise an error if a subset if not properly selected.

@robin-cls robin-cls merged commit 28176a0 into main May 12, 2026
13 of 15 checks passed
@robin-cls robin-cls deleted the half_orbit_mixin branch May 12, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant