FocalPlane¶
FocalPlane objects can be constructed by hand, by passing in the positions and polarization angles of the detectors.
Factory function¶
The moby2.scripting.products
module provides a function for
getting best FocalPlane in many cases:
-
moby2.scripting.products.
get_focal_plane
(params, tod_info=None, det_uid=None, tod=None)[source]¶ Decode “params” dictionary and return a FocalPlane object. Optionally add polarization angle information and pointing offsets.
params is a dict with blocks describing different actions:
params = { 'detector_offsets': {...}, 'polarization_angles': {...}, 'pointing_shifts': {...}, }
Parameters in detector_offsets are passed to get_detector_offsets; parameters in pol_source (if not None) are passed to get_polarization angles. Parameters in shift_generator are passed to get_pointing_offset.
E.g.:
params = { 'detector_offsets': { 'format': 'fp_file', 'filename': 'template_ar1_130821s.txt' }, }
Depending on params, tod_info and stuff may be inspected.
Typical use cases are:
You have a TOD and want the system default template:
params = {'source': 'template'}
fplane = moby2.scripting.products.get_focal_plane(params, tod_info=tod.info)
You want to load an FPFitFile as a FocalPlane:
params = {'source': 'fp_file', 'filename': 'my_fp_fit.txt'}
fplane = moby2.scripting.products.get_focal_plane(params)
Documented methods¶
-
class
moby2.pointing.
FocalPlane
(x=None, y=None, phi=None, mask=None, det_uid=None)[source]¶ The focal plane coordinate system is defined relative to a nominal boresight aligned with z^. x^ corresponds roughly to +azimuth, and y^ corresponds to +altitude. Yes, it’s sort of left-handed.
The angle “phi” describes the polarization angle and is defined, roughly, as the angle between the polarization axis and x^, increasing towards y^.
The “mask” is a boolean array indicating which channels have valid offsets. “det_uid” gives the detector id associated with each offset.
-
classmethod
from_ACT_po_file
(filename)[source]¶ Load pointing offsets from ACT-style pointingOffset file.
-
classmethod
from_super_po_file
(filename)[source]¶ Load pointing offsets from ACT-style multiOffset file.
-
get_coords
(ctime, az, alt, fields=None, final_q=None, weather=None)[source]¶ Compute high-precision detector coordinates at specified ctime and boresight az and alt. All arguments are passed directly to pointing.get_coords.
-
classmethod