![UvA_logo](https://private-user-images.githubusercontent.com/8749733/306705113-ae75f07a-f24a-4a43-b9bb-c2613d3c8c9e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzNzAxOTIsIm5iZiI6MTcyNDM2OTg5MiwicGF0aCI6Ii84NzQ5NzMzLzMwNjcwNTExMy1hZTc1ZjA3YS1mMjRhLTRhNDMtYjliYi1jMjYxM2QzYzhjOWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjJUMjMzODEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTdmYTI5OGVhZGM3OGVkYWZhYTdlMGI2NDdkYTc0MDIzNzkyODFlNzYzZGIyNzI3M2FlZGE0NTNiZDA5YmFkMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.FzIZoymdD1fMKM8MAXvlWLn7MMijKSrv97Yajrgr5j8)
![VU_logo](https://private-user-images.githubusercontent.com/8749733/306705120-f4521512-3629-4472-8106-d311a53e70c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzNzAxOTIsIm5iZiI6MTcyNDM2OTg5MiwicGF0aCI6Ii84NzQ5NzMzLzMwNjcwNTEyMC1mNDUyMTUxMi0zNj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jNGE3ZmQyZjE1ZDFkYzcyZGIzMmYyOGQ0YjJmMmVmZmE0NDNmOWQ1ZmM2YmQ1NDNmNGQ3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.8XpmjqsGN3nUdBz9T-iQOAvvUQWOZUGbDFuYq4afI4Q)
This repository contains the files used for the Master Project at the Anton Pannekoek Institute & University of Amsterdam. The thesis of this repository and its findings can be found at the UvA Scriptie Bibliotheek.
Extreme objects in the universe have been found to be in multi-object systems like binaries. When one of these components is a black hole, these binaries can emit X-rays from its accretion disk and the area closer to and around the black hole called the corona. However, due to a still debated mechanism, variations in the X-rays from the accretion disk and the corona will lag behind each other. Recently, a new model has come out to describe these lags. Initially, the model was created in Python, and this project aimed to look into the viability of converting it to a compiled language like C++. The reasons are quicker run time and the ability to run in a standardized fitting program, XSPEC. The latter, however, was not investigated in this thesis. While most of the functions part of this Python lag model could be easily converted with little to no changes, the calculations concerning the illumination fractions could be overhauled entirely by separating the radial dependent and independent calculations. The overhaul caused a speedup of this calculation of around 40-70% depending on the grid size of the geometry used. This speedup is equal to a speedup of several seconds on a function that takes several seconds. To test the converted functions, the C++ version and Python version of the model were fitted to XMM Newton data from GX 339-4 and NICER data from MAXI J1820+070. Both versions of the model fitted the data with similar results and fit quality. In conclusion, the conversion does speed up the model run time but less than one might expect. As such, it remains a question whether it is worth converting the model for use in the standardized fitting program or just implementing the improvements to the Python version.
This repository contains the following:
- All the images and figures used for the thesis as well as the thesis versions.
- A test for the creation of a pybind module as well as trying out XSPEC in
test/
&pymodule/
- The flowcharts of all the functions in the model in
flowcharts/
. - The original model as well as some of the fitting notebooks in
mono_lags/
- The converted model to C++ in
C++/
In this directory all the files related to the original model and fitting this model that were acquired. This also includes two datasets from GX 339-4 (Uttley et. al. 2011) & MAXI J1820+070 (Wang et. al. 2021; Bollemeijer et. al. 2024) to check if the converted model and the original model would get similar results (proving the conversion worked). It uses modules like Numpy, Scipy.
In this C++ directory all the files related to the converted model as well as the C++ side of testing. It converted the model that is located in mono_lags/
. For sharing values between the versions it uses nlohmann/json and for the fast fourier transform mreineck/pocketfft.