compass

COMPASS: Companion Proper Motion Analysis Software System

https://github.com/herzphi/compass

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

exoplanets
Last synced: 8 months ago · JSON representation ·

Repository

COMPASS: Companion Proper Motion Analysis Software System

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • Open Issues: 2
  • Releases: 0
Topics
exoplanets
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Code of conduct Citation

README.md

Image

compass

Companion Proper Motion Analysis Software System

Installation

You can install the package by installing this repository:

bash pip install git+https://github.com/herzphi/compass.git

Usage

The candidates which you want to evaluate need to be prepared in the following format:

Candidates Table

| column name | unit | | ----------- | ----------- | | MainID | host star ID accessable by Simbad | | date | Gregorian date | | dRA | mas | | dRAerr | mas | | dDEC | mas | | dDECerr | mas | | dRAdDECcorr | Correlation coefficient | | magnitudescolumnname | mag | | finaluuid | ID used to link observations of the same candidate |

An example table of a single candidate with the identifier to10 can look like: |finaluuid|MainID|date|dRA|dDEC|dRAerr|dDECerr|dRAdDECcorr|mag0|mag0err| | - | - | - | - | - | - | - | - | - | - | |to10|HIP82545|2017-05-05|-1625.0|1897.0|6|6|0|17|1 |to10|HIP82545|2018-05-05|-1624.4|1891.8|6|6|0|17|1 |to10|HIP82545|2019-05-05|-1631.4|1891.4|6|6|0|17|1 |to10|HIP82545|2020-05-05|-1606.7|1893.1|6|6|0|17|1

Analysis

  1. Using the prepared candidates table as mentioned a step prior, you can read the observational data.
  2. Initialize the models by calling the Survey class and passing the observation data and the name of the magnitudes column.
  3. Build the fieldstar models by defining which filter was used by the survey. Currently the supported filters are the K-, H- and J-band.
    • magnitudescolumnnameCALC = 'ksm_calc'
    • magnitudescolumnname2MASS has to be a 2MASS column: ksm, jm or hm.
    • cone_radius: Radius in degree of the queried cone of field stars the model is build upon.
    • binsize: Number of objects in a single magnitude bin.
  4. Evaluate the fieldstar models with the candidates position measurements.
    • sigmaccmin: Set a $\sigma_{min}$ for the Gaussian distribution of the candidate.
    • sigmamodelmin: Set a $\sigma_{min}$ for the Gaussian distribution of the model for the candidates magnitude.

```python import pandas as pd from compass import model from compass import helperfunctions

observation = pd.read_csv('observation.csv')

surveyobject = model.Survey(observation, magnitudescolumnname) surveyobject.setfieldstarmodels( # Color transformed column name from Gaias G-Band. magnitudescolumnnameCALC, # Column name of the corresponding magnitude in 2MASS. magnitudescolumnname2MASS, cone_radius = 0.3, # in degree binsize = 200 )

Inflating parameters to adjust the sharp dropoff of the Gaussians.

surveyobject.setevaluatedfieldstarmodels( sigmaccmin = 0, sigmamodelmin = 0 ) Return a pandas DataFrame containing the results by determining the `threshold` of an odds ratio by which a candidate is acccepted as true companion: python surveyobject.gettrue_companions(threshold=0) ```

Visualization

The package contains a module preset_plots, which contains a couple of intereseting plots like: ```python import pandas as pd from compass import model, preset_plots

dftest = pd.DataFrame({ 'MainID': ['HIP82545', 'HIP82545', 'HIP82545'], 'finaluuid':['id0', 'id0', 'id0'], 'date': ['2016-04-24', '2018-04-24', '2021-06-04'], 'dRA': [-1390, -1386, -1394], 'dRAerr': [5,5,5], 'dDEC': [-990, -989, -995], 'dDECerr': [5, 5, 5], 'mag0':[16,16,16], 'mag0err':[1,1,1] })

surveyobject = model.Survey(dftest, "mag0") surveyobject.setfieldstarmodels("ksmcalc", "ksm", coneradius=0.1, binsize=50) surveyobject.setevaluatedfieldstarmodels(sigmaccmin=0, sigmamodel_min=0)

presetplots.pratioplot( surveyobject.fieldstarmodelHIP82545.candidatesobjects[0], 'HIP82545', 'band' ) ``` <img src="plotsexample/p_ratio.png" alt="Image" width="500">

Another preset plot is a visualization of the proper motion and parallax covariance model. The method p_ratio_relative_position takes the pandas.DataFrame of a single candidate. In this example it uses df_test from above which is already implemented in the Survey class object. python preset_plots.p_ratio_relative_position( survey_object.fieldstar_model_HIP82545.candidates, 'HIP82545' ) Image

This plot shows the relative position of a candidate to the host star. The symbols change with each epoch of observation. The colors show the different models: - Black shows the candidate in the background model. - Blue shows the candidate in the true companion model (Assuming a true companion has not relative motion to the host star). - Yellow shows the position measurements of the candidate. The curves on the axes show the integrated two dimenionsal gaussian distributions of each epoch, model and position measurement. The covariances between different epochs of observation are not shown in this plot, but they are considered in the calculation for the logarithmic odds ratio (given in the header).

Image

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

BSD 3-Clause License

Copyright (c) 2022, Max Planck Institute for Astronomy All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Owner

  • Login: herzphi
  • Kind: user
  • Location: Germany

Citation (CITATION.cff)

cff-version: 1.2.0
title: compass
message: If you use this software, please cite as below.
date-released: 2023-05-30
url: 'https://github.com/herzphi/compass'
version: 0.0.1
type: software
authors:
  - family-names: Herz
    given-names: Philipp
    email: herzphilipp@outlook.com
    affiliation: MPIA
    orcid: 'https://orcid.org/0000-0003-1665-2073'

# For citing software, see:

# http://journals.aas.org/authors/references.html

# GitHub has Zenodo DOI integration:
# https://guides.github.com/activities/citable-code/

# What is a CITATION.cff file: 
# https://citation-file-format.github.io/

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

GitHub Events

Total
  • Issues event: 1
Last Year
  • Issues event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 103
  • Total Committers: 2
  • Avg Commits per committer: 51.5
  • Development Distribution Score (DDS): 0.039
Past Year
  • Commits: 103
  • Committers: 2
  • Avg Commits per committer: 51.5
  • Development Distribution Score (DDS): 0.039
Top Committers
Name Email Commits
herzphi p****z@c****t 99
herzphi 1****i 4
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 4
  • Total pull requests: 1
  • Average time to close issues: 1 day
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 1
  • Average time to close issues: 1 day
  • Average time to close pull requests: less than a minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • herzphi (4)
Pull Request Authors
  • herzphi (1)
Top Labels
Issue Labels
bug (2) invalid (1) question (1) enhancement (1) documentation (1)
Pull Request Labels