SideKicks
Documentation for SideKicks, a Julia package for analyzing the observed properties of stellar binaries containing a compact object, in order to perform parameter inference on the supernova mass loss and natal kick.
Package features
# TODO - RTW
Index
SideKicks.SideKicks
SideKicks.KickMCMC
SideKicks.ModVonMises
SideKicks.Observations
SideKicks.Priors
SideKicks.WrappedCauchy
SideKicks.RV_semiamplitude_K1
SideKicks.arbitraryEjectaBH
SideKicks.create_corner_plot
SideKicks.create_general_mcmc_model
SideKicks.create_simplified_mcmc_model
SideKicks.kepler_P_from_a
SideKicks.kepler_a_from_P
SideKicks.post_supernova_circular_orbit_P
SideKicks.post_supernova_circular_orbit_a
SideKicks.post_supernova_circular_orbit_vsys
SideKicks.post_supernova_general_orbit_parameters
SideKicks.relative_velocity
SideKicks.restrictedEjectaBH
SideKicks.SideKicks
— ModuleMain module for SideKicks.jl
– a analysis package for performing parameter inference on compact object stellar binaries.
SideKicks.KickMCMC
— Typemutable struct KickMCMC
KickMCMC contains the MCMC model and Observations structs, the Results dict, the chains that resulted from the MCMC, and the parameters that went into the sampler.
SideKicks.ModVonMises
— Typestruct ModVonMises{T1<:Real, T2<:Real} <: ContinuousUnivariateDistribution
This is just a wrapper on top of the VonMises distribution (as defined in Distributions.jl) to extend its domain. This is because the domain of VonMises is defined to be [μ-π, μ+π], and the angles we are concerned with range from [0,2π]
SideKicks.Observations
— Typemutable struct Observations
Observations contains the symbols, values, errors, and units of each observed parameter.
SideKicks.Priors
— Typemutable struct Priors
Priors contains the prior distribution of each of the desired parameters
SideKicks.WrappedCauchy
— Typestruct WrappedCauchy{T1<:Real, T2<:Real} <: ContinuousUnivariateDistribution
The WrappedCauchy distribution resembles the Cauchy distribution defined on the unit circle from 0 to 2π, with the endpoints wrapped back to each other.
SideKicks.RV_semiamplitude_K1
— MethodRV_semiamplitude_K1(;m1, m2, P, e, i)
Compute the amplitude of radial velocity variations given orbital parameters and masses
Arguments:
- m1: mass of observed star [g]
- m2: mass of companion [g]
- P: orbital period [s]
- e: orbital eccentricity [-]
- i: orbital inclination [rad]
Output:
- K1: amplitude of radial velocity variation of star 1 [cm/s]
SideKicks.arbitraryEjectaBH
— MethodarbitraryEjectaBH(m2_i, frac)
#TODO Description
Arguments:
#TODO
- m2_i:
- frac:
Output:
#TODO
SideKicks.create_corner_plot
— Methodcreate_corner_plot(results, plotting_props;
observations=nothing, fig=Figure(), supertitle=nothing,
fractions=[0.68,0.95,0.997], fraction_1D=0.68,
show_CIs=true, nbins=100, nbins_contour=20, rowcolgap=10,
xticklabelrotation=pi/4, labelfontsize=16, tickfontsize=10, supertitlefontsize=30)
Description Function to create corner plot for selected (sub-)set of parameters from the MCMC output.
Arguments:
- results: the extracted results hdf5 object from a previous MCMC run
- plotting_props: the plotting properties object containing which properties and ranges to plot
- observations: any observations that should be included in the plots for comparison
- fig: a figure, if needed
- supertitle: the title of the plot
- fractions: the area fraction to determine different colored regions
- fraction_1D: the area fraction to include in the confidence interval bounds
- show_CIs: whether to include confidence intervals
- nbins: number of bins, identical for all parameters
- nbins_contour: number of bins for the contour plots
- rowcolgap: spacing between the axes
- xticklabelrotation: rotating (in rad) of the x-axis tick labels
- labelfontsize: fontsize of the parameter labels
- tickfontsize: fontsize of the tick labels
- supertitlefontsize: fontsize of the title
Output:
- fig: the newly created figure
SideKicks.create_general_mcmc_model
— Methodcreate_general_mcmc_model(observations, observed_values, observed_errors)
Create a Turing model to perform an MCMC sampling of the pre-explosion and kick properties of a system, assuming pre-explosion eccentricity.
RTW does acos just work? Do I need to worry about domain/range issues?
Check velocities, the conversions are a bit funky
Arguments:
- observations: the parameters taken from observations [Vector{Symbol}]
- observed_values: the values of the parameters [Vector{Float64}]
- observed_errors: the errors of the observations [Vector{Float64}]
Output:
- kickmodel: A Turing model for sampling
SideKicks.create_simplified_mcmc_model
— Methodcreate_simplified_mcmc_model(observations, observed_values, observed_errors)
Description Create a Turing model to perform an MCMC sampling of the pre-explosion and kick properties of a system, assuming pre-explosion circularity.
RTW this is more simplistic than just using a circular model, it's also assuming you know the eccentricity and don't care about radial velocity etc.
Arguments:
- observations: the parameters taken from observations [Vector{Symbol}]
- observed_values: the values of the parameters [Vector{Float64}]
- observed_errors: the errors of the observations [Vector{Float64}]
Output:
- kickmodel: A Turing model for sampling
SideKicks.kepler_P_from_a
— Methodkepler_P_from_a(;m1, m2, a)
Obtain period from semimajor axis using Kepler's third law
Arguments:
- m1: mass of first companion [g]
- m2: mass of 2nd companion [g]
- a: semi-major axis of the orbit [cm]
Output:
- P: the orbital period [s]
SideKicks.kepler_a_from_P
— Methodkepler_a_from_P(;m1, m2, P)
Obtain semimajor axis from period using Kepler's third law
Arguments:
- m1: mass of first companion [g]
- m2: mass of 2nd companion [g]
- P: orbital period [s]
Output:
- a: semi-major axis of the orbit [cm]
SideKicks.post_supernova_circular_orbit_P
— Methodpost_supernova_circular_orbit_P(;m1_i, m2_i, P_i, m1_f=-1, m2_f, vkick=0, θ=0, ϕ=0, vimp=0)
Same as post_supernova_circular_orbit_a
, except that it receives the initial orbital period as input and returns the final orbital period and eccentricity.
Arguments:
- m1_i: pre-explosion mass of non-exploding component [g]
- m2_i: pre-explosion mass of exploding component [g]
- P_i: pre-explosion orbital period [d]
- m1_f: post-explosion mass of non-exploding component [g]
- m2_f: post-explosion mass of exploding component [g]
- vkick: kick velocity [cm/s]
- θ: polar kick angle (away from e_par) [rad]
- ϕ: azimuthal kick angle (off of e_perp) [rad]
- vimp: imparted kick velocity on companion [cm/s]
Output:
- P_f: post-explosion orbital period [d]
- e_f: post-explosion excentricity [-]
SideKicks.post_supernova_circular_orbit_a
— Methodpost_supernova_circular_orbit_a(;m1_i, m2_i, a_i, m1_f=-1.0, m2_f, vkick=0.0, θ=0.0, ϕ=0.0, vimp=0.0)
Compute post-kick properties for a circular pre-explosion orbit. Equivalent to Tauris et al. (1999): Monthly Notices of the Royal Astronomical Society, Volume 310, Issue 4, pp. 1165-1169.
Arguments:
- m1_i: pre-explosion mass of non-exploding component [g]
- m2_i: pre-explosion mass of exploding component [g]
- a_i: pre-explosion orbital separation [cm]
- m1_f: post-explosion mass of non-exploding component [g]
- m2_f: post-explosion mass of exploding component [g]
- vkick: kick velocity [cm/s]
- θ: polar kick angle (away from e_par) [rad]
- ϕ: azimuthal kick angle (off of e_perp) [rad]
- vimp: imparted kick velocity on companion [cm/s]
Output:
- a_f: post-explosion orbital separation [cm]
- e_f: post-explosion excentricity [-]
SideKicks.post_supernova_circular_orbit_vsys
— Methodpost_supernova_circular_orbit_vsys(;m1_i, m2_i, a_i, m1_f=-1, m2_f, vkick=0, θ=0, ϕ=0, vimp=0)
Compute post-kick systemic velocity for a circular orbit Tauris et al. (1999): Monthly Notices of the Royal Astronomical Society, Volume 310, Issue 4, pp. 1165-1169.
Arguments:
- m1_i: pre-explosion mass of non-exploding component [g]
- m2_i: pre-explosion mass of exploding component [g]
- a_i: pre-explosion orbital separation [cm]
- m1_f: post-explosion mass of non-exploding component [g]
- m2_f: post-explosion mass of exploding component [g]
- vkick: kick velocity [cm/s]
- θ: polar kick angle (away from e_par) [rad]
- ϕ: azimuthal kick angle (off of e_perp) [rad]
- vimp: imparted kick velocity on companion [cm/s]
Output:
- vsys_f: post-explosion systemic velocity [cm/s]
SideKicks.post_supernova_general_orbit_parameters
— Methodpost_supernova_general_orbit_parameters(;m1_i, m2_i, a_i, e_i=0, m1_f=-1, m2_f, vkick=0, θ=0, ϕ=0, vimp=0,
ν_i=0, Ω_i=0, ω_i=0, i_i=0)
Compute post-kick properties for a general pre-explosion orbit using equations from [Marchant, Willcox, Vigna-Gomez] TODO
Arguments:
- m1_i: pre-explosion mass of non-exploding component [g]
- m2_i: pre-explosion mass of exploding component [g]
- a_i: pre-explosion orbital separation [cm]
- e_i: pre-explosion orbital eccentricity [-]
- m1_f: post-explosion mass of non-exploding component [g]
- m2_f: post-explosion mass of exploding component [g]
- vkick: kick velocity [cm/s]
- θ: polar kick angle (away from e_par) [rad]
- ϕ: azimuthal kick angle (off of e_perp) [rad]
- vimp: imparted kick velocity on companion [cm/s]
- Initial orbital orientation angles:
- ν_i: true anomaly [rad]
- Ω_i: pre-explosion longitude of the ascending node [rad]
- ω_i: pre-explosion argument of periastron [rad]
- i_i: pre-explosion inclination [rad]
- a_f: post-explosion orbital separation [cm]
- e_f: post-explosion orbital eccentricity [-]
- Ω_f: post-explosion longitude of ascending node [rad]
- ω_f: post-explosion argument of periastron [rad]
- i_f: post-explosion inclination [rad]
- vCM_n: post-explosion systemic velocity, toward N [rad]
- vCM_w: post-explosion systemic velocity, toward W [rad]
- vCM_rad: post-explosion radial velocity, toward negative O [rad]
SideKicks.relative_velocity
— Methodrelative_velocity(;m1, m2, a)
Calculate the relative orbital velocity for a circular orbit.
Arguments:
- m1: mass of first companion [g]
- m2: mass of 2nd companion [g]
- a: semi-major axis of the orbit [cm]
Output:
- v_rel: the relative velocity [cm/s]
SideKicks.restrictedEjectaBH
— MethodrestrictedEjectaBH(m2_i, frac; Ma=10, Mb=15, max_frac=1.0, min_frac=0.1)
#TODO Description
Arguments:
#TODO
- m2_i:
- frac:
- Ma=10:
- Mb=15:
- max_frac=1.0:
- min_frac=0.1:
Output:
#TODO