irfpy.cena.centralpixel

A CENA FoV module.

CENA FoV is indeed a finite area in the angular space. However, for simple investigation, the center vectors for each channel can be used as a representation. This module provides an implementation.

Use irfpy.cena.fov module for advanced and generic use.

class irfpy.cena.centralpixel.Fov[source]

Bases: object

Abstract class of CENA FoV.

class irfpy.cena.centralpixel.FovIss1Rev1[source]

Bases: irfpy.cena.centralpixel.Fov

An implementation of CENA FoV.

CENA FoV with central direction approximation. Data based on the calibration report issue 1 revision1.

getDirection(ch)[source]

Get the viewing vector in SC frame corresponding to the looking direction.

Central azimuth direction, phi_c[n], is formulated as phi_c[n] = -19.06*n + 57.19 … Eq 3.2. FWHM is 45 degrees, but in this implementation, it is ignored.

The elevation theta_c[n] is -6.05 degs in Eq. 3.4. FWHM is 6.44 degs while is ignored.

>>> fov = FovIss1Rev1()

The returned value is an instance of Vector3d. >>> v = fov.getDirection(0) >>> # print v.x, v.y, v.z

If you specify the unexisting ch (other than 0 to 6), IndexError will be raised.

>>> try:
...    fov.getDirection(-1)
...    print("Why didn't exception raised?")
... except IndexError as e:
...    print("Correct exception is raised.")
... except:
...    print("Unknonw exception raised.")
Correct exception is raised.
irfpy.cena.centralpixel.defaultDirsSc()[source]

Return a default direction of the CENA Fov in SC frame.

Default direction of the CENA FOV is returned. The default uses FovIss1Rev1 class. The returned has 7 elements and each element is an instance of Vector3d object.

>>> dir = defaultDirsSc()
>>> print(len(dir))
7
>>> # print dir[3].x, dir[3].y, dir[3].z