Skip to content

Instantly share code, notes, and snippets.

Avatar

Elizabeth Lincoln ellielinc

View GitHub Profile
@ellielinc
ellielinc / Errorbars.jl
Last active Nov 29, 2018
Uses multiple gridsearches to minimize the chi square of the best-fit diameter and limb darkening coefficient of a star with the linear visibililty function and generates errorbars for the best-fit parameters by calculating the probability density of those parameters.
View Errorbars.jl
function errorbar_LDlin_prob(data::OIdata,
dataname="", diam_min=1.0, diam_max=9.0, LD_min=0.01, LD_max=0.9, iter=200)
chisq=param->norm((abs2.(visibility_ldlin(param,data.v2_baseline))-data.v2)./data.v2_err).^2;
###taken from bic.jl in numericalmethods
function logsumexp(X)
# Compute log(sum(exp(X))) while avoiding numerical over/underflow.
return log(sum(exp.(X-maximum(X))))+maximum(X)
end
@ellielinc
ellielinc / ControlData.jl
Last active Nov 28, 2018
Generates temperature maps with manually chosen temperatures, sizes, and positions of star spots then writes the artificially observed flux and phase data into a file. Written for Julia 0.6.4. Repository ROTIR.jl by Fabien Baron has been updated for Julia 1.0.1 and will no longer be compatible with this script.
View ControlData.jl
#Generate fake light-curve
include("lci.jl");
include("lciplot.jl");
include("geometry.jl");
include("oiplot.jl");
include("oistars.jl");
using PyPlot
using PyCall
using ROTIR.jl