Log scat scale added#8
Merged
Merged
Conversation
…ot) from a month or so back, but I've changed how this is done a bit.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end plumbing for a log_scat_scale hyper-parameter (and reintroduces per-image/band offsets) so likelihood evaluation can be modified to improve posterior sampling behavior in under/over-dispersed image fits.
Changes:
- Adds
log_scat_scaleargument propagation intoprofitSetupData()for single-image, multi-image, and multi-band fitting entry points. - Re-implements/extends per-band
offset_listhandling inprofuseMultiBandFound2Fit()with validation and forwards offsets intoprofitSetupData(). - Updates multi-band bounds construction to account for
log_scat_scale, and updates Rd docs foroffset_list.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| R/profuseSingleImage.R | Adds log_scat_scale arg and forwards it into profitSetupData() for single-image setup. |
| R/profuseMultiImage.R | Adds log_scat_scale arg and forwards it into profuseFound2Fit() for each image. |
| R/profuseMultiBand.R | Adds log_scat_scale + offset_list, validates offsets, forwards both into profitSetupData(), and adjusts bounds construction. |
| man/profuseMultiBand.Rd | Documents offset_list (but currently missing log_scat_scale in usage/arguments). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
19
to
22
| fit_rough = FALSE, psf_dim = c(51, 51), star_con = 2, star_con_fit = TRUE, | ||
| star_circ = TRUE, tightcrop = TRUE, wave = NULL, smooth.parm = NULL, | ||
| star_circ = TRUE, offset_list = NULL, tightcrop = TRUE, wave = NULL, smooth.parm = NULL, | ||
| parm_ProSpect = NULL, data_ProSpect = NULL, logged_ProSpect = NULL, | ||
| intervals_ProSpect = NULL, autoclip = TRUE, roughpedestal = TRUE, ...) |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Based partly on the un-merged PR copilot/add-offset-list-support I have re-implemented support for offset_list and more importantly log_scat_scale. The latter works closely in tandem with recent updates to ICRAR/ProFit (particularly the profitLikeModel function), since we need some special handling when dealing with the log_scat_scale hyper-parameter since it is not strictly of parameter of ProFit or ProSpect, but a direct modification to how we infer data-model likelihoods. It is meant to allow better posterior sampling in cases of under and over-fitting models, which can be common in astronomy images due to residual features like spiral arms and bars etc.