Skip to content

Minor changes#53

Merged
duxfrederic merged 10 commits into
mainfrom
minor_dev
Apr 22, 2026
Merged

Minor changes#53
duxfrederic merged 10 commits into
mainfrom
minor_dev

Conversation

@duxfrederic

Copy link
Copy Markdown
Owner

Breaks existing databases, I will not write patches.

To run this updated code, one needs to add a column to existing reductions database:

ALTER TABLE PSFs ADD COLUMN fwhm_moffat_arcseconds REAL DEFAULT NULL;
  1. keep track of moffat fwhm during psf fit
  2. more robust header handling for oversized keywords (e.g. lsst files)
  3. add ROI to star / footprint plot
  4. relax scatter check in zeropoints during roi file preparation

@duxfrederic

Copy link
Copy Markdown
Owner Author

@martin-millon
thanks for noticing the lsst header stuff.
Since I want to eliminate residual astrometric solutions (led to bugs in the past with some imagers), I cannot just copy over the entire header as you did in your PR. I hope you don't mind but I corrected here in another way, still deleting astrometric keywords.

More about the LSST astrometric solutions:
I am still not convinced they are accurate. It is possible the distortion terms introduce a bias over the entire frame ...which would not be ideal given that distortion is supposed to be a first order correction. If it is indeed the case, I need to submit a PR to astropy so the Cutout2D class takes distortion into account.
Will start testing soon -- my computer arrived dead from chile, but waiting on replacement parts.

In the mean time, plate solving the LSST frames again yields well centered cutouts (without needing distortion)

@duxfrederic duxfrederic self-assigned this Jul 14, 2025
@duxfrederic
duxfrederic requested a review from Copilot July 14, 2025 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 implements several improvements to the lightcurver system including database schema changes, enhanced PSF modeling, and better error handling. The changes break existing databases and require a manual migration to add the new fwhm_moffat_arcseconds column.

  • Track Moffat FWHM values during PSF fitting for better image quality monitoring
  • Improve FITS header handling for oversized keywords from LSST files
  • Add ROI visualization to star/footprint plots and relax zeropoint scatter validation

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lightcurver/structure/database.py Adds new column for storing Moffat FWHM measurements
lightcurver/processes/psf_modelling.py Extracts and stores Moffat FWHM values during PSF fitting
lightcurver/processes/frame_importation.py Improves FITS header handling for already plate-solved images
lightcurver/processes/star_querying.py Adds ROI coordinates to star visualization plots
lightcurver/plotting/sources_plotting.py Renders ROI with distinct visual styling
lightcurver/processes/roi_file_preparation.py Converts assertion to warning for zeropoint scatter check
lightcurver/processes/star_photometry.py Updates terminology from "deconvolution" to "modelling"

Comment thread lightcurver/plotting/sources_plotting.py
Comment thread lightcurver/processes/roi_file_preparation.py Outdated
Comment thread lightcurver/processes/roi_file_preparation.py
@duxfrederic
duxfrederic merged commit 1458308 into main Apr 22, 2026
1 check passed
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.

2 participants