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

Missed Jupiter Moon Event #27

Open
Cannikev opened this issue Dec 4, 2024 · 6 comments
Open

Missed Jupiter Moon Event #27

Cannikev opened this issue Dec 4, 2024 · 6 comments

Comments

@Cannikev
Copy link
Contributor

Cannikev commented Dec 4, 2024

Thanks for you work on pymeeus. Hoping you can help me:
I'm using JupiterMoons.is_phenomena and running some checks to see if all is running OK.

According to sky and telescope there should be an Io transit and Io shadow event occuring at this time:

Sky and Telescope

Tuesday, December 3, 2024
01:44 UT, Io exits occultation behind Jupiter. (event returns True)
20:32 UT, Io's shadow begins to cross Jupiter.
20:40 UT, Io begins transit of Jupiter.
22:44 UT, Io's shadow leaves Jupiter's disk.
22:50 UT, Io ends transit of Jupiter.

I ran the code below to see if I find it using pymeeus. I can get other events to work (for example the 01:44 event), but wondered if I'm doing something wrong or if something isn't working as expected for the 20:32-22:50 events.
I'm setting the time for 3 December 2024, 22:00 which I believe should coincide with both an Io transit and eclipse event.

from pymeeus.Epoch import Epoch
from pymeeus.JupiterMoons import JupiterMoons

event_date = Epoch(2024, 12, 3, 22, 00, 00)

#Structure of result matrix
# Row 0: Io          Column 0: Occultation True\False
# Row 1: Europa      Column 1: Eclipse True\False
# Row 2: Ganymede    Column 2: No use
# Row 3: Callisto

result_matrix = JupiterMoons.is_phenomena(event_date)

#print Row 0
print("(Occultation of Io, Eclipse of Io, No use): ")
print(result_matrix[0])

>>> [False, False, False]
@architest
Copy link
Owner

architest commented Dec 4, 2024 via email

@Cannikev
Copy link
Contributor Author

Cannikev commented Dec 7, 2024

I've been digging and (I think) I can see the problem:
I'm here:

def is_phenomena(epoch):
...
        for row in range(len(result_matrix)):
            for col in range(len(result_matrix[row]) - 1):
                result_matrix[row][col] = (1 >= dist_matrix[row][col] >= 0)

this line:
result_matrix[row][col] = (1 >= dist_matrix[row][col] >= 0)
is filtering out all negative values.
i think it should be filtering all values between -1 and 1
so changing to this seems to work better:
result_matrix[row][col] = (1 >= dist_matrix[row][col] >= 1)
I'm not certain why it goes to 0 to 1, so perhaps there is a reason for that and an impact further downstream?

Also, there may need to be an indicator as to whether the moon is in in inferior or superior conjunction which may be the original purpose of column [2] in the results matrix? I'm not sure, but for me that would be a good use, as then you could determine if the event was in front or behind Jupiter as seen by the observer. Then it would be possible to identify transit/ occultation as viewed from earth, and shadow transit/ moon eclipse as viewed from the sun.

The negative values of being passed to the is_phenomena function can then be put to use.

            Row 0: Io            Column 0: Occultation
            Row 1: Europa        Column 1: Eclipse
            Row 2: Ganymede      Column 2: No use (could be used as a inferior/superior conjunction indicator)
            Row 3: Callisto

@architest
Copy link
Owner

architest commented Dec 9, 2024 via email

@Cannikev
Copy link
Contributor Author

Cannikev commented Dec 12, 2024

Hey Dago. no problem. I made the PR to fix the filter. Would you like me to re-purpose "Column 2: No use" to contain a inferior/superior conjunction indicator? I'm not sure if that was the original idea, but for me that would make sense, I can make time later in the month if you like, or just ignore if there is a better intention for that.
Cheers, Kev

@Cannikev Cannikev reopened this Dec 12, 2024
@architest
Copy link
Owner

architest commented Dec 12, 2024 via email

@Cannikev
Copy link
Contributor Author

Just made the PR for: Feature / add conjunction type to jupiter moons class#29 which re purposes the 3rd column so you can tell which side of jupiter the moon is on.

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

No branches or pull requests

2 participants