The SKIRT project
advanced radiative transfer for astrophysics
pts.storedtable.conversionspec.ConversionSpec Class Reference

An instance of this class represents a particular specification for converting some original data (in some given format) to the SKIRT stored table format, and it provides facilities to actually perform the specified conversion by calling upon the appropriate functionality outside this module. More...

Public Member Functions

 __init__ (self, inputPath, outputPath)
 The constructor remembers the specified input and output paths.
 perform (self)
 This function performs the conversion specified for this instance.

Protected Attributes

 _inputPath
 _name
 _outputPath

Detailed Description

An instance of this class represents a particular specification for converting some original data (in some given format) to the SKIRT stored table format, and it provides facilities to actually perform the specified conversion by calling upon the appropriate functionality outside this module.

The conversion specification is read from the "ConversionSpec.txt" text file in a particular subdirectory of the SKIRTresources directory hierarchy. The specification file must contain one or more sequences of exactly three lines:

  • line 1: the name of the conversion function to be called (function must be imported into this module)
  • line 2: the input file path(s), relative to the location of the specification file, separated by spaces
  • line 3: the output file path(s), relative to the global root of the output hierarchy, separated by spaces

Because the filename arguments are separated by spaces, individual file names cannot contain spaces.

Constructor & Destructor Documentation

◆ __init__()

pts.storedtable.conversionspec.ConversionSpec.__init__ ( self,
inputPath,
outputPath )

The constructor remembers the specified input and output paths.

The input path specifies the directory in which the "ConversionSpec.txt" file resides. The output path specifies the global root of the output hierarchy.

Member Function Documentation

◆ perform()

pts.storedtable.conversionspec.ConversionSpec.perform ( self)

This function performs the conversion specified for this instance.


The documentation for this class was generated from the following file: