necst_visualizer.scan_check¶
- class ScanCheck(data_path, kisa_path=None)[source]¶
Bases:
object
Tool to check whether the data is taken with “normally” controlled system.
- Parameters
data_path (PathLike) – Path to the database directory.
kisa_path (PathLike) – Path to the pointing error file.
- Return type
None
Examples
>>> necvis = necst_visualizer.Scan_check.ScanCheck("path/to/database") >>> necvis.create_data_array() (xarray.Dataset)
- ENCODER_TOPIC = 'status_encoder'¶
- OBSMODE_TOPIC = 'obsmode'¶
- class VisualizeScan(drive_data, observation='NotSpecified')[source]¶
Bases:
object
Visualize scanning path.
- Parameters
drive_data (xr.Dataset) – it is created by create_data_array() function of ScanCheck class.
observation (str) –
- Return type
None
Examples
>>> visualize = necst_visualizer.Scan_check.VisualizeScan(drive_data) >>> visualize.draw_figure() (Plot observational data on three coordinate systems (horizontal,equatorial and galactic)) >>> visualize.draw_one_coord() (Plot observational data on galactic coordinate system) >>> visualize.track_figure() (Show the direction of observation on three coordinate systems) >>> visualize.track_one_coord() (Show the direction of observation on galactic coordinate system) >>> fig,axes = visualize.draw_figure() >>> visualize.track_figure(fig=fig,axes=axes) (Plot observational data with the direction of observation on three coordinate systems)
- MAIN_OBSMODES = [b'ON ', b'OFF ', b'SKY ']¶
- OTHER_OBSMODES = [b' ', b'Non ', b'HOT ']¶
- PLOT_COLOR = {b' ': '#777', b'HOT ': '#F00', b'Non ': '#000', b'OFF ': '#0DF', b'ON ': '#0F0', b'SKY ': '#0DF'}¶
- COORD_MAP = {'equatorial': {'label': ['R.A. [deg]', 'Dec. [deg]'], 'title': 'Equatorial (J2000)', 'xy': ['ra', 'dec']}, 'galactic': {'label': ['$l$ [deg]', '$b$ [deg]'], 'title': 'Galactic', 'xy': ['l', 'b']}, 'horizontal': {'label': ['Az. [deg]', 'El. [deg]'], 'title': 'Horizontal', 'xy': ['az', 'el']}}¶
- classmethod from_pickle(pickle_path)[source]¶
- Parameters
pickle_path (Union[str, Path]) –
- Return type
None
- draw_one_coord(coord='galactic', fig=None, ax=None)[source]¶
Plot observational data.
- Parameters
coord (str) – Either of [“horizontal”, “equatorial”, “galactic”].
ax (axes object of matplotlib) – Axis to which the data is drawn.
- Return type
None
- track_one_coord(coord='galactic', fig=None, ax=None, interval=100)[source]¶
Show the direction of observation.
- Parameters
coord (str) – Either of [“horizontal”, “equatorial”, “galactic”].
ax (axes object of matplotlib) – Axis to which the data is drawn.
interval (int) – Interval between starting and end point of arrow.
- Return type
None
- draw_figure(save=False, fig=None, axes=None)[source]¶
Plot observational data on three coordinate systems (horizontal,equatorial and galactic).
- Parameters
save (Union[PathLike, bool]) – Path to the directory you want to save the figure.
fig (figure object of matplotlib) –
axes (axes object of matplotlib) –
- Return type
Optional[Path]
- track_figure(save=False, fig=None, axes=None, interval=100)[source]¶
Show the direction of observation on three coordinate systems (horizontal,equatorial and galactic).
- Parameters
save (Union[PathLike, bool]) – Path to the directory you want to save the figure.
fig (figure object of matplotlib) –
axes (axes object of matplotlib) –
interval (int) – Interval between starting and end point of arrow.
- Return type
Optional[Path]