<p>NASAs Scientific Visualization Studio has a <a href="https://svs.gsfc.nasa.gov/4442" rel="nofollow noreferrer">page</a> showing the Moon Phase and Libration over the course of each year.  On the same page you can find a link to the data table including, among other things, the phase of the moon for each hour of the year in UT. You can download the table as a <a href="https://svs.gsfc.nasa.gov/vis/a000000/a004400/a004442/mooninfo_2019.txt" rel="nofollow noreferrer">TXT</a> and  <a href="https://svs.gsfc.nasa.gov/vis/a000000/a004400/a004442/mooninfo_2019.json" rel="nofollow noreferrer">JSON</a>  file.<br>
In case you only want a daily list and are using Linux you could than do something like:</p>

<pre><code>cat mooninfo_2019.txt | grep "00:00 UT"  &gt; mooninfo_2019_daily.txt
</code></pre>

CC BY-SA 4.0
2019-09-18T06:11:28.920Z
The question has changed a bit.
Mike G
CC BY-SA 4.0
2019-09-16T12:18:55.140Z
2019-09-16T13:19:37.973Z
2019-09-16T13:19:37.973Z
SpaceCore
<p>I finally fixed my issue by still using <a href="http://neoprogrammics.com/lunar_phase_images/" rel="nofollow noreferrer">Tanner's images</a> (named from 0 to 360), and by getting the phases from the <a href="https://github.com/mourner/suncalc" rel="nofollow noreferrer">SunCalc</a> library (which returns a number between 0 and 1). This way, I could easily associate images of a phase to a given date.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>SunCalc</th>
<th>Tanner</th>
<th>Phase</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>0</td>
<td>New Moon</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Waxing Crescent</td>
</tr>
<tr>
<td>0.25</td>
<td>90</td>
<td>First Quarter</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Waxing Gibbous</td>
</tr>
<tr>
<td>0.5</td>
<td>180</td>
<td>Full Moon</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Waning Gibbous</td>
</tr>
<tr>
<td>0.75</td>
<td>270</td>
<td>Last Quarter</td>
</tr>
<tr>
<td></td>
<td></td>
<td>Waning Crescent</td>
</tr>
<tr>
<td>1</td>
<td>360</td>
<td>New Moon</td>
</tr>
</tbody>
</table>
</div>
<p>Javascript method:</p>
<pre><code>getMoonImageName (year, month, day) {
  var ill = SunCalc.getMoonIllumination(new Date(year, month-1, day))
  return Math.round(ill['phase'] * 360).toString().padStart(3, &quot;0&quot;) + &quot;.png&quot;;
}
</code></pre>

CC BY-SA 4.0
2019-09-18T08:21:17.810Z
2020-12-15T06:40:11.640Z
2020-12-15T06:40:11.640Z
DevonDahon
<p><a href="https://ssd.jpl.nasa.gov/horizons.cgi" rel="noreferrer">JPL HORIZONS</a> can do that.
With settings like these:</p>

<blockquote>
  <p>Ephemeris Type : <strong>OBSERVER</strong><br/>
  Target Body : <strong>Moon [Luna]</strong> [301]<br/>
  Observer Location : <strong>Geocentric</strong> [500]<br/>
  Time Span : Start=<strong>2019-09-12</strong>, Stop=<strong>2019-09-19</strong>, Step=<strong>1 d</strong><br/>
  Table Settings : QUANTITIES=<strong>10,23,24</strong></p>
</blockquote>

<p>it returns results like these:</p>

<pre><code> Date__(UT)__HR:MN       Illu%    S-O-T /r    S-T-O
***************************************************
 2019-Sep-12 00:00      95.688 155.9731 /T  23.9640
 2019-Sep-13 00:00      98.620 166.4750 /T  13.4888
 2019-Sep-14 00:00      99.814 175.0444 /T   4.9422
 2019-Sep-15 00:00      99.231 169.9061 /L  10.0670
 2019-Sep-16 00:00      96.874 159.5743 /L  20.3723
 2019-Sep-17 00:00      92.791 148.7668 /L  31.1541
 2019-Sep-18 00:00      87.074 137.7510 /L  42.1469
 2019-Sep-19 00:00      79.858 126.5419 /L  53.3370
</code></pre>

<p>where <code>Illu%</code> is the illuminated fraction <span class="math-container">$k$</span>, and <code>S-T-O</code> is the sun-target-observer phase angle <span class="math-container">$i$</span>.
These quantities are related by
(<a href="https://www.willbell.com/math/mc1.htm" rel="noreferrer">Meeus</a> 41.1)
<span class="math-container">$$ k = \frac{1 + \cos i}{2} $$</span></p>

<p>An observer location on the surface of the Earth instead of the geocenter gives slightly different results due to parallax.</p>

<p>Tanner's rendered images appear to be indexed by the difference between lunar and solar <a href="https://en.wikipedia.org/wiki/Ecliptic_coordinate_system" rel="noreferrer">ecliptic longitude</a>.
The sun-observer-target elongation angle <code>S-O-T</code> is a close approximation in most cases.
Where the <code>/r</code> column is <code>/T</code> for trailing, use that value directly.
Where <code>/r</code> is <code>/L</code> for leading, subtract <code>S-O-T</code> from 360&deg;.</p>

<p>A single cycle of Moon images cannot capture <a href="https://en.wikipedia.org/wiki/Libration" rel="noreferrer">libration</a> effects as the NASA SVS images do (see <a href="/a/33405">SpaceBread's answer</a>), so Tanner's images look a little different from the actual Moon.</p>

CC BY-SA 4.0
2019-09-18T03:43:58.903Z
`@Mike G` Awesome. I edited my answer in order to understand how to match these data to a set of images.
DevonDahon
CC BY-SA 4.0
2019-09-18T07:40:52.173Z
Actually, in this list of figures, which ones correspond to : New Moon, First Quarter, Full Moon, Last Quarter and New Moon ? That might help me solve my problem.
DevonDahon
CC BY-SA 4.0
2019-09-16T21:15:01.230Z
2019-09-18T06:11:00.153Z
2019-09-18T06:11:00.153Z
Mike G
<p>Where can I get a table with the Moon <strong>phase angle</strong> for each day ?</p>

<p>It's available  <a href="http://www.neoprogrammics.com/" rel="nofollow noreferrer">here</a> for a given day, but I would have to input each day of a year to get a full table. </p>

<p><strong>=== NEW EDIT : 2019-09-18 ===</strong></p>

<p>Actually, I'm preparing a calendar of lunar phase with corresponding Moon photo for each day and for a whole year. For this, I downloaded a set of images <a href="http://neoprogrammics.com/lunar_phase_images/" rel="nofollow noreferrer">here</a> from Jay Tanner's website. The name of these images correspond to the phase degree, but when I associate these images with the data from <a href="https://ssd.jpl.nasa.gov/horizons.cgi" rel="nofollow noreferrer">JPL HORIZONS</a> suggested by <code>@Mike G</code>, it doesn't match what I see in the Sky.</p>

<p>How can I associate a set of photo of Moon phases to each day of a given period of time (for instance, the current year) ?</p>

<moon-phases>
Get a table of Moon phase angle per day
DevonDahon
# Get a table of Moon phase angle per day

(Asked by: username_0 on 2019-09-16)

Where can I get a table with the Moon **phase angle** for each day ?

It's available [here](http://www.neoprogrammics.com/) for a given day, but I would have to input each day of a year to get a full table.

**=== NEW EDIT : 2019-09-18 ===**

Actually, I'm preparing a calendar of lunar phase with corresponding Moon photo for each day and for a whole year. For this, I downloaded a set of images [here](http://neoprogrammics.com/lunar_phase_images/) from Jay Tanner's website. The name of these images correspond to the phase degree, but when I associate these images with the data from [JPL HORIZONS](https://ssd.jpl.nasa.gov/horizons.cgi) suggested by `@username_2`, it doesn't match what I see in the Sky.

How can I associate a set of photo of Moon phases to each day of a given period of time (for instance, the current year) ?

**Tags:** moon-phases


---

## 3 answers

### Answer by username_2 on 2019-09-16. Score: 10 | Accepted answer

[JPL HORIZONS](https://ssd.jpl.nasa.gov/horizons.cgi) can do that.
With settings like these:

> Ephemeris Type : **OBSERVER**  
> Target Body : **Moon [Luna]** [301]  
> Observer Location : **Geocentric** [500]  
> Time Span : Start=**2019-09-12**, Stop=**2019-09-19**, Step=**1 d**  
> Table Settings : QUANTITIES=**10,23,24**

it returns results like these:

```
 Date__(UT)__HR:MN       Illu%    S-O-T /r    S-T-O
***************************************************
 2019-Sep-12 00:00      95.688 155.9731 /T  23.9640
 2019-Sep-13 00:00      98.620 166.4750 /T  13.4888
 2019-Sep-14 00:00      99.814 175.0444 /T   4.9422
 2019-Sep-15 00:00      99.231 169.9061 /L  10.0670
 2019-Sep-16 00:00      96.874 159.5743 /L  20.3723
 2019-Sep-17 00:00      92.791 148.7668 /L  31.1541
 2019-Sep-18 00:00      87.074 137.7510 /L  42.1469
 2019-Sep-19 00:00      79.858 126.5419 /L  53.3370

```

where `Illu%` is the illuminated fraction $k$, and `S-T-O` is the sun-target-observer phase angle $i$.
These quantities are related by
([Meeus](https://www.willbell.com/math/mc1.htm) 41.1)
$$ k = \frac{1 + \cos i}{2} $$

An observer location on the surface of the Earth instead of the geocenter gives slightly different results due to parallax.

Tanner's rendered images appear to be indexed by the difference between lunar and solar [ecliptic longitude](https://en.wikipedia.org/wiki/Ecliptic_coordinate_system).
The sun-observer-target elongation angle `S-O-T` is a close approximation in most cases.
Where the `/r` column is `/T` for trailing, use that value directly.
Where `/r` is `/L` for leading, subtract `S-O-T` from 360°.

A single cycle of Moon images cannot capture [libration](https://en.wikipedia.org/wiki/Libration) effects as the NASA SVS images do (see [SpaceBread's answer](/a/33405)), so Tanner's images look a little different from the actual Moon.

> **Comments:**
> **username_0**: `@username_2` Awesome. I edited my answer in order to understand how to match these data to a set of images.  
> **username_0**: Actually, in this list of figures, which ones correspond to : New Moon, First Quarter, Full Moon, Last Quarter and New Moon ? That might help me solve my problem.  

---

### Answer by username_1 on 2019-09-16. Score: 4

NASAs Scientific Visualization Studio has a [page](https://svs.gsfc.nasa.gov/4442) showing the Moon Phase and Libration over the course of each year. On the same page you can find a link to the data table including, among other things, the phase of the moon for each hour of the year in UT. You can download the table as a [TXT](https://svs.gsfc.nasa.gov/vis/a000000/a004400/a004442/mooninfo_2019.txt) and [JSON](https://svs.gsfc.nasa.gov/vis/a000000/a004400/a004442/mooninfo_2019.json) file.  
In case you only want a daily list and are using Linux you could than do something like:

```
cat mooninfo_2019.txt | grep "00:00 UT"  > mooninfo_2019_daily.txt

```

> **Comments:**
> **username_2**: The question has changed a bit.  

---

### Answer by username_0 on 2019-09-18. Score: 2

I finally fixed my issue by still using [Tanner's images](http://neoprogrammics.com/lunar_phase_images/) (named from 0 to 360), and by getting the phases from the [SunCalc](https://github.com/mourner/suncalc) library (which returns a number between 0 and 1). This way, I could easily associate images of a phase to a given date.

| SunCalc | Tanner | Phase |
| --- | --- | --- |
| 0 | 0 | New Moon |
|  |  | Waxing Crescent |
| 0.25 | 90 | First Quarter |
|  |  | Waxing Gibbous |
| 0.5 | 180 | Full Moon |
|  |  | Waning Gibbous |
| 0.75 | 270 | Last Quarter |
|  |  | Waning Crescent |
| 1 | 360 | New Moon |

Javascript method:

```
getMoonImageName (year, month, day) {
  var ill = SunCalc.getMoonIllumination(new Date(year, month-1, day))
  return Math.round(ill['phase'] * 360).toString().padStart(3, "0") + ".png";
}

```


---

