Welcome to compass’s documentation!
The code described by this documentation is available on https://github.com/herzphi/compass. This package presents a method to evaluate the likelihood of a candidate being a true companion to a host star using a proper motion model based on stochastic models.
Usage
Installation
You can install compass by installing this repo:
pip install git+https://github.com/herzphi/compass.git
Code
To get the odds ratios of all candidates use the Survey
class:
import pandas as pd
from compass import model
from compass import helperfunctions
observation = pd.read_csv('observation.csv')
survey_object = model.Survey(observation, magnitudes_column_name)
survey_object.set_fieldstar_models(
# Color transformed column name from Gaias G-Band.
magnitudes_column_name_CALC,
# Column name of the corresponding magnitude in 2MASS.
magnitudes_column_name_2MASS,
cone_radius=0.3, # in degree
binsize=200 # Number of objects in a single magnitude bin
)
# Inflating parameters to adjust the sharp drop-off of the Gaussians.
survey_object.set_evaluated_fieldstar_models(
sigma_cc_min=0,
sigma_model_min=0
)
Indices and tables
compass.model Module
Classes
|
|
|
Model, true data and likelihoods, p_ratios of one candidate. |
|
Host star of the candidates. |
|
Creates odds ratio table based on the observational data of candidates and the field star models. |
compass.helperfunctions Module
Functions
|
Adds a patch to a figure. |
|
Adds a patch to a figure. |
|
|
|
|
|
|
|
|
|
Convert dataframe to two 1D arrays. |
|
Returns a Gaussian2D functions and its covariance matrix of the convolution from the two Gaussian2D. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Calculates the eigenvalues/eigenvectors of the covariance matrix and returns the major and minor axis length of the ellipse. Args: cov (numpy.array (2x2)): Covariance matrix. confidence (float): Probability between 0 and 1. Returns: major_axis (float): Semi-major axis. minor_axis (float): Semi-minor axis. angle (float): Angle of rotation of the ellipse. |
|
|
|
Calculate 2D Gaussian parameters based on two arrays. |
|
|
|
compass.preset_plots Module
Functions
|
Creates a odds ratio vs. |
|
|
|
|
|
|
|