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

Plot polarization maps from SKIRT simulation output. More...

Functions

"plot polarization maps for the output of one or more SKIRT simulations" do ((str, "SKIRT simulation output directory") simDirPath,(str,"SKIRT simulation prefix") prefix="",(str,"type of plot: linmap, degmap, degavg, or cirmap") plot="linmap",(float,"wavelength of the frame to be plotted; 0 means all frames") wave=0,(int,"number of pixels in a bin, in both x and y directions") bin=7,(float,"number of decades to be included in the background intensity range (color bar)") dex=5)

Detailed Description

Plot polarization maps from SKIRT simulation output.

This script creates PDF polarization maps for the output of polarization-enabled SKIRT simulations that include instruments generating surface brightness frames or data cubes (_total.fits and *_stokes.fits files). Other simulations and instruments are silently ignored.

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.
  • plot (string): the type of plot to make (default is "linear"):
    • "linmap": a linear polarization map
    • "degmap": a linear polarization degree map
    • "degavg": the y-axis averaged linear polarization degree for all x pixels
    • "cirmap": a circular polarization map
  • wavelength: the wavelength in micron for which to create the plot, or zero to create a plot for each wavelength in the data cube.
  • bin: the number of pixels in each bin in both horizontal and vertical directions.
  • dex (float): the number of decades to be included in the background intensity range (color bar); default is 5.

In all cases, the plot files are placed next to the simulation output file(s) being handled. The file names include the simulation prefix, the instrument name, a wavelength indicator, and the ".pdf" filename extension.