# LEGWORK

LEGWORK is a python package that does the LEGWORK for you by evolving binaries, calculating gravitational-wave strains, computing signal-to-noise ratios for binary systems potentially observable with LISA and visualising the results

My co-authors (Katie Breivik and Selma de Mink) and I have officially released LEGWORK and you can now read the paper on the ArXiv! This package was dreamt up almost entirely independently by both me and Katie, and when we realised that we had the same idea we decided to work together to create this package!

Our motivation behind LEGWORK was to create a package that was completely open-source, since this would (1) allow seasoned experts to collaborate and suggest new features or improvements and (2) make it easier for newcomers to quickly understand how to make their own predictions. Another motivation was that, by introducing this package to the community, we could create a collaborative code to avoid individual mistakes. We found that many papers have slightly different pre-factors in their equations, which could lead to very different predictions, so we aim for LEGWORK to provide a central tool and reference for the community to use in order to avoid this confusion.

The installation of the package should be very simple. Just run

pip install legwork
and you're all set! If you have any installation issues you can check out the full instructions here.

LEGWORK can be used to evolve the orbits of binaries, calculating their gravitational-wave strains, compute their signal-to-noise ratios and visualise the results! I encourage you to check out all of the tutorials, demos and documentation here. Below I've included some plots that demonstrate the sorts of things you could make with LEGWORK. The plot on the left illustrates how eccentricity can affect the detectability of a binary - some eccentricity can be good for increasing your SNR, but too much can move the GW emission into an area of the sensitivity curve to which LISA is less sensitive! The plot on the right shows the horizon distance for circular binaries over different frequencies and eccentricities. For more information about these plots I encourage you to read the "Use Cases" section of the release paper, in which we discuss them in detail!

# Gravitational wave sources in our Galactic backyard

### Predictions for BHBH, BHNS and NSNS binaries detectable with LISA

We examine the population of LISA detectable BHBHs, BHNSs and NSNSs in the Milky Way for 20 different binary physics variations, using a new model for the Milky Way and large grid of population synthesis simulations

What happens when a grid of over 2 billion massive binaries, a new empirically-informed model for the Milky Way, a Python package for stellar-origin LISA sources and a group of astrophysicists walk into a bar? This paper!

Long long ago this paper started off as my senior thesis for college, supervised by Floor Broekgaarden and Selma de Mink. At the time I was quite pleased with it...but if you want to amuse yourself, go see how simple the thesis was by comparison (though I will say that I managed to accomplish all of the "future work" section, so there is that!). Then, just in the final days of college, the world erupted into chaos with a pandemic and so, given my previous experience with online classes, I decided to take a gap year before starting my PhD. Instead, I spent the last year working on this (and LEGWORK) and I'm so very excited to finally share it with everyone!

In this project we investigated the population of LISA detectable binary black holes (BHBHs), black hole neutron stars (BHNSs) and binary neutron stars (NSNSs) that reside in the Milky Way. Although similar studies have been done in the past, we made several improvements. We use an improved model for the Milky Way that accounts for the chemical enrichment history of the galaxy and the size of our simulations is far larger than those used by others, which reduces our sampling uncertainties. We also approached the problem with stellar evolution in mind and thus examined our results for 20 different model variations in order to see how things changed when we alter the underlying binary physics assumptions.

# COMPAS

COMPAS combines tools for statistical analysis and model selection with rapid population synthesis, allowing inferences to be made about the details of stellar and binary evolution with ease

COMPAS is an open-source, rapid binary population synthesis code that I help to develop. I was introduced to the COMPAS team by Selma de Mink whilst working on my Galactic DCO paper and took a deep-dive into the codebase in order to help improve COMPAS' handling of low-mass stars with Selma. I've also taken a detailed look at COMPAS' wind mass loss prescriptions and helped to clean them up as well as change the way COMPAS handles luminous blue variable wind mass loss by default.

We recently released a comprehensive methods paper that details how the code works and the science behind it. I really enjoyed helping to write this paper as it gave me a great opportunity to get a clear understanding of all of the underlying physics that goes into the code!

I focussed on the single star evolution and, in particular, made Figures 5-8 for the paper. For example, below I include Figure 5 from the paper, which shows a Hertzsprung-Russell diagram at two different metallicities, which I produced used COMPAS. You can see the approximate solutions that COMPAS uses in the Hertzsprung Gap for example (where the lines are completely straight), yet the general shape of the evolution matches what we expect from stellar evolution. In case you're interested in checking them out, the other figures show: the maximum radial extension of each stellar type, the main sequence lifetime for different metallicities and the initial-core-remnant mass relations for different metallicities and prescriptions.

If you're interested in learning more about how COMPAS works then I recommend that you read the methods paper, it is very detailed and has a convenient table of contents for you to hop around. And if you're less interested in how the code was designed, but instead want to know how to use it then check out the documentation!