neclib.coordinates.observations.observation_spec_base module#
Aliases#
General format of NECLIB parameters. |
|
Return HTML representation of the observation specification. |
|
Astropy units equivalency, between scan and point. |
- class ObservationMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
EnumType of observation to be performed at certain coordinate.
- DRIVE = '#777'#
- ON = '#0F5'#
- OFF = '#0DF'#
- HOT = '#F50'#
- SKY = '#0DF'#
- class TimeKeeper(interval, points_per_scan=1)[source]#
Bases:
objectJudge whether it’s time to run constant interval observation or not.
- Parameters:
interval (Quantity)
points_per_scan (int)
- property should_observe: bool#
Return
Trueif it’s time to run observation, otherwiseFalse.
- class Waypoint(mode: neclib.coordinates.observations.observation_spec_base.ObservationMode, target: str | Tuple[astropy.units.quantity.Quantity, astropy.units.quantity.Quantity, str | astropy.coordinates.baseframe.BaseCoordinateFrame | Type[astropy.coordinates.baseframe.BaseCoordinateFrame]] | NoneType = None, reference: str | Tuple[astropy.units.quantity.Quantity, astropy.units.quantity.Quantity, str | astropy.coordinates.baseframe.BaseCoordinateFrame | Type[astropy.coordinates.baseframe.BaseCoordinateFrame]] | NoneType = None, scan_frame: str | astropy.coordinates.baseframe.BaseCoordinateFrame | Type[astropy.coordinates.baseframe.BaseCoordinateFrame] | NoneType = None, start: Tuple[astropy.units.quantity.Quantity, astropy.units.quantity.Quantity] | None = None, stop: Tuple[astropy.units.quantity.Quantity, astropy.units.quantity.Quantity] | None = None, offset: Tuple[astropy.units.quantity.Quantity, astropy.units.quantity.Quantity, str | astropy.coordinates.baseframe.BaseCoordinateFrame | Type[astropy.coordinates.baseframe.BaseCoordinateFrame]] | None = None, speed: astropy.units.quantity.Quantity | None = None, integration: astropy.units.quantity.Quantity | None = None, id: Any = None)[source]#
Bases:
object- Parameters:
mode (ObservationMode)
target (str | Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None)
reference (str | Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None)
scan_frame (str | BaseCoordinateFrame | Type[BaseCoordinateFrame] | None)
start (Tuple[Quantity, Quantity] | None)
stop (Tuple[Quantity, Quantity] | None)
offset (Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None)
speed (Quantity | None)
integration (Quantity | None)
id (Any)
- mode: ObservationMode#
Observation mode.
- target: str | Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None = None#
Coordinate or name of the target object.
- reference: str | Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None = None#
Coordinate or name of the object the other coordinate is defined relative to.
- scan_frame: str | BaseCoordinateFrame | Type[BaseCoordinateFrame] | None = None#
Coordinate frame in which the scan is performed.
- start: Tuple[Quantity, Quantity] | None = None#
Start position of the scan. The frame is defined in
scan_frame.
- stop: Tuple[Quantity, Quantity] | None = None#
Stop position of the scan. The frame is defined in
scan_frame.
- offset: Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None = None#
Offset applied to all the coordinates specified above.
- speed: Quantity | None = None#
Scan speed.
- integration: Quantity | None = None#
Integration time.
- id: Any = None#
Identifier of the coordinate, if necessary.
- property is_scan: bool#
Whether this coordinate contains enough information to perform a scan.
- property with_offset: bool#
Whether this coordinate should be offset by certain amount.
- property name_query: bool#
Whether the target is specified by its name.
- property coordinates: SkyCoord#
Return a list of coordinates this section represents.
Warning
This property doesn’t perform accurate coordinate calculation when coordinates in AltAz frame is involved. Please use
neclib.coordinates.convertmodule for accurate coordinate calculation.
- class ObservationSpec(**kwargs)[source]#
Bases:
Parameters,ABC- classmethod from_file(file, /)[source]#
Read an observation specification from a TOML file.
This overrides
Parameters.from_file()only for observation specs so that sky-coordinate fields can be interpreted with their coordinate-frame context. In particular, J2000/FK5/ICRSlambda_*fields represent RA. Therefore, sexagesimal RA strings such as"05:35:17.3"in"lambda_on[deg]"are normalized as hour angle before the generic unit parser sees them.- Parameters:
file (PathLike | str | Any)
- abstract observe()[source]#
Define all the observation steps which will be interpreted and commanded.
- Return type:
Generator[Waypoint, None, None]
- off(id=None, integration=None, *, relative=None, on_coord=None, off_coord=None)[source]#
- Parameters:
id (Any)
integration (Quantity | None)
relative (bool | None)
on_coord (Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None)
off_coord (Tuple[Quantity, Quantity, str | BaseCoordinateFrame | Type[BaseCoordinateFrame]] | None)
- Return type:
- property coords: DataFrame#
Crudely calculated waypoints this object represents.
Warning
This property doesn’t perform accurate coordinate calculation when coordinates in AltAz frame is involved.
- property fig: Figure#
Figure of crudely calculated telescope driving path.
Notes
If you need
Axesobject, usefig.axesattribute.