GithubHelp home page GithubHelp logo

walker-xin / raytransfer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abhmodels/raytransfer

0.0 0.0 0.0 9.16 MB

General relativistic ray-tracing code and associated codes/scripts for generating FITS file for RELXILL_NK and NKBB

License: GNU General Public License v3.0

C++ 56.26% Python 7.32% Mathematica 36.42%

raytransfer's Introduction

RayTransfer

A general relativistic ray-tracing code for calculating the transfer functions in Non-Kerr metrics. This code can be used for generating the FITS file to be used with RELXILL_NK and NKBB models.

When using RayTransfer please cite the following:

  • Public Release of RELXILL_NK: A Relativistic Reflection Model for Testing Einstein's Gravity; A.B. Abdikamalov, D. Ayzenberg, C. Bambi, T. Dauser, J.A. Garcia, & S. Nampalliwar; Astrophys.J. 878 no.2, 91 (2019).
  • Testing the Kerr black hole hypothesis using X-ray reflection spectroscopy and a thin disk model with finite thickness; A.B. Abdikamalov, D. Ayzenberg, C. Bambi, T. Dauser, J.A. Garcia, S. Nampalliwar, A. Tripathi, & M. Zhou; Astrophys.J. 889 no.1, 80 (2020).

Usage

RUNNING WITH BUILT-IN JOHANNSEN METRIC

Only one non-zero deformation parameter possible

  1. Generate isco.dat file using isco.cpp. First must modify isco.cpp to use the deformation parameter and bounds you want.

  2. If not using alpha13 deformation parameter, modify main.cpp to use the deformation parameter you want.

  3. Generate jobs files using job.cpp. First must modify job.cpp to use the isco.dat file, deformation parameter, and accretion rate you want.

  4. Compile main.cpp using:
    g++ main.cpp -O3 -o photons4trf

  5. Make sure a folder named "photons" exists in the same directory.

  6. Modify Transfer.py to use the isco.dat file, deformation parameter, and accretion rate you want.

  7. Newly created FITS file will be called Trf.fits

  8. Support contact: [email protected]

Changing Metric

Only one non-zero deformation parameter possible.

  1. Using the Maple worksheet "CodeOptimization.mw" or the Mathematica notebook "CodeOptimization.nb", enter covariant metric components of new metric and run to generate optimized code segments. Replace optimized code segments in metric.cpp, diffeqs.cpp, and redshift.cpp as labeled in worksheet/notebook. Must also modify deformation parameter declarations and assignments in main.cpp and def.h. Note: the Maple worksheet generates a much more optimized code so it is preferred over the Mathematica notebook.

  2. Follow RUNNING WITH BUILT-IN JOHANNSEN METRIC above.

File description

Core ray-tracing code

  • main.cpp - Contains parameter assignments, primary loops of the code, search loops for redshift values, and outputs to file.
  • def.h - Contains include statements, function declarations, definitions of constants, and global variable declarations.
  • metric.cpp - Contains functions to get components of metric and metric derivatives.
  • findisco.cpp - Finds ISCO radius.
  • gauleg.cpp - Sets disk radial values sought after and eventually used in the FITS file.
  • rayprecise.cpp - Contains function with search loop for radial values. Also contains function to convert from polar to cartesian coordinates on the screen.
  • raytracing.cpp - Ray-tracing code.
  • diffeqs.cpp - Differential equations solved for by ray-tracing code.
  • redshift.cpp - Calculates redshift value at the end of the ray-trace.

Additional files

  • CodeOptimization.mw/CodeOptimization.nb - Maple/Mathematica scripts used to optimized code related to the metric.
  • OptimizeExpressionToC.m - Mathematica script used by CodeOptimization.nb
  • isco.cpp - Generates isco.dat file used in other files.
  • Transfer.py - Python script to create FITS file after ray-tracing code has finished.

raytransfer's People

Contributors

walker-xin avatar quasinormalguy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.