Observatory

class showermodel.observatory.Observatory(*telescopes, obs_name=None)

Bases: list

List of telescopes.

The characteristics of the observatory are stored in attributes.

Note: Attributes inherited from Telescope (i.e., tel_type, tel_apert, tel_area and tel_N_pix) are not updated when telescopes are modified or appended.

Parameters:
  • *telescopes (Telescope, mandatory) – List of telescopes objects to be included.

  • obs_name (str or None, default None) – Name given to the observatory.

obs_name

Name given to the observatory.

Type:

str or None

N_tel

Number of telescopes.

Type:

int

tel_type

Telescope type. Only defined if all the telescopes are of the same type.

Type:

str or None

theta

Zenith angle in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

alt

Altitude in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

az

Azimuth angle (from north, clockwise) in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

show()

Show the telescope positions and indexes in a 2D plot.

append()

Append a telescope to the observatory.

set_pointing()

Set pointings of all the telescopes.

class showermodel.observatory.Array25(obs_name='Array25', telescope=None, tel_type='IACT', x_c=0.0, y_c=0.0, z_c=0.0, R=0.341, rot_angle=0.0, theta=0.0, alt=None, az=0.0)

Bases: Observatory

Array of 25 telescopes similar to the layout of MST telescopes of CTA.

The pointing directions of all the telescopes are set equally, but they can be modified individually (along with other properties) later on.

The telescope index is sorted first by radius and then by azimuth, so that tel_index=0 corresponds to the central telescope.

Parameters:
  • obs_name (str, default 'Array25') – Name given to the observatory.

  • telescope (Telescope, default None) – Telescope object to be used to construct the observatory. If None, the given tel_type telescope is used.

  • tel_type (str, default 'IACT') – Type of telescope to be used when telescope==None.

  • x_c (float, default 0) – East coordinate in km of the center of the array.

  • y_c (float, defatul 0) – North coordinate in km of the center of the array.

  • z_c (float, default 0) – Height of the array in km above ground level.

  • R (float, default 341) – Radius in km of the array.

  • rot_angle (float, default 0) – Rotation angle in degrees of the array (clockwise).

  • theta (float, default 0) – Zenith angle in degrees of the telescope pointing directions.

  • alt (float, default None) – Altitude in degrees of the telescope pointing directions. If None, theta is used. If given, theta is overwritten.

  • az (float, default 0) – Azimuth angle (from north, clockwise) in degrees of the telescope pointing directions.

obs_name

Name given to the observatory.

Type:

str

N_tel

Number of telescopes.

Type:

int

x_c

East coordinate in km of the center of the array.

Type:

float

y_c

North coordinate in km of the center of the array.

Type:

float

z_c

Height of the array in km above ground level.

Type:

float

R

Radius in km of the array.

Type:

float

rot_angle

Rotation angle in degrees of the array (clockwise).

Type:

float

tel_type

Telescope type. Only defined if all the telescopes are of the same type.

Type:

str or None

theta

Zenith angle in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

alt

Altitude in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

az

Azimuth angle (from north, clockwise) in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

show()

Show the telescope positions and indexes in a 2D plot.

append()

Append a telescope to the observatory.

set_pointing()

Set pointings of all the telescopes.

class showermodel.observatory.Grid(obs_name='Grid', telescope=None, tel_type='GridElement', x_c=0.0, y_c=0.0, z_c=0.0, size_x=2.0, size_y=2.0, N_x=10, N_y=10, theta=0.0, alt=None, az=0.0)

Bases: Observatory

Rectangular grid of telescopes across the x and y directions.

The pointing directions of all the telescopes are set equally, but they can be modified individually (along with other properties) later on.

The telescope index is sorted first by y (from max to min) and then by x (from min to max), so that tel_index=0 corresponds to the telescope placed at the corner with minimum x and maximum y.

Parameters:
  • obs_name (str, default 'Grid') – Name given to the observatory.

  • telescope (Telescope, default None) – Telescope object to be used to construct the grid. If None, the given tel_type telescope is used.

  • tel_type (str, default 'GridElement') – Type of telescope to be used when telescope==None.

  • x_c (float, default 0) – East coordinate in km of the center of the grid.

  • y_c (float, default 0) – North coordinate in km of the center of the grid.

  • z_c (float, default 0) – Height of the grid in km above ground level.

  • size_x (float, defaut 2) – Size of the grid in km along the x direction.

  • size_y (float, default 2) – Size of the grid in km along the y direction.

  • N_x (int, default 10) – Number of cells along the x direction.

  • N_y (int, default 10) – Number of cells along the y direction.

  • theta (float, default 0) – Zenith angle in degrees of the telescope pointing directions.

  • alt (float, default None) – Altitude in degrees of the telescope pointing directions. If None, theta is used. If given, theta is overwritten.

  • az (float, default 0) – Azimuth angle (from north, clockwise) in degrees of the telescope pointing directions.

obs_name

Name given to the observatory.

Type:

str

N_tel

Number of cells.

Type:

int

x_c

East coordinate in km of the center of the grid.

Type:

float

y_c

North coordinate in km of the center of the grid.

Type:

float

z_c

Height of the grid in km above ground level.

Type:

float

size_x

Size of the grid in km across the x direction.

Type:

float

size_y

Size of the grid in km across the y direction.

Type:

float

N_x

Number of cells across the x direction.

Type:

int

N_y

Number of cells across the y direction.

Type:

int

cell_area

Cell area in m^2.

Type:

float

tel_type

Telescope type. Only defined if all the telescopes are of the same type.

Type:

str or None

theta

Zenith angle in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

alt

Altitude in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

az

Azimuth angle (from north, clockwise) in degrees of the observatory pointing direction. Only defined if all the telescopes point to the same direction.

Type:

float or None

show()

Show the telescope positions and indexes in a 2D plot.

append()

Append a telescope to the observatory.

set_pointing()

Set pointings of all the telescopes.

Methods:
Observatory.show()

Show the telescope positions and indexes of the observatory in a 2D plot.

Observatory.append(telescope)

Append a new telescope and increase N_tel.

Parameters:

telescope (Telescope) – Telescope to be added.

Observatory.set_pointing(theta=0.0, alt=None, az=0.0)

Set pointings of all the telescopes.

Parameters:
  • theta (float, default 0) – Zenith angle in degrees of the telescope pointing direction.

  • alt (float, default None) – Altitude in degrees of the telescope pointing direction. If None, theta is used. If given, theta is overwritten.

  • az (float, default 0) – Azimuth angle (from north, clockwise) in degrees of the telescope

  • direction. (pointing) –