This program calculates the percentage chance that two astronomical objects are in a line-of-sight binary system, as opposed to a gravitationally bound system. This is done using a Monte Carlo simulation and knowledge of the local environment's population density. This example is applied to a set of red supergiant + OB binary systems in the galaxy of M31, but it can be applied to any two astronomical objects in an environment. For examples of this being used in practice, please see Neugent et al. (2020) and Neugent (2021).
When determining whether two objects (from now on, we will assume these are stars) that are spatially close to one another in the sky are gravitationally bound as opposed to simply line-of-sight systems, it is important to look at the surrounding stellar environment. If there are relatively few other stars in the region that could be line-of-sight companions, it is more likely that the binary system is gravitationally bound. To make this determination, the program does the following:
- Identifies a binary system.
- Draws a circle around the binary system.
- Identifies the population of secondary stars within the circle (in the example case, this would be the OB stars that are the secondary stars in the red supergiant + OB binary system).
- Randomly places the binary system at different places within the circle and determines the number of times it would be within a certain distance of the secondary stars, and thus a line-of-sight binary.
This answer will be different for the system in the field shown above (a relatively uncrowded region) compared to the field shown below (a crowded region), which is why a knowledge of the stellar population is necessary.
The only imported package is numpy
.
This code has been tested using python 3.7.3
and numpy 1.18.2
.
The only values that need to be changed are located in the main method. Here you can change:
- the number of Monte Carlo simulations that will be performed
- the distance (in arcseconds) between objects when used to determine if two objects are in a light-of-sight pairing
- the distance (in arcminutes) away from the object to define as the "local environment"
- the list of unknown binaries
- the list of known secondary stars in the surrounding environment.
Example csv files are provided as well. M31_binaries.csv
is the list of unknown binaries and M31_OBs.csv
is the list of secondary stars.
The code can then be run using python3 line_of_sight.py
The program outputs los_results.csv
that shows the percentage of times each object was close enough to a secondary object such that it would be classified as a line-of-sight binary.
The example below walks us through the process of applying the Monte Carlo simulation to red supergiant + OB binaries in the Local Group galaxy of M31.
The list of red supergiant binary systems comes from Neugent (2021). The initial list of field stars within M31 comes from the Local Group Galaxy Survey / Massey et al. (2006).
To select the OB stars from the Local Group Galaxy Survey, we can remove everything redder than an A0V using a (B-V) cutoff of (B-V) < 0.0. However, we must also consider interstellar reddening. From Massey et al. (2007) we get the reddening values E(B-V). The first number is the average reddening and the number in parenthesis is the range. For this project, we'll use the average. For M31, this is: 0.13 (0.06-0.25)
We'd also like to set a brightness criteria. Based on our observing setup, we won't detect any OB stars fainter than V = 21. Using these cuts, we find 26,762
OB stars in M31.
I've included the M31_binaries.csv
and M31_OBs.csv
files that contain the coordinates of the M31 red supergiant + OB binaries and known OB stars in M31, respectively (in decimal degree csv format). Running the line_of_sight.py
script with the following inputs outputs the los_results.csv
file.
Inputs:
- n_runs = 10000
- dist_LOS = 0.75 # arcseconds
- dist_survey = 5 # arcminutes
- unknown_binaries =
M31_binaries.csv
- secondaries =
M31_OBs.csv
The output is then los_results.csv
which shows the percentage of times each M31 red supergiant + OB binary was close enough to another OB star to be deemed a line-of-sight binary. On this run of the simulation, the highest percentage was 1.2%. So, it is very unlikely that any of these objects are line-of-sight binaries!