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

Creating a movie that runs through all wavelengths in the SKIRT simulation output. More...

Functions

def makeWavelengthMovie (simulation, *maxPercentile=100, minPercentile=10, decades=None, renormalize=False, outDirPath=None, outFileName=None, outFilePath=None, rate=7)
 This function creates a movie for the output of the specified simulation. More...
 

Detailed Description

Creating a movie that runs through all wavelengths in the SKIRT simulation output.

The function in this module creates a movie for the output of a SKIRT simulation. The movie combines the SEDs (bottom panel) and the pixel frames (top panel, from left to right) for up to three instruments, running through all wavelengths in the simulation.

Function Documentation

◆ makeWavelengthMovie()

def pts.visual.makewavelengthmovie.makeWavelengthMovie (   simulation,
maxPercentile = 100,
  minPercentile = 10,
  decades = None,
  renormalize = False,
  outDirPath = None,
  outFileName = None,
  outFilePath = None,
  rate = 7 
)

This function creates a movie for the output of the specified simulation.

The movie combines the SEDs (bottom panel) and the pixel frames (top panel, from left to right) for up to three instruments, running through all wavelengths in the simulation.

The function takes the following arguments:

  • simulation: a sequence of Simulation and/or Instrument instances (or a single instance of one of these types). The sequence is expanded into a list of up to three instruments; any extra instruments are ignored. All instruments in the final list must include an integrated SED ("*_sed.dat" file) as well as total flux pixel frames ("*_total.fits" file). All instruments must use the same wavelength grid, and the instruments frames must have the same pixel size. These requirements are not verified. The fluxes and surface brightness values are plotted in the units of the SKIRT output.
  • maxPercentile: the percentile value in range [0,100] used to determine the maximum surface brightness in the images. The default value is 100, so that the largest surface brightness value in the frame(s) determines the maximum value. A smaller percentile value such as 99 could be used to exclude the very largest surface brightness values (for example, the direct light from a point source).
  • minPercentile: the percentile value in range [0,100] used to determine the minimum surface brightness in the images. The default value is 10. This argument is ignored if decades is specified.
  • decades: the number of decades in the surface brightness range in the images. This is an alternative way to determine the minimum value once the maximum has been obtained using maxPercentile. By default, the minPercentile mechanism is used instead.
  • renormalize: a Boolean flag selecting one of two image scaling options. When False (the default value), the surface brightness range is determine for the complete data cube and kept constant for all frames. As a result, image frames might be completely dark at wavelengths with very low overall luminosity. When True, the surface brightness range is determined for each frame separately. This allows to see the spatial structure of the surface brightness even at wavelengths with very low luminosity.
  • outDirPath: when specified, overrides the default output directory path.
  • outFileName: when specified, overrides the filename portion of the default output path.
  • outFilePath: when specified, overrides the the complete output file path.
  • rate: the frame rate of the movie, in frames per second. The default value is 7.

By default, the movie is saved in the output directory of the first instrument, using a name starting with the corresponding simulation prefix and ending with ".mp4". This can be overridden with the out* arguments as described for the pts.utils.savePath() function.