astrohack.dio
¶
Module Contents¶
Functions¶
|
Open holog file and return instance of the holog data object. Object includes summary function to list available dictionary keys. |
|
Open image file and return instance of the image data object. Object includes summary function to list available dictionary keys. |
|
Open panel file and return instance of the panel data object. Object includes summary function to list available dictionary keys. |
|
Open locit file and return instance of the locit data object. Object includes summary function to list available dictionary keys. |
|
Open position file and return instance of the position data object. Object includes summary function to list available dictionary keys. |
|
Open pointing file and return instance of the pointing data object. Object includes summary function to list available dictionary keys. |
|
Fix pointing table for a user defined subset of reference antennas. |
|
Print formatted JSON dictionary (** Deprecated by Console **) |
|
Print formatted holography observation dictionary |
-
open_holog
(file: str) → astrohack.mds.AstrohackHologFile[source]¶ Open holog file and return instance of the holog data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path to holog file.
- Returns
Holography holog object.
- Return type
AstrohackHologFile Holog object allows the user to access holog data via compound dictionary keys with values, in order of depth, ddi -> map -> ant. The holog object also provides a summary() helper function to list available keys for each file. An outline of the holog object structure is show below:
holog_mds = { ddi_0:{ map_0:{ ant_0: holog_ds, ⋮ ant_n: holog_ds }, ⋮ map_p: … }, ⋮ ddi_m: … }
-
open_image
(file: str) → astrohack.mds.AstrohackImageFile[source]¶ Open image file and return instance of the image data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path to image file.
- Returns
Holography image object.
- Return type
AstrohackImageFile Image object allows the user to access image data via compound dictionary keys with values, in order of depth, ant -> ddi. The image object also provides a summary() helper function to list available keys for each file. An outline of the image object structure is show below:
image_mds = { ant_0:{ ddi_0: image_ds, ⋮ ddi_m: image_ds }, ⋮ ant_n: … }
-
open_panel
(file: str) → astrohack.mds.AstrohackPanelFile[source]¶ Open panel file and return instance of the panel data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path ot panel file.
- Returns
Holography panel object.
- Return type
AstrohackPanelFile Panel object allows the user to access panel data via compound dictionary keys with values, in order of depth, ant -> ddi. The panel object also provides a summary() helper function to list available keys for each file. An outline of the panel object structure is show below:
panel_mds = { ant_0:{ ddi_0: panel_ds, ⋮ ddi_m: panel_ds }, ⋮ ant_n: … }
-
open_locit
(file: str) → astrohack.mds.AstrohackLocitFile[source]¶ Open locit file and return instance of the locit data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path of locit file.
- Returns
locit object.
- Return type
AstrohackLocitFile Locit object allows the user to access locit data via compound dictionary keys with values, in order of depth, ant -> ddi. The locit object also provides a summary() helper function to list available keys for each file. An outline of the locit object structure is show below:
locit_mds = { ant_0:{ ddi_0: locit_ds, ⋮ ddi_m: locit_ds }, ⋮ ant_n: … }
-
open_position
(file: str) → astrohack.mds.AstrohackPositionFile[source]¶ Open position file and return instance of the position data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path of position file.
- Returns
position object.
- Return type
AstrohackPositionFile position object allows the user to access position data via compound dictionary keys with values, in order of depth, ant -> ddi. The position object also provides a summary() helper function to list available keys for each file. An outline of the position object structure is show below:
position_mds = { ant_0:{ ddi_0: position_ds, ⋮ ddi_m: position_ds }, ⋮ ant_n: … }
-
open_pointing
(file: str) → astrohack.mds.AstrohackPointFile[source]¶ Open pointing file and return instance of the pointing data object. Object includes summary function to list available dictionary keys.
- Parameters
file (str) – Path to pointing file.
- Returns
Holography pointing object.
- Return type
AstrohackPointFile Pointing object allows the user to access pointing data via dictionary key with value based on ant. The pointing object also provides a summary() helper function to list available keys for each file. An outline of the pointing object structure is show below:
point_mds = { ant_0: point_ds, ⋮ ant_n: point_ds }
-
fix_pointing_table
(ms_name: str, reference_antenna: List[str]) → None[source]¶ Fix pointing table for a user defined subset of reference antennas.
- Parameters
ms_name (str) – Measurement set name.
reference_antenna (list) – List of reference antennas.
Example Usage The fix_pointing_table function takes the measurement set name and a list of reference antennas.
import astrohack astrohack.dio.fix_pointing_table( ms_name="data/ea25_cal_small_before_fixed.split.ms", reference_antenna=["ea15"] )
-
print_json
(obj: JSON, indent: int = 6, columns: int = 7) → None[source]¶ Print formatted JSON dictionary (** Deprecated by Console **)
- Parameters
obj (JSON) – JSON object
indent (int, optional) – Indent to be used in JSON dictionary., defaults to 6
columns (int, optional) – Columns used to reshape the antenna list., defaults to 7
-
inspect_holog_obs_dict
(file: Union[str, IPython.display.JSON] = '.holog_obs_dict.json', style: str = 'static') → Union[NoReturn, IPython.display.JSON][source]¶ Print formatted holography observation dictionary
- Parameters
file (str | JSON, optional) – Input file, can be either JSON file or string., defaults to ‘.holog_obs_dict.json’
style (str, optional) – Print style of JSON dictionary. This can be static, formatted generalized print out or dynamic, prints a collapsible formatted dictionary, defaults to static
Example Usage The inspect_holog_obs_dict loads a holography observation dict either from disk or from memory (as an return value from generate_holog_obs_dict) and displays it in a more readable way like JSON.stringify() in javascript.
import astrohack astrohack.dio.inspect_holog_obs_dict(file=holog_obs_obj) >> ddi_0:{ map_0:{ scans:{ [ 8, 9, 10, 12, 13, 14, 16 17, 18, 23, 24, 25, 27, 28 29, 31, 32, 33, 38, 39, 40 42, 43, 44, 46, 47, 48, 53 54, 55, 57 ] } ant:{ ea06:{ [ ea04, ea25 ] } } } }