#include <FilePolarizedPointSource.hpp>
Classes | |
struct | Tables |
Public Member Functions | |
int | dimension () const override |
string | filename () const |
bool | hasVelocity () const override |
void | launch (PhotonPacket *pp, size_t historyIndex, double L) const override |
double | luminosity () const override |
LuminosityNormalization * | normalization () const |
double | positionX () const |
double | positionY () const |
double | positionZ () const |
double | specificLuminosity (double wavelength) const override |
double | symmetryX () const |
double | symmetryY () const |
double | symmetryZ () const |
Vec | velocity () const override |
double | velocityX () const |
double | velocityY () const |
double | velocityZ () const |
Range | wavelengthRange () const override |
![]() | |
virtual int | dimension () const =0 |
virtual bool | hasVelocity () const =0 |
virtual void | launch (PhotonPacket *pp, size_t historyIndex, double L) const =0 |
virtual double | luminosity () const =0 |
virtual void | prepareForLaunch (double sourceBias, size_t firstIndex, size_t numIndices) |
double | sourceWeight () const |
virtual double | specificLuminosity (double wavelength) const =0 |
double | wavelengthBias () const |
WavelengthDistribution * | wavelengthBiasDistribution () const |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
![]() | |
virtual | ~WavelengthRangeInterface () |
virtual Range | wavelengthRange () const =0 |
![]() | |
virtual | ~VelocityInterface () |
virtual Vec | velocity () const =0 |
Protected Member Functions | |
FilePolarizedPointSource () | |
void | setupSelfAfter () override |
void | setupSelfBefore () override |
![]() | |
Source () | |
void | informAvailableWavelengthRange (Range available, string itemType) |
Random * | random () const |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
![]() | |
SourceWavelengthRangeInterface () | |
![]() | |
WavelengthRangeInterface () | |
![]() | |
VelocityInterface () | |
Private Types | |
using | BaseType = Source |
using | ItemType = FilePolarizedPointSource |
Private Attributes | |
WavelengthDistribution * | _biasDistribution |
VelocityInterface * | _bvi |
string | _filename |
LuminosityNormalization * | _normalization |
double | _positionX |
double | _positionY |
double | _positionZ |
ContSED * | _sed |
Direction | _sym |
double | _symmetryX |
double | _symmetryY |
double | _symmetryZ |
Tables | _tables |
double | _velocityX |
double | _velocityY |
double | _velocityZ |
double | _xi |
Friends | |
class | ItemRegistry |
FilePolarizedPointSource represents a primary source limited to a single point in space and emitting polarized radiation with an axisymmetric angular dependence. The Stokes vector components of the emitted radiation, as a function of wavelength and inclination angle cosine, are loaded from a user-provided file. The bolometric output is characterized by a LuminosityNormalization object configured in the ski file. The class furthermore offers user-configured properties to specify the position of the point source, the orientation of the symmetry axis of the angular dependence, and a "bulk" velocity.
Luminosity normalization
The luminosity normalization property of this class can be configured in the ski file as usual, keeping in mind that the given value refers to the (specific or wavelength-integrated) luminosity integrated over the unit sphere.
Inclination angle
For the purposes of this class, the inclination angle
In formula form, assuming that both directions
Reference direction
The components of a Stokes vector (and hence the polarization angle derived from it) are specified relative to some reference direction
In formula form, assuming that the propagation direction
after substitution of the above expression for
Input file format
As indicated in the introduction above, the user-provided input file tabulates the Stokes vector components
All quantities are specified in internal SKIRT units:
Example python script
Below is an excerpt from a python script used to create an appropiate input file for this class from the information in a set of text files. In particular, the script shows how to create the file in SKIRT stored table format using the PTS function pts.storedtable.io.writeStoredTable. It also illustrates some of the conversions that may need to be performed.
This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
When an item of this type is used, the names provided by the conditional value expression "Dimension2,ContSED" are inserted into the name sets used for evaluating Boolean expressions.
|
inlineprotected |
Default constructor for concrete Item subclass FilePolarizedPointSource : "a primary point source with a polarized spectrum read from file" .
|
overridevirtual |
This function returns the dimension of the point source, which depends on the (lack of) symmetry of its geometry.
Implements Source.
|
inline |
This function returns the value of the discoverable string property filename : "the name of the stored table file listing the Stokes vector components" .
|
overridevirtual |
This function returns true if the velocity of the source is nonzero.
Implements Source.
|
overridevirtual |
This function causes the photon packet pp to be launched from the source using the given history index and luminosity contribution. The function samples a wavelength and a propagation direction from the spectral and angular dependencies derived from the input file, constructs proper objects for angular distribution, polarization profile and bulk velocity, and finally emits the photon packet with these properties.
Implements Source.
|
overridevirtual |
This function returns the luminosity
Implements Source.
|
inline |
This function returns the value of the discoverable item property normalization : "the type of luminosity normalization for the source" .
The default value for this property is given by the conditional value expression "IntegratedLuminosityNormalization" .
|
inline |
This function returns the value of the discoverable double property positionX : "the position of the point source, x component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "0" .
When a value is entered for this property, the names provided by the conditional value expression "positionX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property positionY : "the position of the point source, y component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "0" .
When a value is entered for this property, the names provided by the conditional value expression "positionY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property positionZ : "the position of the point source, z component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "0" .
|
overrideprotectedvirtual |
This function warns the user if this source's intrinsic wavelength range does not fully cover the configured wavelength range.
Reimplemented from SimulationItem.
|
overrideprotectedvirtual |
This function reads the user-provided input file and caches the relevant information.
Reimplemented from SimulationItem.
|
overridevirtual |
This function returns the specific luminosity
Implements Source.
|
inline |
This function returns the value of the discoverable double property symmetryX : "the direction of the positive symmetry axis, x component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "0" .
When a value is entered for this property, the names provided by the conditional value expression "symmetryX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property symmetryY : "the direction of the positive symmetry axis, y component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "0" .
When a value is entered for this property, the names provided by the conditional value expression "symmetryY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property symmetryZ : "the direction of the positive symmetry axis, z component" .
This property represents a physical quantity of type "length" .
The default value for this property is given by the conditional value expression "1" .
|
overridevirtual |
This function implements the VelocityInterface interface. It returns the bulk velocity of this source, as configured by the user.
Implements VelocityInterface.
|
inline |
This function returns the value of the discoverable double property velocityX : "the bulk velocity of the point source, x component" .
This property represents a physical quantity of type "velocity" .
The minimum value for this property is "[-100000 km/s" .
The maximum value for this property is "100000 km/s]" .
The default value for this property is given by the conditional value expression "0" .
This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.
When a value is entered for this property, the names provided by the conditional value expression "Panchromatic&velocityX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property velocityY : "the bulk velocity of the point source, y component" .
This property represents a physical quantity of type "velocity" .
The minimum value for this property is "[-100000 km/s" .
The maximum value for this property is "100000 km/s]" .
The default value for this property is given by the conditional value expression "0" .
This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.
When a value is entered for this property, the names provided by the conditional value expression "Panchromatic&velocityY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.
|
inline |
This function returns the value of the discoverable double property velocityZ : "the bulk velocity of the point source, z component" .
This property represents a physical quantity of type "velocity" .
The minimum value for this property is "[-100000 km/s" .
The maximum value for this property is "100000 km/s]" .
The default value for this property is given by the conditional value expression "0" .
This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns the wavelength range for this source. Outside this range, all luminosities are zero. This source's wavelength range is determined as the intersection of the simulation's source wavelength range (obtained from the simulation configuration) and the intrinsic wavelength range of the spectrum read from the input file.
This function implements the SourceWavelengthRangeInterface interface.
Implements WavelengthRangeInterface.