ch_ephem.observers

Observers for CHIME instruments.

This module provides caput.time.Observer objects for CHIME instruments. Position data for the instruments comes from the instruments.yaml file provided with this module.

Any instrument defined in instruments.yaml will automatically have an importable object created for it in ch_ephem.observers. To retrieve a particular Observer, import it from observers:

>>> from ch_ephem.observers import chime

To get a list of all available instrument observers, use the all() function, which returns a dict of Observer objects:

>>> import ch_ephem.observers
>>> ch_ephem.observers.all()
{'chime': <ch_ephem.observers.Observer object at 0x7f2225b264d0>,
'galt': <ch_ephem.observers.Observer object at 0x7f2225e76110>,
...
}

Observers objects found in this module subclass the standard caput.time.Observer to additionally provide rotation, roll and tangent-space offset for the instruments:

>>> from ch_ephem.observers import pathfinder
>>> print(pathfinder.rotation)
1.986
>>> print(pathfinder.roll)
0.0
>>> print(pathfinder.offset.x)
373.754961
>>> print(list(pathfinder.offset))
[373.754961, -54.649866, 0.0]

Functions

Functions

all()

Return a dict of all available Observers, keyed by name.

reset()

Unload all the observers.

Classes

Observer([lon, lat, alt, rot, roll, offset, ...])

Representation of a local observer.

Offset(x, y, z)

Create new instance of Offset(x, y, z)

class ch_ephem.observers.Observer(lon=0.0, lat=0.0, alt=0.0, rot=0.0, roll=0.0, offset=[0.0, 0.0, 0.0], lsd_start=None, sf_wrapper=None)[source]

Bases: Observer

Representation of a local observer.

This class extends caput.time.Observer to add CHIME-specific geometry parameters:

Observer.rotation:

rotation of the cylinder(s) in degrees anti-clockwise looking down from above. (e.g. West from North)

Observer.roll:

roll of the cylinder focal-line in degree eastward from vertical (e.g. clockwise looking North along the focal line).

Observer.offset:

offset in metres of the antenna array zero point in the right-handed tangent-space anchored at (lat,lon,alt). A positive X offset is eastward. A positive Y offset is northward. A positive Z offset is upward.

class ch_ephem.observers.Offset(x, y, z)

Bases: tuple

Create new instance of Offset(x, y, z)

x

Alias for field number 0

y

Alias for field number 1

z

Alias for field number 2

ch_ephem.observers.all() dict[str, Observer][source]

Return a dict of all available Observers, keyed by name.

ch_ephem.observers.reset() None[source]

Unload all the observers.

Use this function if you’ve changed instruments.yaml on disk to clear the module’s cache of Observers.