Gyoto::GridData2D Class Reference

Class for reading data stored in a 2D grid. More...

`#include <GyotoFitsRW.h>`

Inheritance diagram for Gyoto::GridData2D:

## Public Member Functions

| GridData2D ()
| Constructor.
| GridData2D (const GridData2D &)
| Copy constructor.
virtual GridData2D * | clone () const
virtual | ~GridData2D ()
| Destructor.
void | rmin (double rmn)
double | rmin () const
void | rmax (double rmx)
double | rmax () const
void | nr (size_t nn)
size_t | nr () const
void | dr (double dd)
double | dr () const
void | phimin (double phimn)
double | phimin () const
void | phimax (double phimx)
double | phimax () const
void | dphi (double dd)
double | dphi () const
void | tmin (double tmn)
double | tmin () const
void | tmax (double tmx)
double | tmax () const
void | nt (size_t nn)
size_t | nt () const
void | nphi (size_t nn)
size_t | nphi () const
virtual std::vector< size_t > | fitsReadHDU (fitsfile *fptr, std::string extname, double *&dest, size_t length=0)
fitsfile * | fitsCreate (std::string filename)
| Creates a FITS file with dummy primary HDU.
void | fitsClose (fitsfile *fptr)
| Closes a fits file referred to by a fitsfile pointer.
void | fitsWriteHDU (fitsfile *fptr, std::string extname, double *src, size_t length=0)
| Writes specific HDU in FITS files.
void | getIndices (size_t i[3], double const tt, double const phi, double const rr, double *const time_array=NULL) const
double | interpolate (double tt, double phi, double rr, double *const array, double *const time_array=NULL) const

## Private Attributes

double | phimin_
| Minimum phi in grid.
double | phimax_
| Maximum phi in grid.
double | dphi_
| δφ between two grid columns
size_t | nphi_
| Grid size in the φ direction.
double | dr_
| Radius step.
size_t | nr_
| Grid size in the r direction.
double | rmin_
| Minimum r in grid.
double | rmax_
| Maximum r in grid.
double | dt_
| Time step, if not constant would be ignored.
size_t | nt_
| Grid size in the t direction.
double | tmin_
| Minimum t in grid.
double | tmax_
| Maximum t in grid.

## Detailed Description

Class for reading data stored in a 2D grid.

## Member Function Documentation

## clone()

virtual GridData2D * Gyoto::GridData2D::clone | ( |  | ) | const

virtual

Reimplemented in Gyoto::Astrobj::FlaredDiskSynchrotron, and Gyoto::Astrobj::ThinDiskGridIntensity.

## fitsClose()

void Gyoto::GridData2D::fitsClose | ( | fitsfile * | fptr | ) |

Closes a fits file referred to by a fitsfile pointer.

Parameters

  fptr | fitsfile pointer to FITS file to be closed

## fitsCreate()

fitsfile * Gyoto::GridData2D::fitsCreate | ( | std::string | filename | ) |

Creates a FITS file with dummy primary HDU.

Opens a new fits file referred to by a fitsfile pointer and fills the primary HDU by a single pixel equal to 0. Returns the fitsfile pointer to the new FITS file.

Parameters

  filename | Name of fits file to be created

## fitsWriteHDU()

void Gyoto::GridData2D::fitsWriteHDU | ( | fitsfile * | fptr,
|  | std::string | extname,
|  | double * | src,
|  | size_t | length = 0 )

Writes specific HDU in FITS files.

Parameters

  fptr | fitsfile pointer to FITS file
  extname | Name of extension to be written
  src | Data to be written in extension
  length | Data has shape {nr_,nphi_,nt_} if length is 0 (default; used for storing scalar data), or {nr_,nphi_,nt_,length} if length is not 0 (used for storing vector data, e.g.: length=2 - (v_r, v_phi) - for velocity)

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

- GyotoGridData2D.h