[ANN] EarthOrientation.jl

I proudly present EarthOrientation.jl.

Fetch the latest IERS tables:

using EarthOrientation
EarthOrientation.update()

Get the current Earth orientation parameters, e.g. for polar motion:

xp, yp = polarmotion(now()) # arcseconds

Or the current difference between UT1 and UTC and the associated prediction error:

ΔUT1 = getΔUT1(now()) # seconds
ΔUT1_err = getΔUT1_err(now()) # seconds

Available data

  • Polar motion:
    • x-coordinate of Earth’s north pole: getxp
    • y-coordinate of Earth’s north pole: getyp
    • both: polarmotion
  • Earth rotation
    • Difference between UT1 and UTC: getΔUT1
    • Excess length of day: getlod
  • Precession and nutation based on the 1980 IAU conventions
    • Correction to the nutation of the ecliptic: getdψ
    • Correction to the obliquity of the ecliptic: getdϵ
    • both: precession_nutation80
  • Precession and nutation based on the 2000 IAU conventions
    • Correction to the celestial pole’s x-coordinate: getdx
    • Correction to the celestial pole’s y-coordinate: getdy
    • both: precession_nutation00

There is an associated function that returns the prediction error for each data type, e.g. getxp_err.

23 Likes

I wonder how many times I’ve implemented small parts of this type of functionality (though never in Julia). The package looks far nicer! Thanks. I look forward to using this later this year.

1 Like

EarthOrientation.jl received a major upgrade: Release v0.4.0 · JuliaAstro/EarthOrientation.jl · GitHub

Better interpolation accuracy, faster (4x), and of course full Julia 1.0 compatibility :tada:

7 Likes

Hi @helgee!

First of all, thank you for this awesome package! I’m currently using it in some research, and was wondering if there is any recommended way to include a citation? Is there any DOI or some other reference that we could point to in our paper?

1 Like

Thanks for the shout-out! There is nothing to cite yet but I will set up a Zenodo DOI and let you know once it’s ready :+1:

1 Like
1 Like

I think the package’s API would be clearer without get prefix. Code is shorter and easier to read without it.

For example, compare

export getΔUT1, getΔUT1_TAI, getΔUT1_err, getlod, getlod_err

with

export ΔUT1, ΔUT1_TAI, ΔUT1_err, lod, lod_err
3 Likes

Great! Thanks!

1 Like

The API is due for an overhaul but there is also a reason that the get prefix is there.

The rationale was that I usually want to call one of the function and save the result to a local variable:

ΔUT1 = getΔUT1(jd)

If the name of the function is the same as the thing it’s returning, the caller needs to come up with a new name for it which I wanted to avoid.

What I tend to do nowadays is to give the function the full name of the thing it’s returning so that the abbreviation remains available for local variables, e.g.

lengthofday(jd) = ...
lod = lengthofday(jd)
# or
diff_utc_ut1(jd) = ...
ΔUT1 = diff_utc_ut1(jd)