2.8.1. Export a Snapshot
The Python helper dispatch.select.export2radmc3d() exports DISPATCH
snapshot data to RADMC-3D input files.
It supports two output modes:
regular Cartesian grids, corresponding to RADMC-3D
grid style 0oct-tree AMR grids, corresponding to RADMC-3D
grid style 1
Regular-grid export:
import dispatch
sn = dispatch.snapshot(iout=1, run='myrun', data='data')
dispatch.select.export2radmc3d(
sn,
path='radmc3d_regular',
mode='cartesian',
density='d',
velocity=('ux', 'uy', 'uz'))
Oct-tree export:
import dispatch
sn = dispatch.snapshot(iout=1, run='myrun', data='data')
dispatch.select.export2radmc3d(
sn,
path='radmc3d_octree',
mode='octree',
density='d',
velocity=('ux', 'uy', 'uz'))
Sink-centered local export:
import dispatch
sn = dispatch.snapshot(iout=1, run='myrun', data='data')
dispatch.select.export2radmc3d(
sn,
path='radmc3d_sink_zoom',
mode='octree',
sink=7,
levelmax=18,
npix=128,
density='d',
Tdust='Tdust',
velocity=None)
The exporter writes:
amr_grid.inpdust_density.binpoptionally
dust_temperature.bdatoptionally
gas_temperature.binpoptionally
gas_velocity.binp
If the snapshot exposes sn.units or sn.scaling, the exporter writes
physical values in RADMC-3D units:
length in cm
density in g cm^-3
velocity in cm s^-1
If no unit metadata is available, values are written in code units.
See also:
Options and Croppingfor the argument list and crop controlsChoosing levelmaxfor cost versus visual similarityBatch Conversionfor timing guidance andconcurrent.futuresusageValidationfor smoke-test usage and reference model paths