Replies: 5 comments 9 replies
-
This is a great question. I had not thought about searching backwards in time, but I can understand why that would be useful. This can be a little tricky for it to always work without accidentally skipping over a new moon. Just to get your code working for now, I would suggest this: search for the next new moon after the starting time t. Then take the result, subtract 35 days (using AddDays like you said), and search for the next new moon after that. This should always find the most recent new moon before time t. This will work, but it's not as efficient as it should be. So I will think about how I can support backward searches for lunar phase events. I like your idea that the |
Beta Was this translation helpful? Give feedback.
-
Thanks A somewhat related question: The above method allows searching for the new moon geocentric-ly (i.e. when the difference in longitude between the Earth's centre, the sun and the moon is zero), in addition to this, how can I search for the new moon based on a given location (i.e. the topocentric longitude difference is zero)? |
Beta Was this translation helpful? Give feedback.
-
Thanks, guys! Here are the other functions that could be adapted to a reverse chronological search by allowing a negative value for their
Here are functions which would require changes/additions to the interface:
This would be a lot of work, with uncertain usefulness. My intuition is that SearchRiseSet would be the most useful one to allow searching backwards in time. In most of these functions, I had envisioned a use case like this: someone wants to create a calendar, and you start at January 1 of the year and work forward to find all the interesting events. I'm open to feedback on a case-by-case basis about wanting reverse search for solving particular problems. |
Beta Was this translation helpful? Give feedback.
-
Also, regarding geocentric and topocentric, there are a number of functions that could benefit from this dual choice of geo and topo output (based on user choice). Some where I will hopefully be using both are:
PS. You may want to move this to another discussion. |
Beta Was this translation helpful? Give feedback.
-
Just to note, @hidp123 and I, are already using negative limitDays you provided, thanks for unblocking us again, our output now almost matches those publicly provided ones maps like this we were (at least I was) once clueless on how to generate. |
Beta Was this translation helpful? Give feedback.
-
Using the following code I can search for the next moon conjunction, but can I search for the previous one as well? I tried putting in a negative value but it returned
None
.new_moon = astronomy.SearchMoonPhase(0, astronomy.Time.Make(2022, 9, 25, 0, 0, 0), 35)
I guess I can use the
adddays
function to take the date back a few days?Beta Was this translation helpful? Give feedback.
All reactions