Feature/159 psf output from trained model#163
Open
jeipollack wants to merge 129 commits intodevelopfrom
Open
Conversation
f15c0f2 to
89da2e0
Compare
c199e05 to
9f64df3
Compare
e995e7c to
6b2a1fe
Compare
Contributor
Author
|
it would be very ideal to squash and merge this commit in order to simplify rebasing the other branches. |
added 6 commits
February 2, 2026 16:32
…ean up submodule docs, update conf.py, and update pyproject.toml version
- Removed old auto-generated wf_psf.rst from _autosummary - Updated toc.rst (fixed tab issues, reference api.rst) - Added api.rst with :recursive: directive and wf_psf.run entrypoint - Refined __init__.py docstrings for all subpackages for clarity and consistency - Updated module-level docstrings (purpose, authors, TensorFlow notes, etc.)
- Shorten sections to make developer-friendly - Added new structure for each section: Purppose, Key Fields, Notes, General Notes, etc, where applicable - Partial completion - new PR is required to verify optional versus required settings
…r required for evaluation/inference
- Add status handling to model.load_weights() call - Use expect_partial() to suppress warnings about unused optimizer state - Allows successful weight loading for metrics evaluation when checkpoint contains training artifacts
- Delete model reference and run garbage collection - Clear TensorFlow session to free GPU memory - Prevents OOM issues in subsequent operations or multiple training runs
- Introduce unified `get_data_array` for training/metrics/inference access - Add helpers `extract_star_data` and `_get_inference_data` - Remove redundant `get_np_obs_positions` - Move data handling logic out of `compute_centroid_corrections` - Standardise `centroid_dataset` as dict (stamps + optional masks) - Support optional keys (masks, priors) via `allow_missing` - Improve and unify docstrings for data extraction utilities - Add optional "sources" and "masks" attributes to `PSFInference - Add `correct_centroids` and `add_ccd_misalignments` as options to inference_config.yaml
- Updated classes and methods with complete doc strings - Added two cache clearing methods to PSFInference and PSFInferenceEngine classes
Rebase dropped commits that removed weights_path from the metrics interface. Cleaning up remaining references in docstrings and tests.
Use f-strings instead of %-formatting to properly display percent symbols in metric output.
8ea2ede to
0c74bfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds inference capabilities to the WaveDiff / WF-PSF framework, allowing the user to generate broadband (polychromatic) PSFs from a trained model, given a list of positions and SEDs.
It had a refactor PR merged into it in order to carry on with the development which is why it contains >100 commits (unfortunately and not a practice that will be repeated).
Closes #159 (Validation runs described there)
Key Changes
psf_inference.pyand associatedtest_inferencepackages for PSF inference workflowsTFPhysicalPolychromaticand related modules to separate training vs. inference behaviourPSFInferenceEngineclass to centralise training, simulation, metrics, and inference logicpsf_model_loader.pydata_handlerinference_config.yaml)run_typeattribute: Added to data_handler supporting training, simulation, metrics, and inference modesZernikeInputsdata class: Now intelligently assembles Zernike contribution lists based on run_type and available data (including priors and source positions for CCD misalignment corrections)tf_utils.pymodule in thepsf_modelssub-packageDataHandlerclass that prevented training dataset images from being converted to TensorFlow data type as expectedget_obs_positionsas it was no longer neededmetrics.py(values were not being displayed)Testing
developcode