Skip to content

Conversation

@jorgemarpa
Copy link
Contributor

@jorgemarpa jorgemarpa commented Jun 30, 2022

This PR adds two new methods:

  1. A hidden function to find the scale factor that normalized the mean model to sum 1 when sources are full in the TPF. It creates a high-resolution mean model and integrates the PSF using the trapezoidal rule, the integral is the rescale factor that is applied to the PSF weights. The method also has a diagnostic plot. image

  2. A visible method to compute PSF metrics such as:

    • source_psf_fraction amount of PSF in data, useful to determine if a source has total or partial flux data. image
    • perturbed_ratio_mean how much the perturbed model deviates from the mean model for a given source, useful to find when the time model changes the mean value of the light curve. The expected value is 1.
    • perturbed_std how much variability has the perturbed model in time, helps find when the time model introduces synthetic variability or features. A large value means a poor time model. image

Requires #63 to be merged first

@jorgemarpa jorgemarpa added bug Something isn't working enhancement New feature or request labels Jun 30, 2022
@jorgemarpa
Copy link
Contributor Author

Sanity check, comparing SAP and PSF flux:
before (no normalization)
image

after (normalized shape model)
image

Scatter is due to saturated sources, sources with partial data (e.g. outside or near the edge of the TPF), and highly blended sources.

Copy link
Contributor

@christinahedges christinahedges left a comment

Choose a reason for hiding this comment

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

This looks very good! Let's add some tests that just check the metrics work and produce reasonable values? Especially the high resolution one would be good to test?

@christinahedges christinahedges merged commit 846f17a into SSDataLab:master Dec 8, 2022
christinahedges added a commit that referenced this pull request Dec 8, 2022
christinahedges added a commit that referenced this pull request Dec 8, 2022
@christinahedges
Copy link
Contributor

@jorgemarpa I reverted these changes because it broke in ways that were hard to debug quickly, you'll need to reopen this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants