View

class View

Subclassed by SBody::Camera

Public Functions

View(std::shared_ptr<Metric> metric, double r, double theta, double iota)

Constructor.

Parameters:
  • r – Distance to the black hole

  • theta – Angle between the observer and the \(z\) axis, \(\theta\).

  • iota – Rotational angle of the coordiante of the view, \(\iota\).

int InitializePhoton(double photon[], double alpha, double beta)

Initialize the position and velocity of a trace back photon.

Parameters:
  • photon – 9 dimensional vector, photon[8] is used to store the look back time.

  • alpha – x position of the target in the observer’s view.

  • beta – y position of the target in the observer’s view.

Returns:

status

int Trace(const double position[], TimeSystem object_time, double record[], bool calculate_magnification, bool fast_trace = true)
Parameters:
  • position – 8 dimensional vector

  • object_time – time system of the object

  • record – position to save the observational values

  • calculate_magnification – switch of the magnification calculation

  • fast_trace – switch of the fast trace

Returns:

status

int Magnification(const double position[], TimeSystem object_time, double &magnification, const double photon[], double redshift)

Calculate the magnification of the object.

Parameters:
  • position – 8 dimensional vector

  • object_time – time system of the object

  • magnification – position to save the magnification

  • photon – 8 dimensional vector of the photon traced to the object

  • redshift – redshift of the photon

Returns:

int

int Shadow(std::string file_name)

Calculate the radius of the black hole shadow at different direction, saved in the file.

Parameters:

file_name – file name.

Returns:

status

Camera

class Camera : public SBody::View

Public Functions

Camera(std::shared_ptr<Metric> metric, size_t pixel, double half_angle, double r, double theta, double iota)

Construct a new camera object.

Parameters:
  • pixel

  • half_angle

  • r

  • theta

  • file_name

int Trace()
Returns:

int

int Lens()
Returns:

int

int Save(std::string file_name)
Returns:

int