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

Plot a spatial grid wireframe produced by SKIRT. More...

Functions

def _createFigure (saveFilePath, lineWidth, figSize)
 
def _plotGrid2D (gridFilePath, saveFilePath, lineWidth, figSize)
 
def _plotGrid3D (gridFilePath, saveFilePath, lineWidth, figSize)
 
def plotGrids (simulation, *lineWidth=0.1, outDirPath=None, figSize=(8, 8))
 This function creates a wireframe plot for one or more text files generated by SKIRT's SpatialGridPlotProbe class. More...
 

Detailed Description

Plot a spatial grid wireframe produced by SKIRT.

The function in this module creates a PDF plot from a sequence of grid coordinates provided as a text file in the format generated by SKIRT's SpatialGridPlotProbe class. The function directly creates a PDF file through the reportlab module, without using matplotlib.

Function Documentation

◆ plotGrids()

def pts.visual.plotgrids.plotGrids (   simulation,
lineWidth = 0.1,
  outDirPath = None,
  figSize = (8, 8) 
)

This function creates a wireframe plot for one or more text files generated by SKIRT's SpatialGridPlotProbe class.

The function accepts a sequence of Simulation and/or Probe instances (or a single instance of either of these types), and creates a plot file in PDF format for each "*_grid_NN.dat" file produced by any of these simulations/probes. The plot files have the same name as the corresponding input file, and with a ".pdf" filename extension. By default the plot files are placed next to the corresponding input file in the same directory, but another output directory can be specified if needed.

There are two format variations for 2D and 3D information, respectively. The 2D format describes the intersection of a dust grid structure with one of the coordinate planes. The 3D format fully describes all or part of the dust cells in the grid. Each line in the file contains two (2D) or three (3D) coordinates seperated by whitespace, or is empty. Consecutive nonempty lines represent a sequence of "lineto" commands; an empty line marks a "moveto" command.