Skip to content

Euclid psf size residuals - #20

Open
AngusWright wants to merge 5 commits into
Euclidfrom
Euclid_PSFSizeResiduals
Open

Euclid psf size residuals#20
AngusWright wants to merge 5 commits into
Euclidfrom
Euclid_PSFSizeResiduals

Conversation

@AngusWright

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 29, 2026 06:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_residuals and a more general add_PSF_residuals) with corresponding man-page definitions.
  • Adds Python utilities to compute and write PSF residual columns into the OBJECTS table.
  • 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants