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.