neclib.core.units#

Custom Astropy units.

Notes

Executing u.Unit("scan") without importing neclib will fail. To use the units defined here, please import (contents of) neclib, even if they don’t explicitly appear in your script.

scan = Unit("scan")#

Custom unit to handle number of scan lines.

point = Unit("point")#

Custom unit to handle number of pointing positions.

scan_to_points(points_per_scan)[source]#

Astropy units equivalency, between scan and point.

Parameters:

points_per_scan (int) – Number of observation points per 1 scan.

Return type:

List[Tuple[UnitBase, UnitBase, Callable[[float], float], Callable[[float], float]]]

Examples

>>> eq = neclib.units.scan_to_point_equivalency(5)
>>> u.Quantity("5scan").to(neclib.units.point, equivalencies=eq)
25
dBm: DecibelUnit = Unit("dB(mW)")#

Custom unit to handle power in dBm.