Source code for irfpy.joee.fov0
r''' The JoEE angle.
The channel numbering is defined, preliminary (as a version 0).
Referring to the proposal v0.3, the JoEE has FoV of 360x12
with 22x12 per channel.
From this, I defer the number of azimuthal channel 16.
Only 1 elevational channel is defined, as :math:`\theta_\mathrm{JoEE}=0`.
For 16 azimuthal channel, the number 0 starts from the nadir unit of ram looking one.
For frame definition, see also the separted document, :ref:`definition_of_frame_joee`,
and the module :mod:`irfpy.joee.frame0`.
'''
import numpy as np
[docs]def azim_pix_center(naz):
r''' Return the azimuthal angle for the given channel numbers.
The 0 is ram direction with slightly nadir looking, meaning -11.25 deg.
The channel 1 is neighborning with more nadir looking, i.e. -33.75 deg
The equation looks like:
.. math::
\phi = -11.25 - naz * 22.5 ~~~~(naz<8)
\phi = 348.75 - naz * 22.5 ~~~~(naz>=8)
>>> print(azim_pix_center(0))
-11.25
>>> print(azim_pix_center(1))
-33.75
>>> print(azim_pix_center([6, 7, 8]))
[-146.25 -168.75 168.75]
Even float argument is allowed.
>>> print(azim_pix_center([15.5, 0.5]))
[ 0. -22.5]
'''
naz = np.array(naz)
phi = 348.75 - naz * 22.5 # (0, 348.75)
phiplus = phi + 180.
phiplus = phiplus % 360.0
phi = phiplus - 180.
return phi
[docs]def azim_pix_fwhm(naz):
''' Return the FWHM.
Just return 22.0 degrees.
'''
return 22.0
[docs]def elev_pix_center(nel=0.0):
''' Elevation angle in degrees.
JoEv (possible) has only 1 channels, 0 is returned no matter how the nel is given.
'''
return 0.0
[docs]def elev_pix_fwhm(nel=0.0):
''' Return the FWHM
Just return 12.0 degrees.
'''
return 12.0
import unittest
import doctest
[docs]def doctests():
return unittest.TestSuite((
doctest.DocTestSuite(),
))
if __name__ == '__main__':
unittest.main(defaultTest='doctests')