How do I dynamically hide a coordinate rotated behind sun?

Back again, this time looking at rotating named active regions from NOAA SRS reports forward in time. I am doing something similar to this example, and am propagating the AR locations forward in time and moving the observer to Mars.

Here’s the original data, overplotted on an HMI sunspot dataset: (cut because I’m still a new user)

Then I forward propagate the coordinates using propagate_with_solar_surface, and overplot on a map of the sunspots that both forward propagated and has been rotated for a non-Earth observer (Mars):

While ARs like 13490 are visible as expected, 13505 shouldn’t be drawn since it is not visible from the Mars-side. I had a cludge to filter out the longitude, but is there a way to automatee this detection?

If you transform a propagated coordinate to the Helioprojective coordinate frame, you can call the frame-specific method is_visible() to tell whether the coordinate is visible to the frame’s observer. Is that enough for your purposes?

It is, thank you! Just to check is there another method that would also work if I’m projecting the coordinate in Stonyhurst instead of Helioprojective?

No, there isn’t an analogous method for a HeliographicStonyhurst coordinate. Conceptually, a HeliographicStonyhurst coordinate is not tied to a particular observer location, so visibility would be ambiguous.

1 Like