#include <ReadFits3DGeometry.hpp>
Public Member Functions | |
double | density (Position bfr) const override |
string | filename () const |
Position | generatePosition () const override |
double | pixelScale () const |
double | SigmaX () const override |
double | SigmaY () const override |
double | SigmaZ () const override |
![]() | |
int | dimension () const override |
virtual double | density (Position bfr) const =0 |
virtual int | dimension () const =0 |
virtual Position | generatePosition () const =0 |
virtual double | SigmaX () const =0 |
virtual double | SigmaY () const =0 |
virtual double | SigmaZ () const =0 |
![]() | |
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 |
Protected Member Functions | |
ReadFits3DGeometry () | |
void | setupSelfBefore () override |
![]() | |
GenGeometry () | |
![]() | |
Geometry () | |
Random * | random () const |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = GenGeometry |
using | ItemType = ReadFits3DGeometry |
Private Attributes | |
Array | _datacube |
string | _filename |
int | _nx |
int | _ny |
int | _nz |
double | _pixelScale |
double | _xmin |
Array | _Xv |
double | _ymin |
double | _zmin |
Friends | |
class | ItemRegistry |
The ReadFits3DGeometry class is a subclass of the GenGeometry class, and describes an arbitrary 3D geometry for a single component read from a FITS file datacube. The model geometry is defined by two parameters: the input filename and the pixel scale (i.e. the physical length per pixel). The geometry is automatically centered on the origin.
The input geometry should be provided as a 3D datacube, i.e. an ndarray with shape (nx, ny, nz), stored in an HDU of the FITS input file. The order of axes is x, y, z and the header corresponding to this data array resembles:
NAXIS = 3 / number of array dimensions NAXIS1 = nx NAXIS2 = ny NAXIS3 = nz
with nx, ny and nz the number of cells in each spatial dimension. The input filename should include the ".fits" filename extension. By default, the first HDU with nonempty data is used. Using the data from another HDU in the provided file is possible by specifying this HDU name between square brackets after the input filename, for example: "geometry.fits[USETHISHDU]".
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.
|
inlineprotected |
Default constructor for concrete Item subclass ReadFits3DGeometry : "a geometry read from a 3D FITS file" .
|
overridevirtual |
This function returns the density
Implements Geometry.
|
inline |
This function returns the value of the discoverable string property filename : "the filename of the datacube" .
|
overridevirtual |
This function generates a random position
Implements Geometry.
|
inline |
This function returns the value of the discoverable double property pixelScale : "the pixel scale for the datacube (i.e. the physical length per pixel)" .
This property represents a physical quantity of type "length" .
The minimum value for this property is "]0" .
|
overrideprotectedvirtual |
This function reads in the .fits datacube. A vector with the normalized cumulative distribution in each spaxel is computed, satisfying the condition that the total mass equals 1.
Reimplemented from Geometry.
|
overridevirtual |
This function returns the X-axis surface density, i.e. the integration of the density along the entire X-axis,
Implements Geometry.
|
overridevirtual |
This function returns the Y-axis surface density, i.e. the integration of the density along the entire Y-axis,
Implements Geometry.
|
overridevirtual |
This function returns the Z-axis surface density, i.e. the integration of the density along the entire Z-axis,
Implements Geometry.