This directory contains IDL code to calculate the phase of the moon.
This IDL code is used for my paper, Kawamura+(2016, http://adsabs.harvard.edu/abs/2016PASJ..tmp...83K)
This code is relied on the IDL Astronomy User's Library of NASA (https://idlastro.gsfc.nasa.gov/) which is based on Meeus, J. (1998, http://adsabs.harvard.edu/abs/2016PASJ..tmp...83K)
For any publication with the usage of this IDL code, refering to Kawamura+(2016) as well as The IDL Astronomy User's Library of NASA and Meeus, J. (1998) is highly appreciated.
- Go to the IDL Astronomy User's Library of NASA (https://idlastro.gsfc.nasa.gov/) and clone the codes to your directory.
- Clone the codes under this directory to where the codes from step 1 is available.
- IN IDL run the code as
moonage, jdlist, phases
, wherejdlist
is 1D array of float/double of Julian days of your interest andphases
stores the returned values of normalized phase of the moon (0.0=new moon, 1.0=next new moon).
With a csv file of listed Julian days, "example.csv", calculate the normalized phase of the moon and save to "result.csv".
IDL> jdcsv = read_csv('example.csv", TYPES="DOUBLE")
IDL> moonage, jdcsv.FIELD1, phases
IDL> write_csv, 'result.csv', phases