|
18 | 18 | omega = (72.6 ± 0.8)u"°", |
19 | 19 | ) |
20 | 20 | plot(orbit; label="") |
21 | | -scatter!([0], [0], c=:black, marker=:+, lab="SAO 136799A")</code></pre><img src="945a6411.svg" alt="Example block output"/><p>we can show the orbit in sky angles by providing the distance to the system</p><pre><code class="language-julia hljs">plot(orbit; label="", distance) |
22 | | -scatter!([0], [0], c=:black, marker=:+, lab="SAO 136799A")</code></pre><img src="d7b249d5.svg" alt="Example block output"/><h2 id="Calculating-ephemerides"><a class="docs-heading-anchor" href="#Calculating-ephemerides">Calculating ephemerides</a><a id="Calculating-ephemerides-1"></a><a class="docs-heading-anchor-permalink" href="#Calculating-ephemerides" title="Permalink"></a></h2><p>Using our above orbit, let's figure out the position of the secondary star on a specific date</p><pre><code class="language-julia hljs">using Dates |
| 21 | +scatter!([0], [0], c=:black, marker=:+, lab="SAO 136799A")</code></pre><img src="4a73e2ec.svg" alt="Example block output"/><p>we can show the orbit in sky angles by providing the distance to the system</p><pre><code class="language-julia hljs">plot(orbit; label="", distance) |
| 22 | +scatter!([0], [0], c=:black, marker=:+, lab="SAO 136799A")</code></pre><img src="a799ea5f.svg" alt="Example block output"/><h2 id="Calculating-ephemerides"><a class="docs-heading-anchor" href="#Calculating-ephemerides">Calculating ephemerides</a><a id="Calculating-ephemerides-1"></a><a class="docs-heading-anchor-permalink" href="#Calculating-ephemerides" title="Permalink"></a></h2><p>Using our above orbit, let's figure out the position of the secondary star on a specific date</p><pre><code class="language-julia hljs">using Dates |
23 | 23 |
|
24 | 24 | function year_as_decimal(date::DateTime) |
25 | 25 | year_start = DateTime(Dates.year(date), 1, 1) |
|
32 | 32 | time = year_as_decimal(obs_time)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">2022.1354447298327 yr</code></pre><pre><code class="language-julia hljs">pos = relative_position(orbit, time) |
33 | 33 | # convert to angles for plot |
34 | 34 | ra, dec, _ = @. pos / distance |> u"arcsecond" |
35 | | -scatter!([ra], [dec], lab="SAO 136799B")</code></pre><img src="e3375ca3.svg" alt="Example block output"/><h2 id="Getting-binary-parameters"><a class="docs-heading-anchor" href="#Getting-binary-parameters">Getting binary parameters</a><a id="Getting-binary-parameters-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-binary-parameters" title="Permalink"></a></h2><p>Continuing our above example, let's calculate the position angle and separation of the binary at the observing date above</p><pre><code class="language-julia hljs">using Orbits: position_angle, separation |
| 35 | +scatter!([ra], [dec], lab="SAO 136799B")</code></pre><img src="a3bcbd94.svg" alt="Example block output"/><h2 id="Getting-binary-parameters"><a class="docs-heading-anchor" href="#Getting-binary-parameters">Getting binary parameters</a><a id="Getting-binary-parameters-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-binary-parameters" title="Permalink"></a></h2><p>Continuing our above example, let's calculate the position angle and separation of the binary at the observing date above</p><pre><code class="language-julia hljs">using Orbits: position_angle, separation |
36 | 36 |
|
37 | 37 | pa = position_angle(orbit, time) |
38 | 38 | sep = separation(orbit, time) / distance |> u"arcsecond" |
39 | | -pa, sep</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(118.4 ± 1.5, 0.1646 ± 0.0016 ″)</code></pre><p>let's show that with a polar plot; keep in mind the polar plot has 0 degrees as the positive x-axis, but parallactic angles start at the axis with the north celestial pole, which is 90 degrees in the polar plot.</p><pre><code class="language-julia hljs">scatter([deg2rad(pa - 270)], [sep], proj=:polar, lab="SAO 136799B")</code></pre><img src="ced4547e.svg" alt="Example block output"/><h3 id="SkyCoords.jl"><a class="docs-heading-anchor" href="#SkyCoords.jl">SkyCoords.jl</a><a id="SkyCoords.jl-1"></a><a class="docs-heading-anchor-permalink" href="#SkyCoords.jl" title="Permalink"></a></h3><p>These ephemerides can be translated into <a href="http://juliaastro.org/SkyCoords.jl/stable/">SkyCoords</a> easily</p><pre><code class="language-julia hljs">using AstroAngles |
| 39 | +pa, sep</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(118.4 ± 1.5, 0.1646 ± 0.0016 ″)</code></pre><p>let's show that with a polar plot; keep in mind the polar plot has 0 degrees as the positive x-axis, but parallactic angles start at the axis with the north celestial pole, which is 90 degrees in the polar plot.</p><pre><code class="language-julia hljs">scatter([deg2rad(pa - 270)], [sep], proj=:polar, lab="SAO 136799B")</code></pre><img src="d264da47.svg" alt="Example block output"/><h3 id="SkyCoords.jl"><a class="docs-heading-anchor" href="#SkyCoords.jl">SkyCoords.jl</a><a id="SkyCoords.jl-1"></a><a class="docs-heading-anchor-permalink" href="#SkyCoords.jl" title="Permalink"></a></h3><p>These ephemerides can be translated into <a href="http://juliaastro.org/SkyCoords.jl/stable/">SkyCoords</a> easily</p><pre><code class="language-julia hljs">using AstroAngles |
40 | 40 | using SkyCoords |
41 | 41 |
|
42 | 42 | origin = ICRSCoords(dms"09 22 50.8563427", hms"-09 50 19.659199")</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">SkyCoords.ICRSCoords{Float64}(0.16372573177725708, -2.575790303986864)</code></pre><pre><code class="language-julia hljs">using Measurements: value |
43 | 43 |
|
44 | | -coord = offset(origin, value(sep), deg2rad(value(pa)))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">SkyCoords.ICRSCoords{Float64}(1.999785964591127, -0.5658019707093447)</code></pre><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>Tokovinin et al. (2015) "Speckle Interferometry at SOAR in 2014" (<a href="https://ui.adsabs.harvard.edu/abs/2015AJ....150...50T">ads</a>)</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../api/">API/Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.12.0 on <span class="colophon-date" title="Sunday 8 June 2025 04:29">Sunday 8 June 2025</span>. Using Julia version 1.11.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
| 44 | +coord = offset(origin, value(sep), deg2rad(value(pa)))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">SkyCoords.ICRSCoords{Float64}(1.999785964591127, -0.5658019707093447)</code></pre><section class="footnotes is-size-7"><ul><li class="footnote" id="footnote-1"><a class="tag is-link" href="#citeref-1">1</a>Tokovinin et al. (2015) "Speckle Interferometry at SOAR in 2014" (<a href="https://ui.adsabs.harvard.edu/abs/2015AJ....150...50T">ads</a>)</li></ul></section></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../api/">API/Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.12.0 on <span class="colophon-date" title="Sunday 8 June 2025 04:36">Sunday 8 June 2025</span>. Using Julia version 1.11.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
0 commit comments