We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an established mechanism for saving/serializing fitted epsfs?
webbpsf has some mechanisms for writing/reading their models: https://github.com/spacetelescope/webbpsf/blob/7c74ffbcd777f01a9046ff5b61711fb4de6ade86/webbpsf/gridded_library.py#L497 https://github.com/spacetelescope/webbpsf/blob/7c74ffbcd777f01a9046ff5b61711fb4de6ade86/webbpsf/utils.py#L870
It would be really useful to do the same in photutils. Maybe this already exists, though, and I've failed to search the documentation?
The text was updated successfully, but these errors were encountered:
Example of what this might look like:
def save_epsf(epsf, filename, overwrite=True): header = {} header['OVERSAMP'] = list(epsf.oversampling) hdu = fits.PrimaryHDU(data=epsf.data, header=header) hdu.writeto(filename, overwrite=overwrite) def read_epsf(filename): fh = fits.open(filename) hdu = fh[0] return EPSFModel(data=hdu.data, oversampling=hdu.header['OVERSAMP'])
Seems really simple, and there are other parameters one should include, but maybe it's fine?
I'd also like to fit and save gridded EPSFs...
Sorry, something went wrong.
No branches or pull requests
Is there an established mechanism for saving/serializing fitted epsfs?
webbpsf has some mechanisms for writing/reading their models:
https://github.com/spacetelescope/webbpsf/blob/7c74ffbcd777f01a9046ff5b61711fb4de6ade86/webbpsf/gridded_library.py#L497
https://github.com/spacetelescope/webbpsf/blob/7c74ffbcd777f01a9046ff5b61711fb4de6ade86/webbpsf/utils.py#L870
It would be really useful to do the same in photutils. Maybe this already exists, though, and I've failed to search the documentation?
The text was updated successfully, but these errors were encountered: