Skip to content
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

correct_parallax fails for small r #627

Open
ColinOrionChandler opened this issue May 27, 2024 · 7 comments
Open

correct_parallax fails for small r #627

ColinOrionChandler opened this issue May 27, 2024 · 7 comments
Assignees
Labels

Comments

@ColinOrionChandler
Copy link
Collaborator

This is an issue for reflex-correction in Region Search, fakes analysis, and probably reproject.
The problem distance cutoff could be higher, there just aren't any fakes between 2.1 au and 3.1 au and I haven't tried reflex-correcting to distances under 5 au yet (though I have in the past, and it failed then).
I don't think we can simply ignore these fakes because they will still show up in the image data.
Besides, this issue would also impact users trying to RS or reproject in this regime.
A possible fakes-only workaround would be to supply the known geocentric distances to the new version of correct_parallax, but I haven't tested this in any way yet.

@ColinOrionChandler
Copy link
Collaborator Author

r doesn't have to be that small. Here's an example with an object at r=5 au:

coord=(251.29497121, -22.30754899), obstime=2019-06-04 04:28:11.845853, heliocentric_distance=5.0

@ColinOrionChandler
Copy link
Collaborator Author

If we can incorporate the bounds (see #629 ) then I think this issue will be resolved.

@ColinOrionChandler
Copy link
Collaborator Author

This was fixed previously, but with the new vectorized approach this is again a problem. A new kludge could be to send the failed items to the old fitter?

@jeremykubica
Copy link
Contributor

I am unable to reproduce this.

Using:

sc = SkyCoord(ra=251.29497121, dec=-22.30754899, unit="deg")
icrs_time = Time("2019-06-04T04:28:11", format="isot", scale="utc")
with solar_system_ephemeris.set("de432s"):
    eq_loc = EarthLocation.of_site("ctio")

corrected_coord1_geo, geo_dist1_geo = correct_parallax(
    coord=sc,
    obstime=icrs_time,
    point_on_earth=eq_loc,
    heliocentric_distance=5.0,
)
print(corrected_coord1_geo)

I get:

<SkyCoord (ICRS): (ra, dec, distance) in (deg, deg, AU)
    (251.30786205, -22.31255488, 4.99999992)>

I am probably missing a step you are doing. Can you provide the lines of code you are using to call?

@ColinOrionChandler
Copy link
Collaborator Author

This should have been resolved with the analytic (a.k.a., "Drew") approach, where a fork was added to catch distances under 2 au or something like that. You can make sure this is OK by using a guess distance of 0.5 au. To reiterate, we don't care about objects at that distance, but we have objects in our fakes catalog that are at that distance, and we need to know where they are in the pixels post-reprojection.

For the correct_parallax_vectoried version, try a guess distance of 0.5 au as well, and that should give odd results.

@ColinOrionChandler
Copy link
Collaborator Author

I just realized there's some confusing terminology throughout the history of this issue. Vectorized means the separate function Dino added; it has the word "vectorized" in the function name. The analytic solution, what is in correct_parallax now, is also a vector solution, but I'm calling that one the analytic solution.

@jeremykubica
Copy link
Contributor

Interestingly, the minimizer based approach fails for a guess distance of 0.5au, but the vectorized one (specifically correct_parallax_geometrically_vectorized()) fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants