Do you speak Python ? See here how to use the data at home

All data is publicly accessible, without the need for a user account. You can download and play with them on your computer.

We will describe below an example of using the data step by step.

For this example, we will use the totality of the data of the base at this date to analyze them in the Python module developed recently by Guillaume Bertrand which makes it possible to determine the period of the couple of Spectroscopic Binary which interests us here. This module is available at this address : https://pypi.org/project/SpectroscopicBinarySystem/

First, let's download all the data from the database via the Download function of the All Datas tab on the Database page.

...

Now that we have all the data, let's put them in a datas folder.

Python

It is of course necessary to have Python on your machine, and we will have to install the Python module mentioned above with the utility you know well: pip


# mac / unix
pip install spectroscopicbinarysystem

# windows
py -m pip install spectroscopicbinarysystem
                                

Code

Now we have all the necessary tools, let's create our own script at the same level as our datas folder, call it main.py

In the latter, we will now use the SpectroscopicBinarySystem module to analyze our data. We just have to call the right class and pass it the path of our data


from spectroscopicbinarysystem import SpectroscopicBinarySystem

# create SpectroscopicBinarySystem object
sbs = SpectroscopicBinarySystem(
    object_name='hd123299',
    spectra_path='./datas/',
    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)
                                  


Depending on the method we call, we can display the graph of determination of the period as the exemple below, or display the 2D plot of the flux of the Halpha line


# 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)
                                  
Loading...

Plot result

The above graph is based on data as of April 30, 2023. The module also allows you to display the 2D Flux like on the documentation, it's up to you !