-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sector 13 PSF lc with very different looking segments #202
Comments
Hi Rachel, Thanks for your patience. In cases like this, I recommend plotting the psf shape parameters (data.psf_a, psf_b, psf_c, psf_x, psf_y, psf_bkg). You'll see that there's a big jump where the parameters jump quite a bit at cadences 540-550 when you run with the default setup, which then lead to a much worse fit in the second orbit (psf_ll, which is the negative log likelihood of the fit at each cadence). Something very bad happens to the telescope pointing at those cadences (which you can see by plotting data.tpf at each cadence, the stars jump all over quickly) which causes the optimiser to fall into a local minimum rather than the global minimum and it's a narrow enough minimum to stick around there the rest of the second orbit. You could remove those cadences from your arrays that you pass through to ignore them so the fitter never sees them and can't get caught in that fit, or by using a more complicated PSF model (possibly setting nstars=2 and fitting for that star in the corner as well) might also help it stay in the local minimum. I think I would recommend the first approach though! Good luck! |
I was trying to figure out the cadence masking and passing. I was able to see the “jump” in the data from the plotting you recommended. While I’m able to get the TJD of the region that needs masking, I’m not sure how to get the cadences that you describe i.e. 540-550 (or are you just calculating that yourself?) |
Hi Rachel, Remember that the PSF modeling doesn't care about times, it takes in an arbitary TPF and performs operations on the measured flux values, it doesn't know anything about the time of each observation (nor should it: the fit of the model to the data shouldn't depend on when the data were taken, two identical observations taken many days apart should in principle return the same model fit). In this case, you are returned an array called Once you have a masked array, you can pass in any arbitrary data into the |
It looks like this is an extremely faint star, 18.5 mag in the TESS bandpass. Here, its PSF overlaps with many brighter stars, so the best fitting model (using a Gaussian approximation, mind you, which is demonstratably a poor fit to the data) actually is a negative Gaussian at this location to better fit the ridges from the other, nearby, brighter stars. So at every cadence here it's preferring a negative flux, but we force a hard boundary that flux must be nonnegative which is why it's stuck at zero. You could do better by fitting multiple components here with the I always recommend checking out the documentation, the section titled 'good practices' says the following:
Your star is more than 20 times fainer than that, so I would be very surprised if it worked well! |
I'm using the latest version of eleanor with Python 3.7.
One of my s13 PSF light curves has this weird issue where the two segments look very different. This is NOT the case for the PCA light curve. Not sure what's going on here.
The text was updated successfully, but these errors were encountered: