Handing edge cases at detector edges #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
This is a super helpful tool, thanks for sharing it a while ago. I recently ran into some trouble when creating postage stamps near the edge of a CCD, more specifically in any case where the binlinear interpolation step wants to pull from the same TPF model. For example, the center of the TPF for TIC 347346532 in Sector 70 falls on cam=3, ccd=2, column=591, row=1. In the current version of the code, the PRF init fails you cannot create an object with these parameters. I've adjusted 1) the logic for picking which TPF models to interpolate between 2) the way those models are then sorted and 3) the bilinear interpolation step to handle these edge cases.
Entirely separately, I've also implemented much of this file in JAX with the aim of being able to vmap across many sub-pixel positions at once and make a model image cube of the same footprint over time. However, I'm not including that here since I don't want to introduce a JAX dependency into this package, but if that would be of interest, let me know!
Let me know what you think, and thanks again!