Skip to content

catalog dir #4

Description

@along4

Consolidate predefined catalog assets under one repository directory

Problem

Predefined catalog assets are currently split across separate root-level directories:

  • lenses/
  • scintillators/

This makes the repository layout harder to scan as more reusable catalog data is added, and it requires code, docs, and tests to encode multiple top-level catalog locations.

Proposal

Move predefined catalog assets into a single catalog root, for example:

catalogs/
  lenses/
    catalog.yaml
    zmxFiles/
    smxFiles/
    README.md
  scintillators/
    catalog.yaml
    materials/
    curves/
    README.md

The goal is to make catalogs/ the single home for bundled, predefined data catalogs.

Scope

Update the repository layout and all default references that currently assume root-level catalog directories, including:

  • src/config/LensCatalogIO.py
  • src/config/ScintillatorCatalogIO.py
  • src/optics/LensModels.py
  • README/documentation links
  • tests that assert paths ending in lenses/... or scintillators/...

The relative paths inside each catalog can stay the same if each catalog tree is moved intact.

Acceptance Criteria

  • Bundled lens assets load from catalogs/lenses/.
  • Bundled scintillator assets load from catalogs/scintillators/.
  • Existing catalog loader APIs still work with their default arguments.
  • Explicit user-provided catalog_path values continue to work.
  • README and catalog documentation point to the new locations.
  • Unit tests are updated to reflect the new default paths.
  • A migration note documents the old-to-new path change.

Notes

Current hard-coded/default references include:

  • DEFAULT_LENS_CATALOG_PATH = repo_root() / "lenses" / "catalog.yaml"
  • DEFAULT_SCINTILLATOR_CATALOG_PATH = repo_root() / "scintillators" / "catalog.yaml"
  • default Zemax/SMX lookup paths under lenses/zmxFiles and lenses/smxFiles

Potential follow-up: once this structure exists, future predefined catalogs can be added under catalogs/<domain>/ instead of creating more top-level directories.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions