Skip to content

Instantly share code, notes, and snippets.

@sefffal
sefffal / parallactic.jl
Created February 9, 2023 23:24
Parallactic angle calculation and plot in Julia
using AstroLib, AstroAngles, Dates
"""
Given a source position in RA and DEC, a time in Julian days, and an observatory,
return the parallactic angle of the target.
You can also pass optional keyword arguments that are forwarded to `eq2hor` to
adjust assumptions around refraction correction, temperature, nutation, etc.
"""
function postime2pa(ra_deg, dec_deg, time_jd, observatory; kwargs...)
@sefffal
sefffal / Project.toml
Last active February 9, 2023 23:24
Plot planets from the NASA exoplanet archive in Julia
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
[compat]
CSV="0.10.9"
DataFrames="1.4.4"
GLMakie="0.8.2"
@sefffal
sefffal / SNROptConvex.jl
Created March 18, 2021 20:06
Main optimization step of direct SNR optimization
using Convex
using COSMO
using LinearAlgebra
"""
INPUT:
- Matrix containing the flattened subtraction region of all the images
@sefffal
sefffal / implot-bg-example.jl
Created August 30, 2020 03:04
CImGUI and ImPlots on background thread
# Start Julia 1.5 with more than 1 threads.
# Then run `] add ImPlot CImGui` to install deps.
using CImGui
using CImGui.CSyntax
using CImGui.CSyntax.CStatic
using CImGui.GLFWBackend
using CImGui.OpenGLBackend
using CImGui.GLFWBackend.GLFW
using CImGui.OpenGLBackend.ModernGL