<p>I used pyephem to calculate the fraction illuminated at each time</p>

<p><strong>Program</strong></p>

<pre><code>import ephem
m = ephem.Moon
d1 = ephem.Moon('2017') # d1 is the date of the first new moon in 2017
days = [3.69132375*i for i in range(1,8)]
for day in days:
    m.compute(d1+day)
    print(day, m.moon_phase)
</code></pre>

<p><strong>Output</strong></p>

<pre><code>3.69132375   0.1482372306829685
7.3826475    0.5259582805101828
11.07397125  0.8929835990614957
14.765295    0.9932503040700423
18.45661875  0.8004766309895268
22.1479425   0.4698580677294108
25.83926625  0.15043495343265506
</code></pre>

<p>Note that this is dependent on the particular month. There is an asymmetry as the motion of the moon is not perfectly even, it moves in an elliptical orbit.</p>

CC BY-SA 3.0
2017-11-05T22:13:07.693Z
2017-11-06T13:50:13.393Z
2017-11-06T13:50:13.393Z
James K
<p>The Moon's phase is naturally divided into 4 segments, not 8.
0 to 50% illuminated: waxing crescent
50 to 100%; waxing gibbous
-100 to -50%: waning gibbous
-50 to 0%: waning crescent</p>

<p>where the negative sign is used to indicate waning phases. Likewise the 4 phases of the Moon are
0% New Moon
50% First Quarter
100% Full Moon
-50% Last Quarter (or Third Quarter)</p>

<p>Note that I did not see the values 25, 0.5, and 0.75 on the page that you referenced.</p>

CC BY-SA 3.0
2017-11-06T19:47:04.857Z
Thank you. Under this construct, how would you evaluate whether certain health behaviors - like presentation to the emergency room - are related to the full moon?
JString
CC BY-SA 3.0
2017-11-07T00:53:33.727Z
The dates and times of Full Moon are known. You should calculate how many days before or after closest Full Moon the event occurred. Then you can choose how to perform the statistical analysis.
JohnHoltz
CC BY-SA 3.0
2017-11-06T11:04:59.427Z
2017-11-06T11:04:59.427Z
JohnHoltz
<p>The fraction of the moon illuminated does look like it could be defined by a sine/cosine function;</p>

<p>Period; 29.53059 days. Amplitude; 0.5. Y-Shift; 0.5.</p>

<p>In Y = Acos(Bx)+C</p>

<p>Y = 0.5cos((2π/29.53059)(x-3.69132375/2))+0.5</p>

<p>3.69132375 is 0.96193976625 </p>

<p>7.3826475 is 0.69134171618</p>

<p>11.07397125 is 0.30865828381</p>

<p>14.765295 is 0.03806023374</p>

<p>18.45661875 is 0.03806023374</p>

<p>22.1479425 is 0.30865828381</p>

<p>25.83926625 is 0.69134171618</p>

CC BY-SA 3.0
2017-11-06T11:12:05.217Z
There is something wrong. The fraction illuminated should be 0 at day 0 (New Moon) and 1 at day 14.8 (Full Moon).
JohnHoltz
CC BY-SA 3.0
2017-11-05T18:14:32.540Z
2017-11-05T18:14:32.540Z
Mac Stringer
<p>I have a dataset with events that are occurring over a period of 5 years. I am trying to determine whether these events are related to moon phase. I downloaded the "fraction of moon illuminated" for the time period, but am struggling to define the cutpoints for crescent, quarter, and gibbous. These are defined by the USNO as 0.25, 0.5, and 0.75 (<a href="http://aa.usno.navy.mil/data/docs/MoonFraction.php" rel="nofollow noreferrer">http://aa.usno.navy.mil/data/docs/MoonFraction.php</a>) but I am seeking to divide the period into 8 bins of equal time. I think it is a sine function, where the period is 29.53059 days. If I divide this by 8, I get: 3.69132375 days.</p>

<p>Can anyone help me determine the fraction illuminated (y) that corresponds to these outpoints?</p>

<p>0 days</p>

<p>3.69132375 days</p>

<p>7.3826475 days</p>

<p>11.07397125 days</p>

<p>14.765295  days</p>

<p>18.45661875  days</p>

<p>22.1479425  days</p>

<p>25.83926625  days</p>

<p>???</p>

<p>Thanks</p>

CC BY-SA 3.0
2017-11-05T17:07:41.783Z
is your starting point a full moon or new moon.  I suppose you mean fraction visible?  The fraction illuminated is always around 50%.
Natsfan
CC BY-SA 3.0
2017-11-05T21:46:36.950Z
Note, "New" "Quarter" and "Full" are points in time. Whereas "crescent" and "gibbous" are periods in time. So its not quite clear what you mean by "cutpoints for crescent, quarter, and gibbous."
James K
CC BY-SA 3.0
2017-11-06T19:42:53.440Z
I have a dataset with events occurring over a period of 4 1/2 years. I am trying to evaluate whether the frequency of these events are related to moon phase. I downloaded the fraction illuminated (which I guess if fraction visible) from USNO site for the corresponding period. I was thinking I would use the fraction illuminated proportion to "bin" each day of observation into 8 categories: new, waxing crescent, quarter, etc up to full. If anyone has better idea of how to do this, I would be grateful for input. Thanks you all!
JString
<the-moon>
Trying to categorize moon phase using fraction illuminated
JString
# Trying to categorize moon phase using fraction illuminated

(Asked by: username_0 on 2017-11-05)

I have a dataset with events that are occurring over a period of 5 years. I am trying to determine whether these events are related to moon phase. I downloaded the "fraction of moon illuminated" for the time period, but am struggling to define the cutpoints for crescent, quarter, and gibbous. These are defined by the USNO as 0.25, 0.5, and 0.75 (<http://aa.usno.navy.mil/data/docs/MoonFraction.php>) but I am seeking to divide the period into 8 bins of equal time. I think it is a sine function, where the period is 29.53059 days. If I divide this by 8, I get: 3.69132375 days.

Can anyone help me determine the fraction illuminated (y) that corresponds to these outpoints?

0 days

3.69132375 days

7.3826475 days

11.07397125 days

14.765295 days

18.45661875 days

22.1479425 days

25.83926625 days

???

Thanks

**Tags:** the-moon

> **Comments:**
> **username_1**: is your starting point a full moon or new moon.  I suppose you mean fraction visible?  The fraction illuminated is always around 50%.  
> **username_2**: Note, "New" "Quarter" and "Full" are points in time. Whereas "crescent" and "gibbous" are periods in time. So its not quite clear what you mean by "cutpoints for crescent, quarter, and gibbous."  
> **username_0**: I have a dataset with events occurring over a period of 4 1/2 years. I am trying to evaluate whether the frequency of these events are related to moon phase. I downloaded the fraction illuminated (which I guess if fraction visible) from USNO site for the corresponding period. I was thinking I would use the fraction illuminated proportion to "bin" each day of observation into 8 categories: new, waxing crescent, quarter, etc up to full. If anyone has better idea of how to do this, I would be grateful for input. Thanks you all!  

---

## 3 answers

### Answer by username_2 on 2017-11-05. Score: 3

I used pyephem to calculate the fraction illuminated at each time
Program
import ephem
m = ephem.Moon
d1 = ephem.Moon('2017') # d1 is the date of the first new moon in 2017
days = [3.69132375*i for i in range(1,8)]
for day in days:
    m.compute(d1+day)
    print(day, m.moon_phase)

Output
3.69132375   0.1482372306829685
7.3826475    0.5259582805101828
11.07397125  0.8929835990614957
14.765295    0.9932503040700423
18.45661875  0.8004766309895268
22.1479425   0.4698580677294108
25.83926625  0.15043495343265506

Note that this is dependent on the particular month. There is an asymmetry as the motion of the moon is not perfectly even, it moves in an elliptical orbit.


---

### Answer by username_3 on 2017-11-06. Score: 1

The Moon's phase is naturally divided into 4 segments, not 8.
0 to 50% illuminated: waxing crescent
50 to 100%; waxing gibbous
-100 to -50%: waning gibbous
-50 to 0%: waning crescent

where the negative sign is used to indicate waning phases. Likewise the 4 phases of the Moon are
0% New Moon
50% First Quarter
100% Full Moon
-50% Last Quarter (or Third Quarter)

Note that I did not see the values 25, 0.5, and 0.75 on the page that you referenced.

> **Comments:**
> **username_0**: Thank you. Under this construct, how would you evaluate whether certain health behaviors - like presentation to the emergency room - are related to the full moon?  
> **username_3**: The dates and times of Full Moon are known. You should calculate how many days before or after closest Full Moon the event occurred. Then you can choose how to perform the statistical analysis.  

---

### Answer by username_4 on 2017-11-05. Score: 0

The fraction of the moon illuminated does look like it could be defined by a sine/cosine function;

Period; 29.53059 days. Amplitude; 0.5. Y-Shift; 0.5.

In Y = Acos(Bx)+C

Y = 0.5cos((2π/29.53059)(x-3.69132375/2))+0.5

3.69132375 is 0.96193976625

7.3826475 is 0.69134171618

11.07397125 is 0.30865828381

14.765295 is 0.03806023374

18.45661875 is 0.03806023374

22.1479425 is 0.30865828381

25.83926625 is 0.69134171618

> **Comments:**
> **username_3**: There is something wrong. The fraction illuminated should be 0 at day 0 (New Moon) and 1 at day 14.8 (Full Moon).  

---

