Python astronomy tools for spectroscopic binary system
Project description
Spectroscopic Binary System
<<<<<<< HEAD
bdbc0484756e26107c7e0a5501acf98b3e95863a
Spectroscopic Binary System is a package intended to contain functionality and some common tools needed for performing astrophysics on spectroscopic binary stars with Python. It allows, among other things, to automatically measure the radial velocity of SB1 type systems and to find their orbital solution with BinaryStarSolver (https://github.com/NickMilsonPhysics/BinaryStarSolver)
Installation
To install spectroscopicbinarysystem with pip, run:
# mac / unix
pip install spectroscopicbinarysystem
# windows
py -m pip install spectroscopicbinarysystem
If you want to make sure none of your existing dependencies get upgraded, you can also do:
# mac / unix
pip install spectroscopicbinarysystem --no-deps
# windows
py -m pip install spectroscopicbinarysystem --no-deps
Usage/Examples
Download sample data (see /examples/alphadra directory) or from the STAROS database (https://alphadra.staros-projects.org/)
And run this code :
from spectroscopicbinarysystem import SpectroscopicBinarySystem
sbs = SpectroscopicBinarySystem(
object_name='hd123299',
spectra_path='./examples/alphadra/',
t0=2451441.804,
period_guess=51,
conf={
"LAMBDA_REF": 6562.82,
"LINE_FIT_MODEL": "voigt",
"LINE_FIT_WINDOW_WIDTH": 10,
"LINE_FIT_CONT_NORM_EXCLUDE_WIDTH": 1.5,
"LINE_FIT_FWHM": .5,
"RV_CORR_TYPE": "barycentric",
"SB_TYPE": 1
},
debug=True)
# plot result with matplotlib and save the results
sbs.plotRadialVelocityCurve(title="α Dra - HD123299 - Phased radial velocities",
subtitle=f"{sbs.getObservationCount()} observations collected from april 2022 to april 2023",
savefig=True)
# display result with plotly
sbs.plotlyRadialVelocityCurve(
title="α Dra - HD123299 - Phased radial velocities")
# plot 2d dynamic spectrum
sbs.plotSpec2DFlux(
title="α Dra - HD123299 - 2d dynamic spectrum",
subtitle=f"{sbs.getObservationCount()} observations collected from april 2022 to april 2023",
savefig=False
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for SpectroscopicBinarySystem-1.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20389e7ab5bb1ea9553625bdef1634398c8d69d8fa942c0b842a96f27d581656 |
|
MD5 | 09c5e395666a1553d08741980491dc9e |
|
BLAKE2b-256 | 37aad5ae3252ad626934841e96d9c29e60839aefef1b45e762fd09a6c5d3f353 |
Hashes for SpectroscopicBinarySystem-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee9889c1c32d87dd6b7a521bda7bab8004e135efd5a67565f553f0b4cd04bc90 |
|
MD5 | fe058f997e47cd74d805c72bfe3558a9 |
|
BLAKE2b-256 | 5288affe2fc16c038bee9fcb05e23468cdce08702d1cae1b9065a6a126e1fb22 |