-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Is your feature request related to a problem? Please describe.
The current implementation of normalize_* and denormalize_* methods (normalize_geoinfos, normalize_source_channels, normalize_target_channels, denormalize_source_channels, denormalize_target_channels) in data_reader_base.py contains code duplication. Each method repeats similar logic, which increases maintenance costs and the risk of inconsistencies or bugs.
Describe the solution you'd like
Introduce helper functions (e.g., _normalize and _denormalize) that encapsulate the shared logic. Each method would then call the helper with the appropriate indices, mean, and standard deviation arrays.
Extra: replace the assert statement with an "if + ValueError"
Describe alternatives you've considered
Creating one generic function for both normalization and denormalization with a flag (but in my opinion this is less clear and potentially confusing)
Additional context
No response
Organisation
CMCC
Metadata
Metadata
Assignees
Labels
Type
Projects
Status