The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | List of all members
pts.simulation.simulation.Instrument Class Reference

An instance of the Instrument class can be spawned from a Simulation object to represent an instrument in the simulation, allowing to retrieve its attributes. More...

Public Member Functions

def __init__ (self, simulation, index)
 The constructor accepts the Simulation instance in which this instrument resides, and the zero-based index of the instrument in the instrument system. More...
 
def distance (self)
 For distant instruments (which use parallel projection), this function returns the distance of the instrument to the model as an astropy scalar quantity with the length units specified in the ski file. More...
 
def name (self)
 This function returns the name of the instrument as specified in the ski file, as a string. More...
 
- Public Member Functions inherited from pts.simulation.simulation._SimulationEntity
def __init__ (self, simulation, xpath)
 The constructor accepts the Simulation instance in which this entity resides, and the xpath of the entity in the ski file for the simulation. More...
 
def getBoolAttribute (self, attribute)
 This function returns the value of the specified entity attribute as a Boolean value. More...
 
def getFloatAttribute (self, attribute)
 This function returns the value of the specified entity attribute as a floating point number representing a dimensionless quantity. More...
 
def getIntAttribute (self, attribute)
 This function returns the value of the specified entity attribute as an integer number. More...
 
def getQuantityAttribute (self, attribute)
 This function returns the value of the specified entity attribute as an astropy scalar quantity with given units. More...
 
def getQuantityListAttribute (self, attribute)
 This function returns the value of the specified entity attribute as an astropy quantity array with given units, assuming comma-separated values in the attribute value. More...
 
def getStringAttribute (self, attribute)
 This function returns the value of the specified entity attribute as a string. More...
 
def outFilePaths (self, fileType=None)
 This function returns a list of absolute paths to the output files associated with this entity. More...
 
def prefix (self)
 This function returns the prefix for the simulation with which this entity is associated. More...
 
def type (self)
 This function returns the type of the entity, i.e. More...
 
def wavelengthBinWidths (self)
 This function returns an astropy quantity array containing the wavelength bin widths of the wavelength grid associated with this entity, or raises an error if this information cannot be obtained. More...
 
def wavelengthIndices (self, wavelengths)
 This function uses the wavelengths() function to load the characteristic wavelengths of the wavelength grid associated with this entity, and then determines the zero-based grid index corresponding to (i.e. More...
 
def wavelengths (self)
 This function returns an astropy quantity array containing the characteristic wavelengths of the wavelength grid associated with this entity, or raises an error if this information cannot be obtained. More...
 

Detailed Description

An instance of the Instrument class can be spawned from a Simulation object to represent an instrument in the simulation, allowing to retrieve its attributes.

See the Simulation.instruments() function.

Constructor & Destructor Documentation

◆ __init__()

def pts.simulation.simulation.Instrument.__init__ (   self,
  simulation,
  index 
)

The constructor accepts the Simulation instance in which this instrument resides, and the zero-based index of the instrument in the instrument system.

It is intended to be invoked only from within the Simulation class.

Reimplemented from pts.simulation.simulation._SimulationEntity.

Member Function Documentation

◆ distance()

def pts.simulation.simulation.Instrument.distance (   self)

For distant instruments (which use parallel projection), this function returns the distance of the instrument to the model as an astropy scalar quantity with the length units specified in the ski file.

If the instrument does not have a distance attribute, or the distance attribute value does not include a unit string, the function raises an error.

◆ name()

def pts.simulation.simulation.Instrument.name (   self)

This function returns the name of the instrument as specified in the ski file, as a string.


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