You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/src/index.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,10 @@ An extensive error testing suite ensures old fixed bugs will not be brought back
8
8
9
9
## Installation
10
10
11
-
AstroLib is available for Julia 1.0 and later versions, and can be installed with [Julia](https://github.com/julialang/julia.jl)'s built-in package manager. In a Julia session run the command
11
+
AstroLib is available for Julia 1.0 and later versions, and can be installed with [Julia](https://github.com/julialang/julia.jl)'s built-in package manager. In a Julia session run the commands
12
12
13
-
```julia
13
+
```julia-repl
14
+
julia> import Pkg
14
15
julia> Pkg.update()
15
16
julia> Pkg.add("AstroLib")
16
17
```
@@ -19,7 +20,7 @@ Older versions are also available for Julia 0.4-0.6.
19
20
20
21
Note that, in order to work, a few functions require external files, which are automatically downloaded when building the package. Should these files be missing for some reason, you will be able to load the package but some functions may not work properly. You can manually build the package with
21
22
22
-
```julia
23
+
```julia-repl
23
24
julia> Pkg.build("AstroLib")
24
25
```
25
26
@@ -33,11 +34,11 @@ using AstroLib
33
34
34
35
Many functions in `AstroLib.jl` are compatible with [Measurements.jl](https://github.com/giordano/Measurements.jl) package, which allows you to define quantities with uncertainty and propagate the error when performing calculations according to [propagation of uncertainty rules](https://en.wikipedia.org/wiki/Propagation_of_uncertainty). For example:
35
36
36
-
```julia
37
+
```jldoctest
37
38
julia> using AstroLib, Measurements
38
39
39
40
julia> mag2flux(12.54 ± 0.03)
40
-
3.499451670283562e-14±9.669342299577655e-16
41
+
3.499e-14 ± 9.7e-16
41
42
```
42
43
43
44
## How Can I Help?
@@ -56,19 +57,19 @@ This project is a work-in-progress, only few procedures have been translated so
56
57
57
58
Every function provided has detailed documentation that can be [accessed](http://docs.julialang.org/en/stable/manual/documentation/#accessing-documentation) at Julia REPL with
58
59
59
-
```julia
60
+
```julia-repl
60
61
julia> ?FunctionName
61
62
```
62
63
63
64
or with
64
65
65
-
```julia
66
+
```julia-repl
66
67
julia> @doc FunctionName
67
68
```
68
69
69
70
## Related Projects
70
71
71
-
This is not the only effort to bundle astronomical functions written in Julia language. Other packages useful for more specific purposes are available at [JuliaAstro](https://juliaastro.github.io/). A list of other packages is available [here](https://github.com/svaksha/Julia.jl/blob/master/Astronomy.md).
72
+
This is not the only effort to bundle astronomical functions written in Julia language. Other packages useful for more specific purposes are available at [JuliaAstro](https://juliaastro.github.io/).
72
73
73
74
Because of this, some of IDL AstroLib’s utilities are not provided in `AstroLib.jl` as they are already present in other Julia packages. Here is a list of such utilities:
Copy file name to clipboardexpand all lines: docs/src/ref.md
+94-87
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
+
```@meta
2
+
DocTestSetup = :(using AstroLib)
3
+
```
1
4
# Reference
2
5
3
6
## Data types
4
7
5
8
### Observatory
6
9
7
-
`AstroLib.jl` defines a new `Observatory` type. This can be used to define a new object holding information about an observing site. It is a [composite type] whose fields are
10
+
`AstroLib.jl` defines a new `Observatory` type. This can be used to define a new object holding information about an observing site. It is a [composite type](https://docs.julialang.org/en/v1/manual/types/#Composite-Types) whose fields are
8
11
9
12
-`name` (`String` type): the name of the site
10
13
-`latitude` (`Float64` type): North-ward latitude of the site in degrees
@@ -22,7 +25,7 @@ Observatory(name, lat, long, alt, tz)
22
25
23
26
A predefined list of some observing sites is provided with `AstroLib.observatories` constant. It is a dictionary whose keys are the abbreviated names of the observatories. For example, you can access information of the European Southern Observatory with
The list of Solar System planets, from Mercury to Pluto, is available with `AstroLib.planets` dictionary. The keys of this dictionary are the lowercase names of the planets. For example:
0 commit comments