Euclid psf size residuals - #20
Open
AngusWright wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds new “processing functions” to append Euclid PSF residual quantities to LDAC catalogues (based on focal-plane position) and updates the DATAHEAD accordingly.
Changes:
- Introduces two new pipeline steps (
add_PSFSize_residualsand a more generaladd_PSF_residuals) with corresponding man-page definitions. - Adds Python utilities to compute and write PSF residual columns into the
OBJECTStable. - Extends the pipeline interface to accept a PSF table input (and a mode selector for the general residual script).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/add_PSFSize_residuals.sh | New processing function wrapper to run the PSF-size residual adder and update DATAHEAD. |
| scripts/add_PSFSize_residuals.py | Computes PSF size residuals from a PSF table and writes PSFSizeRes into the LDAC catalogue. |
| scripts/add_PSF_residuals.sh | New general processing function wrapper for adding different PSF residuals (mode-driven). |
| scripts/add_PSF_residuals.py | Adds either size or ellipticity PSF residual columns based on --mode. |
| man/add_PSFSize_residuals.man.sh | Man-page/housekeeping definitions for the PSF-size residual processing function. |
| man/add_PSF_residuals.man.sh | Man-page/housekeeping definitions for the general PSF residual processing function. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,46 @@ | |||
| #========================================= | |||
| # | |||
| # File Name : add_PSFSize_residuals.sh | |||
Comment on lines
+32
to
+38
| #Add PSF size residuals {{{ | ||
| _message " > @BLU@Adding PSF size residuals to @RED@${current##*/}@DEF@" | ||
| @PYTHON3BIN@ @RUNROOT@/@SCRIPTPATH@/add_PSF_residuals.py\ | ||
| --inpath ${current} \ | ||
| --outpath ${outputname} \ | ||
| --mode @BV:PSFMODE@ \ | ||
| --PSF_table @BV:PSFTABLE@ 2>&1 |
Comment on lines
+25
to
+28
| parser.add_argument( | ||
| "--mode", type=str, | ||
| help="the PSF residual to add (either size or ell)") | ||
| parser.add_argument( |
Comment on lines
+10
to
+14
| #Catalogue(s) from DATAHEAD | ||
| current=@DB:DATAHEAD@ | ||
|
|
||
| #Construct file names for shape recalibration {{{ | ||
| appendstr="_PSFR2" |
Comment on lines
+39
to
+41
| if args.mode == 'size': | ||
| PSFVAR = PSF[1].data['PSF_R2_ERR'] / PSF[1].data['PSF_R2'] / PSF[1].data['weights'] | ||
| colname = 'PSFSizeRes' |
Comment on lines
+16
to
+18
| parser = argparse.ArgumentParser( | ||
| description=f"step1_methodC.py: correct alpha in variance with method C.", | ||
| formatter_class=argparse.RawTextHelpFormatter) |
Comment on lines
+16
to
+18
| parser = argparse.ArgumentParser( | ||
| description=f"step1_methodC.py: correct alpha in variance with method C.", | ||
| formatter_class=argparse.RawTextHelpFormatter) |
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.
No description provided.