Skip to content

Centralise dataset keys and run types in a config file #178

@jeipollack

Description

@jeipollack

Problem:
Data extraction across modules (data_handler.py, centroids.py, ZernikeInputsFactory, etc.) currently uses hard-coded keys and run-type logic (i.e. "simulation", "training", "metrics" and "inference"). This leads to duplicated code, scattered special cases, lengthy conditionals and makes adding new run types or datasets harder.

In PR #163, I am introducing get_data_array with helper _get_direct_data consolidates handling of these cases, but further improvements are possible to enable a cleaner, more abstract design.

Proposal:

  • Introduce a config file to store:
    • Dataset keys for each data type (e.g., positions, stamps, masks).
    • Run-type properties (e.g., whether to concatenate train/test datasets).
    • Refactor get_data_array and related dataset utilities to read from this config instead of using hard-coded keys.

Benefits:

  • Centralised abstraction for keys and run-type logic.
  • Cleaner, leaner module code.
  • Easier extension for new run types or real observational data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions