The SKIRT project
advanced radiative transfer for astrophysics
Functions
pts.visual.plotscalarcuts Namespace Reference

Plot planar cuts or projections for a scalar quantity from a SKIRT simulation. More...

Functions

def _reduce (path)
 
def _related (path1, path2)
 
def plotScalarCuts (simulation, probeTypes, decades=5, *outDirPath=None, outFileName=None, outFilePath=None, figSize=None, interactive=None)
 This function creates plots of the planar cuts or projections for a scalar quantity produced by one of the relevant probes in a SKIRT simulation. More...
 

Detailed Description

Plot planar cuts or projections for a scalar quantity from a SKIRT simulation.

The function in this module creates plots of the planar cuts or projections for a scalar quantity produced by one of the relevant probes in a SKIRT simulation.

Function Documentation

◆ plotScalarCuts()

def pts.visual.plotscalarcuts.plotScalarCuts (   simulation,
  probeTypes,
  decades = 5,
outDirPath = None,
  outFileName = None,
  outFilePath = None,
  figSize = None,
  interactive = None 
)

This function creates plots of the planar cuts or projections for a scalar quantity produced by one of the relevant probes in a SKIRT simulation.

Specifically, the function accepts a single Simulation instance and it assumes that the simulation includes one or more instances of one or more of the probe types listed in probeTypes, with an associated probe form that produces a planar cut (DefaultCutsForm, PlanarCutsForm) or planar projection (ParallelProjectionForm, AllSkyProjectionForm). If this is not the case, the function does nothing.

For decades=0, the color scale is linear. For decades>0, the color scale is logarithmic with the given dynamic range in dex.

If the output for a given medium component or medium type (dust, gas, or electrons) includes two or three files with names that differ only by orientation labels ("_xy", "_xz", and/or "_yz"), the maps for these files are included in a single plot and share the same color scale.

By default, the figures are saved in the simulation output directory with a filename that includes the simulation prefix, the probe name, and the medium component or type indicator, and has the ".pdf" filename extension. This can be overridden with the out* arguments as described for the pts.utils.savePath() function. In interactive mode (see the pts.utils.interactive() function), the figures are not saved and are left open for display in notebooks.

The function takes the following arguments:

  • simulation: the Simulation instance for which to plot the vector quantity.
  • probeTypes: a sequence of strings with probe types (SKIRT class names) for which to plot the vector quantity.
  • decades: the dynamic range of a logarithmic color scale in dex, or zero for linear color scale; default is 5.
  • outDirPath: string or Pathlib.Path object that overrides the output directory.
  • outFileName: string or Pathlib.Path object that overrides the output file name.
  • outFilePath: string or Pathlib.Path object that overrides the output file path.
  • figSize: the horizontal and vertical size of the output figure in inch; default is 8*num-plots x 6 inch.
  • interactive: whether to leave figures open (True) or save them to file (False).