Skip to content
New issue

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

Update PSF fitting defaults. #936

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ general

- Use tolerance for more comparisons in ``compare_asdf`` [#917]

- Update PSF fitting defaults. [#936]

ramp_fitting
------------

Expand Down
10 changes: 4 additions & 6 deletions romancal/lib/psf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def create_gridded_psf_model(
path_prefix,
filt,
detector,
oversample=12,
oversample=11,
fov_pixels=12,
sqrt_n_psfs=4,
overwrite=False,
Expand All @@ -82,7 +82,8 @@ def create_gridded_psf_model(
Computed gridded PSF model for this SCA.
Examples include: `"SCA01"` or `"SCA18"`.
oversample : int, optional
Oversample factor, default is 12. See WebbPSF docs for details [1]_.
Oversample factor, default is 11. See WebbPSF docs for details [1]_.
Choosing an odd number makes the pixel convolution more accurate.
fov_pixels : int, optional
Field of view width [pixels]. Default is 12.
See WebbPSF docs for details [1]_.
Expand Down Expand Up @@ -150,17 +151,14 @@ def create_gridded_psf_model(
if instrument_options is not None:
wfi.options.update(instrument_options)

central_wavelength_meters = (
filter_central_wavelengths[f"WFI_Filter_{filt}_Center"] * 1e-6 * u.m
)
(filter_central_wavelengths[f"WFI_Filter_{filt}_Center"] * 1e-6 * u.m)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to remove this line entirely?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to touch that at all. That was something the pre-commit hook did to my PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see what you mean. Yeah, I left that as an unused variable, and I thought precommit had just trying to reformat it but it in fact it got rid of the definition and it's now weird. I'll delete it.


# Initialize the PSF library
inst = gridded_library.CreatePSFLibrary(
instrument=wfi,
filter_name=filt,
detectors=detector.upper(),
num_psfs=n_psfs,
monochromatic=central_wavelength_meters,
oversample=oversample,
fov_pixels=fov_pixels,
add_distortion=False,
Expand Down
Loading