示例#1
0
from mcrt3d.grid import CartesianGrid
from mcrt3d.dust import Dust
from mcrt3d.sources import Star
from mcrt3d.camera import Image, Spectrum
from mcrt3d.constants.astronomy import M_sun, R_sun, AU
from mcrt3d.constants.physics import c
from numpy import array, arange, pi, zeros, logspace
from time import time

# Create a model class.

model = MCRT()

# Set up the dust.

dust = Dust(filename="dustkappa_yso.inp", radmc3d=True)

# Set up the star.

star = Star(0.0, 0.0, 0.0, M_sun, R_sun, 4000.0)
star.set_blackbody_spectrum(dust.nu)

# Set up the grid.

nx = 10
ny = 10
nz = 10

x = (arange(nx) - (float(nx) - 1) / 2) * AU / 1
y = (arange(ny) - (float(ny) - 1) / 2) * AU / 1
z = (arange(nz) - (float(nz) - 1) / 2) * AU / 1
示例#2
0
        dpc=1, code="radmc3d", camera_scatsrc_allfreq=True, \
        verbose=False)

################################################################################
#
# Run the model with MCRT3D
#
################################################################################

# Create a model class.

model = MCRT()

# Set up the dust.

dust = Dust(filename="../examples/dustkappa_yso.inp", radmc3d=True)

# Set up the star.

star = Star(0.0, 0.0, 0.0, M_sun, R_sun, 4000.0)
star.set_blackbody_spectrum(dust.nu)

# Set up the grid.

nx = 10
ny = 10
nz = 10

x = (arange(nx) - (float(nx) - 1) / 2) * AU / 1
y = (arange(ny) - (float(ny) - 1) / 2) * AU / 1
z = (arange(nz) - (float(nz) - 1) / 2) * AU / 1