-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6818d4a
commit 2f61538
Showing
11 changed files
with
199 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Literate | ||
using Dates | ||
|
||
# TODO: Remove items from `SKIPFILE` as soon as they run on the latest stable | ||
ONLYSTATIC = [] | ||
EXAMPLE_DIRS = ["Tutorials",] | ||
SKIPFILE = [] | ||
|
||
function update_date(content) | ||
content = replace(content, "DATEOFTODAY" => Dates.DateTime(now())) | ||
return content | ||
end | ||
|
||
for edir in EXAMPLE_DIRS | ||
gen_dir = joinpath(@__DIR__, "src", edir, "gen") | ||
example_dir = joinpath(@__DIR__, "src", edir) | ||
for example in filter!(x -> endswith(x, ".jl"), readdir(example_dir)) | ||
if example in SKIPFILE | ||
continue | ||
end | ||
input = abspath(joinpath(example_dir, example)) | ||
script = Literate.script(input, gen_dir) | ||
code = strip(read(script, String)) | ||
mdpost(str) = replace(str, "@__CODE__" => code) | ||
Literate.markdown( | ||
input, gen_dir, | ||
preprocess=update_date, | ||
postprocess=mdpost, | ||
documenter=!(example in ONLYSTATIC) | ||
) | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# # [Loading IERS EOP data](@id tutorial_01_load) | ||
# _This example was generated on DATEOFTODAY._ | ||
|
||
# When working with frames associated with the Earth, it is imperative to incorporate | ||
# Earth Orientation Parameters (EOP) data. The EOP data are required for the accurate | ||
# construction of various Earth associated frames. | ||
|
||
# ### Creating compatible EOP file | ||
|
||
# To minimize dependencies on external sources, `IERSConventions` defines a | ||
# standardized format for EOP data. The expected format consists of a file with | ||
# the '.eop.dat' extension. This file should contain columns representing different | ||
# Earth orientation parameters. | ||
|
||
# In order to ensure that the provided EOP file adheres to this format, USNO standard files can | ||
# be processed using [`eop_generate_from_txt`](@ref) or [`eop_generate_from_csv`](@ref) | ||
# functions: | ||
|
||
using IERSConventions | ||
|
||
finals = download( | ||
"https://datacenter.iers.org/data/latestVersion/finals.all.iau2000.txt", | ||
"/tmp/finals2000A.txt" | ||
) | ||
filename = "/tmp/iau2000a" | ||
eop_generate_from_txt(iers2010a, finals, filename) | ||
|
||
# This will create a `iau2000a.eop.dat` file to be used later. | ||
|
||
# ### Loading EOP data | ||
|
||
# Once a EOP file compatible with the reader is avaliable, the data could be | ||
# loaded in the environment for usage of all the methods within `IERSConventions` using | ||
# the [`eop_load_data!`](@ref) method, as follows: | ||
|
||
eop_load_data!(iers2010a, filename * ".eop.dat") | ||
|
||
# It is possible to override the data, e.g. re-use this functions as many times as needed. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.