Skip to content

Saturation and bleed effects - #18

Merged
Nschanche merged 7 commits into
lightkurve:mainfrom
jorgemarpa:saturation-model
Aug 27, 2026
Merged

Nschanche merged 7 commits into
lightkurve:mainfrom
jorgemarpa:saturation-model

Conversation

@jorgemarpa

Copy link
Copy Markdown
Contributor

This PR implements saturation and bleed effect on CCD type detectors that conserve charge and bleed along the columns, such as those in Kepler and TESS.

What's implemented:

  • saturate_and_bleed() fucntion in utils.py which inputs prf_flux and detector well_depth and returns the version with saturation and bleed.
  • Optional arguments in PRF.evaluate() to turn on the saturation effect, these are a boolean variable and a list of the expected flux of the targets which is needed to apply the effect.

Here are some examples to show that the scale of the bleed columns are consistent between model (first example) and data (second example).

Kepler

image image

TESS

image image

Comment thread src/lkprf/prfmodel.py Outdated
Comment thread src/lkprf/prfmodel.py
@jorgemarpa

Copy link
Copy Markdown
Contributor Author

I'm trying to figure out why the action failed, it looks like poetry is failing to install fitsio==1.2.4. I saw that fitsio=1.4.2 fixed the wheels issue, but this one requieres python>3.10 which clashes with the current requierement in lkprf of python = ">=3.8.1,<4.0"
Do we have plans to update all lk related packages to python>3.10?

@jorgemarpa

jorgemarpa commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor Author

I pushed updates for:

  • Using newer version of fitsio>1.3
  • Added PRF saturation tests to pytest
  • Upping minor version to 1.2.0

@Nschanche
Nschanche merged commit eec2f28 into lightkurve:main Aug 27, 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