Uploading new PSF models¶
As we get new models for the PSF, this package requires updating. This notebook shows how to update the PSF files for the package.
Updating with new optical models from LLNL¶
If you have new optical PSF models for the NIR and Visible channel these are usually matlab grids of PSFs as a function of position and wavelength. To update these follow these steps:
Build new fits files¶
The matlab files need to be converted into fits files. Use the function
hdulist = pandorapsf.utils.make_PSF_fits_files(...)
Which will return the fits file format for pandorapsf
. Look at the docstring for that function to find out how to process the file.
Update the expected file dates in the configuration file for pandorapsf
¶
The config file in pandorapsf
's __init__
file has a set of dates, e.g.
"vis_psf_creation_date": "2025-03-28T10:30:27.329441",
"nir_psf_creation_date": "2025-03-28T10:06:08.770326",
You need to update these to the new dates of your file. Once updated, reload the package and run "reset_config" to update your config to the new default.
Upload the files to zenodo¶
You need to go to the zenodo listing for the Pandora models, click new version, and then upload the new files.
Update the zenodo link in the configuration file for pandorapsf
¶
In the config file there is a link to Zenodo, e.g.
"vis_psf_download_location": "https://zenodo.org/records/15101982/files/pandora_vis_psf.fits?download=1",
"nir_psf_download_location": "https://zenodo.org/records/15101982/files/pandora_nir_psf.fits?download=1",
Update these to reflect your new files
Build the low resolution fallback files¶
We store a very small version of these files as a fallback within the package directory. This is so that a single PSF can be evaluated if the package is pip installed without ever downloading the full grid files. Run
pp.utils.make_lowres_package_data()
To make this package date
Check the files¶
Move the files you've created to the data directory for the package, and check that everything works as expected. If not, repeat the above steps.
Rerun the docs notebooks and push to github¶
Go into the docs
folder and rerun all the tutorials to update the figures. Add all the changes to git and push to GitHub.
Update the package¶
In the pyproject.toml file, update the version number, and then poetry build and poetry release.