Skip to content

Add other_fields to loader - #1694

Merged
ykyohei merged 1 commit into
masterfrom
loader_other_fields
Jul 29, 2026
Merged

Add other_fields to loader#1694
ykyohei merged 1 commit into
masterfrom
loader_other_fields

Conversation

@ykyohei

@ykyohei ykyohei commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Motivation is to load preprocess archive per observation easily.
The problem was preprocess archive is usually computed per (band, wafer) and each has scalar fields that cannot be concatenated.
One solution was to drop them by drop_fields , but number of fields to drop is large for ISO preprocess archive and it can increase.

This PR adds other_fields of aman.concatenate to loader to 'drop' them all at once or pick 'first'.

- If other_fields='exact' will compare entries in all items
and if they're identical will add it. Otherwise will fail with
a ValueError.
- If other_fields='fail', the function will fail with a ValueError.
- If other_fields='first', the values from the first element
of items will be copied into the output.
- If other_fields='drop', the fields will simply be ignored
(and the output will only contain fields that share the
target axis).

@ykyohei
ykyohei requested review from mhasself and mmccrackan July 13, 2026 11:24

@mhasself mhasself left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

@ykyohei
ykyohei merged commit 75b3365 into master Jul 29, 2026
5 checks passed
@ykyohei
ykyohei deleted the loader_other_fields branch July 29, 2026 14:58
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.

2 participants