Skip to content

Making gravitational lensing for any back ground image with ray tracing.

License

Notifications You must be signed in to change notification settings

yukimyg/black-hole-image

Repository files navigation

Black Hole Image

Maintainability Codacy Badge Language grade: Python Contributor Covenant License: MIT Code style: black

Note: This project is not yet ready for production.

Overview

You can make gravitational lensing for any back ground image.

Description

Feature

Make images that is view of static observer near the Black Hole.
Able to set the following values.

  • Mass of Black Hole
  • Distance between the Observer and event horizon measured by Observer at the infinite point.

Then, calculate geodesic raytracing in Schwarzschild time-space every pixels. For it, used automatic parallelization with @jit of Numba.

Future feature

The following are not yet implemented.

  • redshift and blueshift (doppler, gravitational)
  • Set gass and dust around Black Hole. (Assume the existence of an accretion disk.)
  • Kerr time-space

Physical Explanation

comming soon...

Requirement

Useage

  1. Choose a image back ground of gravitational lensing.

  2. Set back ground image to ./inputs

  3. Set values at set_values.py
    The following arguments are required :

    • mass_bh : Mass of Blak Hole.
    • distance : Length between Event Horizon and Observer. It is measured from the infinite point.
    • image_width : Width of output image.(pixels)
    • image_height : Height of output image.(pixels)
    • input_name : Name of input image.
    • output_name : Name of output image.

    Then, you can use several included connstants. Check reference.

    Example

    from internal.datas import Const as const
    from internal.datas import Image as image
    
    
    mass_bh = 100 * const.mass_sun
    
    # rs : Schwarzschild radius
    rs = 2 * mass_bh * const.newtonian_g / const.c ** 2
    distance = 5 * rs
    
    image_width = image.uhd.width
    image_height = image.uhd.height
    
    input_name = "input.png"
    output_name = "output.png"
  4. Run the following command.

    python main.py
  5. Result image are outputted to ./outputs

Contribution

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Licence

This software is released under the MIT License, see LICENSE.

Author

Yuki Miyagi

About

Making gravitational lensing for any back ground image with ray tracing.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages