Skip to content

psheehan/pinball-rt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

198 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E2E tests codecov Documentation Status Try Me In Colab

Monte Carlo radiative transfer, at Warp speed!

pinball-rt is a modern Monte Carlo radiative transfer code, designed to run on GPUs and to leverage Machine Learning to accelerate the radiative transfer calculations.

Quickstart

Install pinball-rt with pip:

   pip install git+https://github.com/psheehan/pinball-rt.git

Then set up a model and run:

   from pinballrt.sources import BlackbodyStar
   from pinballrt.grids import UniformCartesianGrid
   from pinballrt.model import Model
   import astropy.units as u
   import numpy as np

   # Set up the star.
   star = BlackbodyStar()

   # Set up the grid.
   model = Model(grid=UniformCartesianGrid, grid_kwargs={"ncells":9, "dx":2.0*u.au})

   density = np.ones(model.grid.shape)*1.0e-16 * u.g / u.cm**3
   amax = np.ones(model.grid.shape) * u.cm
   amax[4,4,4] = 1. * u.micron

   model.add_density(density, "diana_wice.dst", amax=amax)
   model.add_sources(star)

   model.thermal_mc(nphotons=100000)

For more information, see the documentation at https://pinball-rt.readthedocs.io.

About

Pinball, but warp-speed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages