Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Question about Astro::Coord::ECI::Moon and "phase"

by Cody Fendant (Pilgrim)
on Apr 04, 2014 at 08:34 UTC ( #1081087=perlquestion: print w/ replies, xml ) Need Help??
Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

This may not be the best place to ask but I've used Astro::Coord::ECI::Moon to get information about the moon's rise and set times.

It can return a value for the moon's phase. Obviously this is not an English term like "waxing", "waning", "crescent" etc. nor is it the amount of the moon currently illuminated (that's also returned) It's a number.

Where can I find out what that phase number means and how to translate it into one of those English phrases and/or an image?

Comment on Question about Astro::Coord::ECI::Moon and "phase"
Re: Question about Astro::Coord::ECI::Moon and "phase"
by Anonymous Monk on Apr 04, 2014 at 09:00 UTC
    What method are you talking about?
      I think if you combine  ($moon->phase)[0]   with  ($moon->next_quarter)[1]   you can get the inbetween principal Lunar phase like waxing/waning... just compare the percentages to wikipedia chart
        That seems useful, thank you. Where are you getting that from, is there some documentation I could be reading?
Re: Question about Astro::Coord::ECI::Moon and "phase"
by DrHyde (Prior) on Apr 04, 2014 at 10:38 UTC
    The documentation for the phase method tells you that it returns a list of two values, and describes what they mean. If it's still not clear to you, I suggest just playing with it a bit - get a month's worth of data from the module and compare to what you can see in the sky or on some random website.
      Thanks, got it. I don't know why I was experiencing documentation blindness.
Re: Question about Astro::Coord::ECI::Moon and "phase"
by Lotus1 (Chaplain) on Apr 04, 2014 at 13:25 UTC
      It does, except for the times of moonrise and set, which is why I went with the other module.
Re: Question about Astro::Coord::ECI::Moon and "phase"
by Anonymous Monk on Apr 06, 2014 at 14:15 UTC

    Would this be clearer as the first two paragraphs of the phase() documentation?

    This method calculates the current phase of the moon and its illuminated fraction. If the time is omitted, the current time of the $moon object is used.

    The phase is returned as a number from 0 to 2 * PI radians, with 0 being New Moon, PI / 2 being First Quarter, and so on. The illuminated fraction is a number from 0 (New Moon) to 1 (Full Moon).

      That is sensible. But the "aha!" moment for me was when I realised that if the moon was 50% illuminated, I didn't know which 50% unless I knew the phase number.

      If the phase was smaller than 3.141, then the moon was lit from the left, so to speak, and if it was bigger, the moon was lit from the right.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1081087]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2014-07-26 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (179 votes), past polls