The SKIRT project
advanced radiative transfer for astrophysics
pts.visual.do.plot_sources Namespace Reference

Plot the luminosity of and packets launched by one or more SKIRT simulations. More...

Functions

"plot the luminosity of and packets launched by one or more SKIRT simulations" do ((str,"SKIRT simulation output directory") simDirPath,(str,"SKIRT simulation prefix") prefix="",(float,"smallest wavelength on the horizontal axis") wmin=0.1,(float,"largest wavelength on the horizontal axis") wmax=1000.,(str,"unit of the wavelength limits (any spectral unit)") unit="micron",(float,"number of decades to be plotted on the vertical axis") dex=5)

Detailed Description

Plot the luminosity of and packets launched by one or more SKIRT simulations.

This script creates plots of the behavior of the sources in a SKIRT simulations. Specifically, it plots the luminosity of and the number of photon packets launched by each source as a function of wavelength. Both curves are normalized so that their maximum value is equal to one. This allows a user to evaluate whether the photon packet distribution (as a function of wavelength) is appropriate for the source spectra.

The script requires that the simulation includes exactly one LuminosityProbe and exactly one LaunchedPacketsProbe. If this is not the case, the function does nothing.

The script takes the following arguments:

  • simDirPath (positional string argument): the path to the SKIRT simulation output directory, or "." for the current directory
  • prefix (string): the prefix of the simulation to handle; by default handles all simulations in the directory
  • wmin (float): smallest wavelength on the horizontal axis; default is 0.1
  • wmax (float): largest wavelength on the horizontal axis; default is 1000
  • unit (string): unit of the wavelength limits (any spectral unit); default is micron
  • dex (float): if specified, the number of decades to be plotted on the vertical axis; default is 5

In all cases, the plot file is placed next to the simulation output file(s) being handled. The filename starts with the simulation prefix and ends with "sources.pdf".