irfpy.cena.fov
¶
fov module is for Chap 3. in the CENA FM calibration report.
The CENA calibration report issue 1 rev 1 is implemented here. The module treats Chapter 3: Sensor properties.
A simple use of the module can be found as a script of cena_visualize_fov
.
Conversion between \(\theta\) \(\phi\) system to a vector is implemented in irfpy.cena.frame
module.
See also How to convert between frames.
Definition of \(\theta\) and \(\phi\) is as follows. Primary axis is -z axis. \(\theta\) is measured from xy plane and positive in -z axis. In other word, this is a co-latitude measured from -z axis. \(\phi\) is measured from y axis (strictly speaking yz plane) and positive toward x axis. See Figure 1.1 in CENA calibration report.
- irfpy.cena.fov.shape_of_response(n, theta, phi)[source]¶
Return the shape of response.
\(\theta\) is elevation angle and \(\phi\) is the azimuthal angle in degrees. \(\theta\) should be -90 to 90, and \(\phi\) should be -180 to 180. n is the channel ID from 0 to 6.
- irfpy.cena.fov.pixel_shape(n, elevresolution=0, azimresolution=0, resolution=None, fill=False)[source]¶
Return an array of the pixel edge angle of its FWHM.
- Parameters
n – Channel number. 0 to 6.
azimresolution – Azimuthal resolution. Number of division in azimuthal direction.
elevresolution – Elevation resolution. Number of division in elevation direction.
resolution – Resolution. Overwrite
azimresolution
andelevresolution
.fill – If true, the first point is added to the end.
- Returns
A tuple of 2 numpy array. Array of \(\theta\) and array of \(\phi\).
The number of elements is
4+2*azimresolution+2*elevresolution
. If fill is True, one more element is added. However, it is recommend to check the number after you get the array.>>> pix0 = pixel_shape(0, azimresolution=50, elevresolution=3) >>> print(len(pix0[0]), len(pix0[1])) 110 110
- irfpy.cena.fov.azim_pix_center(n)[source]¶
Returns the azimuth (\(\phi\)) center in degrees for the pixel n.
Implements equation (3.2), -19.06*n + 57.19
- irfpy.cena.fov.azim_pix_fwhm(n)[source]¶
Returns the FWHM of the azimuthal directions (\(\phi\)) in degrees.
Implements equation (3.3). Indeed it does not depend on n, 45.0 degrees.
- irfpy.cena.fov.elev_pix_center(n)[source]¶
Returns the elevation center (\(\theta\)) in degrees for the pixel n.
Implements equation (3.4). It does not indeed depend on n: -6.05 degrees.
- irfpy.cena.fov.elev_pix_fwhm(n)[source]¶
Returns the FWHM of the elevation (\(\theta\)) directions in degrees.
Implements equation (3.5). Independent of n, 6.44 is returned.
- irfpy.cena.fov.solid_angle(n)[source]¶
Returns the approximate soliad angle.
Equation (3.8) gives the definition.
\[\Delta\Omega_n \approx FWHM_{\phi,n} \cdot FWHM_{\theta,n}\]>>> print('%.3f' % solid_angle(0)) 0.088
- irfpy.cena.fov.infov(theta, phi)[source]¶
A simple FOV envelope checker.
- Parameters
theta – The \(\theta\) angle(s), from -90 to 90 in degrees. Looking direction.
phi – The \(\phi\) angle(s), from -180 to 180 in degrees. Looking direction.
>>> infov(0, 0) True >>> infov(5, 0) # Theta=5, False False >>> infov(-5, 0) True >>> infov([-6, -6, -6, -6, -6], [-180, -90, 0, 90, 180]) array([False, False, True, False, False])