Plot planar cuts or projections for a vector quantity from a SKIRT simulation. More...
Functions | |
def | plotVectorCuts (simulation, probeTypes, binSize=(32, 32), *outDirPath=None, outFileName=None, outFilePath=None, figSize=(6, 6), interactive=None) |
This function creates plots of the planar cuts or projections for a vector quantity produced by one of the relevant probes in a SKIRT simulation. More... | |
Plot planar cuts or projections for a vector quantity from a SKIRT simulation.
The function in this module creates plots of the planar cuts or projections for a vector quantity produced by one of the relevant probes in a SKIRT simulation.
def pts.visual.plotvectorcuts.plotVectorCuts | ( | simulation, | |
probeTypes, | |||
binSize = (32,32) , |
|||
* | outDirPath = None , |
||
outFileName = None , |
|||
outFilePath = None , |
|||
figSize = (6,6) , |
|||
interactive = None |
|||
) |
This function creates plots of the planar cuts or projections for a vector 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.
The figure displays an arrow for each bin of Nx by Ny pixels. The bin size can be specified as an argument. The orientation and length of the arrow indicate respectively the direction and magnitude of the vector projected on the image plane and averaged over the bin. The color of the arrow scales with the vector component orthogonal to the image plane, also averaged over the bin. Vectors pointing away from the observer and are red-ish and vectors pointing towards the observer and are blue-ish.
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: