-
Notifications
You must be signed in to change notification settings - Fork 14
Make the RomanOptics chromatic=True option more effective and more efficient. #198
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
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b30096f
Add mokey-patch to get the bandpass option to SED.thin from GalSim PR…
rmjarvis b237700
Add input.bandpass option and store in PSF class with wcs and pointing.
rmjarvis 82267c8
Add PSF.set_context as a cleaner pattern for setting wcs, pointing, b…
rmjarvis c387637
Store seds as unit-flux normalized, which is normally what we'll want.
rmjarvis 7fcf9eb
Add sed_tol option
rmjarvis 7bbdcca
Have Roman PSF (normally) get filter_name from input bandpass.
rmjarvis fdb9f12
Construct effective sed = sed*bandpass to thin and store
rmjarvis a1ec916
Add a real test of the accuracy of chromatic RomanPSF fitting
rmjarvis 933e6ce
Need to use Add, not Sum when components can be chromatic
rmjarvis b60a3d6
Make reflux work correctly for chromatic objects
rmjarvis 990b44a
Use a picklable flat_bandpass
rmjarvis 022545e
Update piff.yaml for dev run with separate files for chrom/achrom
rmjarvis 94f2299
Remove galsim_patch.py, since no longer necessary after 3be35999
rmjarvis 56e2ddf
Both OpticalModel and RomanOpticalModel should have _centered=True
rmjarvis 30815fb
Add test of chromatic psf using reflux
rmjarvis 766f158
Add sed_max_samples option
rmjarvis 312cb3e
this is the best chromatic run so far
rmjarvis 921ba6f
typos
rmjarvis fb6e1d2
coverage
rmjarvis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Note: this run takes ~ 380 minutes to run. | ||
|
|
||
| input: | ||
|
|
||
| # This file is quite large, so not saved in the repo. | ||
| # It and the cat_file are available from here: | ||
| # https://drive.google.com/drive/folders/1akvHjdKSTMppPTcNfXjEy9SVq_hFBDBc | ||
| image_file_name: 'ffov_13906_test_v251020.fits' | ||
| image_hdu: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] # hdu = SCA | ||
| badpix_zeros: True | ||
|
|
||
| cat_file_name: 'stars_13906_test_v251105.parquet' | ||
|
|
||
| # For now just use a single SED for all stars. This is the SED for a K type star. | ||
| sed_file_name: 'seds/XSL_DR3_release/xsl_spectrum_X0066_merged_scl.fits' | ||
| sed_wave_type: 'nm' | ||
| sed_flux_type: 'erg cm**(-2) s**(-1) angstrom**(-1)' | ||
| sed_max_samples: 2 # Just keep a linear approximation to the sed across the bandpass. | ||
| bandpass: | ||
| type: RomanBandpass | ||
| name: H158 | ||
|
|
||
| ra_col: ra | ||
| dec_col: dec | ||
| properties: | ||
| sca: '$@image_num + 1' | ||
| noise: BKGNDVAR | ||
| gain: EQVGAIN | ||
| sky: median | ||
|
|
||
| stamp_size: 25 | ||
|
|
||
| select: | ||
|
|
||
| min_snr: 50 # reject very faint stars | ||
| max_snr_weight: 500 # don't over-weight very bright stars | ||
| hsm_size_reject: 5 # number of inter-quartile ranges from median to reject size estimate. | ||
| max_pixel_cut: 50000 # reject stars with a pixel value higher than this. (sort of) | ||
| min_sep: 1.0 # reject stars with a neighbor closer than 1 arcsec away. | ||
|
|
||
| output: | ||
| dir: 'output' | ||
| file_name: 'ffov_13906_18.piff' | ||
|
|
||
| stats: | ||
| - | ||
| type: StarImages | ||
| file_name: 'stars_18.png' | ||
| nplot: 0 # all stars | ||
|
|
||
| psf: | ||
|
|
||
| type: Sum | ||
|
|
||
| components: | ||
|
|
||
| - | ||
| type: RomanOptics | ||
| chromatic: True | ||
| max_zernike: 12 # Fit Zernike coefficients 4-12 inclusive. | ||
| aberration_prior_sigma: 3.e-3 # Gaussian prior on all Zernike coefficients. | ||
| aberration_interp: constant # linear is possible but doesn't seem to work better. | ||
| nominal_interp: bilinear # five_point is possible but doesn't work better on | ||
| # this sim. May be different on real data. | ||
| nproc: 6 | ||
|
|
||
| - | ||
| type: Simple | ||
| model: | ||
| type: PixelGrid | ||
| scale: 0.11 | ||
| size: 5 | ||
| interp: | ||
| type: BasisPolynomial | ||
| order: 2 | ||
|
|
||
| outliers: | ||
| - | ||
| type: Chisq | ||
| nsigma: 10 | ||
| max_remove: 0.03 | ||
| - | ||
| type: Centroid | ||
| max_offset: 0.2 # arcsec | ||
|
|
||
|
|
||
|
|
||
| verbose: 2 |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self.components is not None: can be more straight forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None wouldn't work. It's either a list or an int. The latter is when it is still in the process of being read in from a file, but _finish_read hasn't been called yet. The other check for whether the read is complete uses this, so I'm inclined to keep it this way for consistency.