xradio 0.0.42__tar.gz → 0.0.43__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. {xradio-0.0.42/src/xradio.egg-info → xradio-0.0.43}/PKG-INFO +1 -1
  2. {xradio-0.0.42 → xradio-0.0.43}/pyproject.toml +1 -1
  3. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/conversion.py +43 -8
  4. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/create_field_and_source_xds.py +8 -3
  5. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/partition_queries.py +4 -0
  6. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/convert_msv2_to_processing_set.py +5 -0
  7. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/measurement_set_xds.py +34 -7
  8. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/processing_set.py +3 -3
  9. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/schema.py +35 -2
  10. {xradio-0.0.42 → xradio-0.0.43/src/xradio.egg-info}/PKG-INFO +1 -1
  11. {xradio-0.0.42 → xradio-0.0.43}/LICENSE.txt +0 -0
  12. {xradio-0.0.42 → xradio-0.0.43}/MANIFEST.in +0 -0
  13. {xradio-0.0.42 → xradio-0.0.43}/README.md +0 -0
  14. {xradio-0.0.42 → xradio-0.0.43}/setup.cfg +0 -0
  15. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/__init__.py +0 -0
  16. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/__init__.py +0 -0
  17. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/_casacore/tables.py +0 -0
  18. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/coord_math.py +0 -0
  19. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/list_and_array.py +0 -0
  20. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/schema.py +0 -0
  21. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/zarr/__init__.py +0 -0
  22. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/_utils/zarr/common.py +0 -0
  23. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/__init__.py +0 -0
  24. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/__init__.py +0 -0
  25. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_casacore/__init__.py +0 -0
  26. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_casacore/common.py +0 -0
  27. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_casacore/xds_from_casacore.py +0 -0
  28. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_casacore/xds_to_casacore.py +0 -0
  29. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_fits/xds_from_fits.py +0 -0
  30. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_zarr/common.py +0 -0
  31. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_zarr/xds_from_zarr.py +0 -0
  32. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_zarr/xds_to_zarr.py +0 -0
  33. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/_zarr/zarr_low_level.py +0 -0
  34. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/casacore.py +0 -0
  35. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/common.py +0 -0
  36. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/fits.py +0 -0
  37. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/image_factory.py +0 -0
  38. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/_util/zarr.py +0 -0
  39. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/image/image.py +0 -0
  40. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/__init__.py +0 -0
  41. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/__init__.py +0 -0
  42. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/load.py +0 -0
  43. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/load_main_table.py +0 -0
  44. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/read.py +0 -0
  45. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/read_main_table.py +0 -0
  46. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/read_subtables.py +0 -0
  47. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/table_query.py +0 -0
  48. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/write.py +0 -0
  49. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/_tables/write_exp_api.py +0 -0
  50. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/chunks.py +0 -0
  51. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/create_antenna_xds.py +0 -0
  52. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/descr.py +0 -0
  53. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/msv2_msv3.py +0 -0
  54. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/msv2_to_msv4_meta.py +0 -0
  55. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/msv4_info_dicts.py +0 -0
  56. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/msv4_sub_xdss.py +0 -0
  57. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/optimised_functions.py +0 -0
  58. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/partitions.py +0 -0
  59. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_msv2/subtables.py +0 -0
  60. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_utils/cds.py +0 -0
  61. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_utils/partition_attrs.py +0 -0
  62. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_utils/stokes_types.py +0 -0
  63. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_utils/xds_helper.py +0 -0
  64. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_zarr/encoding.py +0 -0
  65. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_zarr/read.py +0 -0
  66. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/_zarr/write.py +0 -0
  67. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/msv2.py +0 -0
  68. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/_utils/zarr.py +0 -0
  69. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/load_processing_set.py +0 -0
  70. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/measurement_set/open_processing_set.py +0 -0
  71. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/__init__.py +0 -0
  72. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/bases.py +0 -0
  73. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/check.py +0 -0
  74. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/dataclass.py +0 -0
  75. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/metamodel.py +0 -0
  76. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/schema/typing.py +0 -0
  77. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/sphinx/__init__.py +0 -0
  78. {xradio-0.0.42 → xradio-0.0.43}/src/xradio/sphinx/schema_table.py +0 -0
  79. {xradio-0.0.42 → xradio-0.0.43}/src/xradio.egg-info/SOURCES.txt +0 -0
  80. {xradio-0.0.42 → xradio-0.0.43}/src/xradio.egg-info/dependency_links.txt +0 -0
  81. {xradio-0.0.42 → xradio-0.0.43}/src/xradio.egg-info/requires.txt +0 -0
  82. {xradio-0.0.42 → xradio-0.0.43}/src/xradio.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xradio
3
- Version: 0.0.42
3
+ Version: 0.0.43
4
4
  Summary: Xarray Radio Astronomy Data IO
5
5
  Author-email: Jan-Willem Steeb <jsteeb@nrao.edu>
6
6
  License: BSD 3-Clause License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "xradio"
3
- version = "0.0.42"
3
+ version = "0.0.43"
4
4
  description = " Xarray Radio Astronomy Data IO"
5
5
  authors = [
6
6
  {name = "Jan-Willem Steeb", email="jsteeb@nrao.edu"},
@@ -687,6 +687,7 @@ def create_taql_query(partition_info):
687
687
  "FIELD_ID",
688
688
  "SCAN_NUMBER",
689
689
  "STATE_ID",
690
+ "ANTENNA1",
690
691
  ]
691
692
 
692
693
  taql_where = "WHERE "
@@ -696,6 +697,11 @@ def create_taql_query(partition_info):
696
697
  taql_where
697
698
  + f"({col_name} IN [{','.join(map(str, partition_info[col_name]))}]) AND"
698
699
  )
700
+ if col_name == "ANTENNA1":
701
+ taql_where = (
702
+ taql_where
703
+ + f"(ANTENNA2 IN [{','.join(map(str, partition_info[col_name]))}]) AND"
704
+ )
699
705
  taql_where = taql_where[:-3]
700
706
 
701
707
  return taql_where
@@ -950,7 +956,10 @@ def convert_and_write_partition(
950
956
  logger.debug("Time phase_calibration xds " + str(time.time() - start))
951
957
 
952
958
  # Change antenna_ids to antenna_names
953
- xds = antenna_ids_to_names(xds, ant_xds, is_single_dish)
959
+ with_antenna_partitioning = "ANTENNA1" in partition_info
960
+ xds = antenna_ids_to_names(
961
+ xds, ant_xds, is_single_dish, with_antenna_partitioning
962
+ )
954
963
  # but before, keep the name-id arrays, we need them for the pointing and weather xds
955
964
  ant_xds_name_ids = ant_xds["antenna_name"].set_xindex("antenna_id")
956
965
  ant_xds_station_name_ids = ant_xds["station"].set_xindex("antenna_id")
@@ -978,7 +987,6 @@ def convert_and_write_partition(
978
987
 
979
988
  # Create pointing_xds
980
989
  pointing_xds = xr.Dataset()
981
- print("with_pointing", with_pointing)
982
990
  if with_pointing:
983
991
  start = time.time()
984
992
  if pointing_interpolate:
@@ -1125,8 +1133,31 @@ def convert_and_write_partition(
1125
1133
 
1126
1134
 
1127
1135
  def antenna_ids_to_names(
1128
- xds: xr.Dataset, ant_xds: xr.Dataset, is_single_dish: bool
1136
+ xds: xr.Dataset,
1137
+ ant_xds: xr.Dataset,
1138
+ is_single_dish: bool,
1139
+ with_antenna_partitioning,
1129
1140
  ) -> xr.Dataset:
1141
+ """
1142
+ Turns the antenna_ids that we get from MSv2 into MSv4 antenna_name
1143
+
1144
+ Parameters
1145
+ ----------
1146
+ xds: xr.Dataset
1147
+ A main xds (MSv4)
1148
+ ant_xds: xr.Dataset
1149
+ The antenna_xds for this MSv4
1150
+ is_single_dish: bool
1151
+ Whether a single-dish ("spectrum" data) dataset
1152
+ with_antenna_partitioning: bool
1153
+ Whether the MSv4 partitions include the antenna axis => only
1154
+ one antenna (and implicitly one 'baseline' - auto-correlation)
1155
+
1156
+ Returns
1157
+ ----------
1158
+ xr.Dataset
1159
+ The main xds with antenna_id replaced with antenna_name
1160
+ """
1130
1161
  ant_xds = ant_xds.set_xindex(
1131
1162
  "antenna_id"
1132
1163
  ) # Allows for non-dimension coordinate selection.
@@ -1145,11 +1176,15 @@ def antenna_ids_to_names(
1145
1176
  }
1146
1177
  )
1147
1178
  else:
1148
- # baseline_antenna1_id will be removed soon below, but it is useful here to know the actual antenna_ids,
1149
- # as opposed to the baseline_ids which can mismatch when data is missing for some antennas
1150
- xds["baseline_id"] = ant_xds["antenna_name"].sel(
1151
- antenna_id=xds["baseline_antenna1_id"]
1152
- )
1179
+ if not with_antenna_partitioning:
1180
+ # baseline_antenna1_id will be removed soon below, but it is useful here to know the actual antenna_ids,
1181
+ # as opposed to the baseline_ids which can mismatch when data is missing for some antennas
1182
+ xds["baseline_id"] = ant_xds["antenna_name"].sel(
1183
+ antenna_id=xds["baseline_antenna1_id"]
1184
+ )
1185
+ else:
1186
+ xds["baseline_id"] = ant_xds["antenna_name"]
1187
+
1153
1188
  unwanted_coords_from_ant_xds = [
1154
1189
  "antenna_id",
1155
1190
  "antenna_name",
@@ -618,9 +618,14 @@ def extract_source_info(
618
618
 
619
619
  # This source table time is not the same as the time in the field_and_source_xds that is derived from the main MSv4 time axis.
620
620
  # The source_id maps to the time axis in the field_and_source_xds. That is why "if len(source_id) == 1" is used to check if there should be a time axis.
621
- assert len(source_xds.TIME) <= len(
622
- unique_source_id
623
- ), "Can only process source table with a single time entry for a source_id and spectral_window_id."
621
+ # assert len(source_xds.TIME) <= len(
622
+ # unique_source_id
623
+ # ), "Can only process source table with a single time entry for a source_id and spectral_window_id."
624
+ if len(source_xds.TIME) > len(unique_source_id):
625
+ logger.warning(
626
+ f"Source table has more than one time entry for a source_id and spectral_window_id. This is not currently supported. Only the first time entry will be used."
627
+ )
628
+ source_xds = source_xds.drop_duplicates("SOURCE_ID", keep="first")
624
629
 
625
630
  source_xds = source_xds.isel(TIME=0, SPECTRAL_WINDOW_ID=0, drop=True)
626
631
  source_column_description = source_xds.attrs["other"]["msv2"]["ctds_attrs"][
@@ -54,6 +54,7 @@ def create_partitions(in_file: str, partition_scheme: list):
54
54
  par_df["SCAN_NUMBER"] = main_tb.getcol("SCAN_NUMBER")
55
55
  par_df["STATE_ID"] = main_tb.getcol("STATE_ID")
56
56
  par_df["OBSERVATION_ID"] = main_tb.getcol("OBSERVATION_ID")
57
+ par_df["ANTENNA1"] = main_tb.getcol("ANTENNA1")
57
58
  par_df = par_df.drop_duplicates()
58
59
 
59
60
  field_tb = tables.table(
@@ -123,6 +124,9 @@ def create_partitions(in_file: str, partition_scheme: list):
123
124
  "OBS_MODE",
124
125
  "SUB_SCAN_NUMBER",
125
126
  ]
127
+ if "ANTENNA1" in partition_scheme:
128
+ partition_axis_names.append("ANTENNA1")
129
+
126
130
  for idx, pair in enumerated_partitions:
127
131
  query = ""
128
132
  for i, par in enumerate(partition_scheme_updated):
@@ -82,6 +82,11 @@ def convert_msv2_to_processing_set(
82
82
  + str(partition_info["FIELD_ID"])
83
83
  + ", SCAN "
84
84
  + str(partition_info["SCAN_NUMBER"])
85
+ + (
86
+ ", ANTENNA " + str(partition_info["ANTENNA1"])
87
+ if "ANTENNA1" in partition_info
88
+ else ""
89
+ )
85
90
  )
86
91
 
87
92
  # prepend '0' to ms_v4_id as needed
@@ -3,6 +3,8 @@ from xradio._utils.list_and_array import to_list
3
3
  import xarray as xr
4
4
  import numbers
5
5
  import os
6
+ from collections.abc import Mapping, Iterable
7
+ from typing import Any, Union
6
8
 
7
9
 
8
10
  class MeasurementSetXds(xr.Dataset):
@@ -53,16 +55,37 @@ class MeasurementSetXds(xr.Dataset):
53
55
  copy_cor_xds, os.path.join(store, "correlated_xds"), **kwargs
54
56
  )
55
57
 
56
- def sel(self, data_group_name=None, **kwargs):
58
+ def sel(
59
+ self,
60
+ indexers: Union[Mapping[Any, Any], None] = None,
61
+ method: Union[str, None] = None,
62
+ tolerance: Union[int, float, Iterable[Union[int, float]], None] = None,
63
+ drop: bool = False,
64
+ **indexers_kwargs: Any,
65
+ ):
57
66
  """
58
- Select data along dimension(s) by label.
59
-
60
- Args:
61
- **kwargs: Keyword arguments to be passed to `xarray.Dataset.sel`. See https://xarray.pydata.org/en/stable/generated/xarray.Dataset.sel.html for more information.
67
+ Select data along dimension(s) by label. Overrides `xarray.Dataset.sel <https://xarray.pydata.org/en/stable/generated/xarray.Dataset.sel.html>`__ so that a data group can be selected by name by using the `data_group_name` parameter.
68
+ For more information on data groups see `Data Groups <https://xradio.readthedocs.io/en/latest/measurement_set_overview.html#Data-Groups>`__ section. See `xarray.Dataset.sel <https://xarray.pydata.org/en/stable/generated/xarray.Dataset.sel.html>`__ for parameter descriptions.
62
69
 
63
70
  Returns:
64
71
  MeasurementSetXds
72
+
73
+ Examples
74
+ --------
75
+ >>> # Select data group 'corrected' and polarization 'XX'.
76
+ >>> selected_ms_xds = ms_xds.sel(data_group_name='corrected', polarization='XX')
77
+
78
+ >>> # Select data group 'corrected' and polarization 'XX' using a dict.
79
+ >>> selected_ms_xds = ms_xds.sel({'data_group_name':'corrected', 'polarization':'XX')
65
80
  """
81
+ if "data_group_name" in indexers_kwargs:
82
+ data_group_name = indexers_kwargs["data_group_name"]
83
+ del indexers_kwargs["data_group_name"]
84
+ if (indexers is not None) and ("data_group_name" in indexers):
85
+ data_group_name = indexers["data_group_name"]
86
+ del indexers["data_group_name"]
87
+ else:
88
+ data_group_name = None
66
89
 
67
90
  if data_group_name is not None:
68
91
  sel_data_group_set = set(
@@ -77,7 +100,11 @@ class MeasurementSetXds(xr.Dataset):
77
100
  data_variables_to_drop = list(set(data_variables_to_drop))
78
101
 
79
102
  return MeasurementSetXds(
80
- super().sel(**kwargs).drop_vars(data_variables_to_drop)
103
+ super()
104
+ .sel(indexers, method, tolerance, drop, **indexers_kwargs)
105
+ .drop_vars(data_variables_to_drop)
81
106
  )
82
107
  else:
83
- return MeasurementSetXds(super().sel(**kwargs))
108
+ return MeasurementSetXds(
109
+ super().sel(indexers, method, tolerance, drop, **indexers_kwargs)
110
+ )
@@ -312,7 +312,7 @@ class ProcessingSet(dict):
312
312
  ----------
313
313
  **kwargs : dict
314
314
  Keyword arguments representing dimension names and the labels to select along those dimensions.
315
- These are passed directly to the `xarray.Dataset.sel` method.
315
+ These are passed directly to the `xarray.Dataset.sel <https://docs.xarray.dev/en/latest/generated/xarray.Dataset.sel.html>`__ method.
316
316
 
317
317
  Returns
318
318
  -------
@@ -334,7 +334,7 @@ class ProcessingSet(dict):
334
334
  ----------
335
335
  **kwargs : dict
336
336
  Keyword arguments representing dimension names and the integer indices to select along those dimensions.
337
- These are passed directly to the `isel` method.
337
+ These are passed directly to the `xarray.Dataset.isel <https://docs.xarray.dev/en/latest/generated/xarray.Dataset.isel.html>`__ method.
338
338
 
339
339
  Returns
340
340
  -------
@@ -359,7 +359,7 @@ class ProcessingSet(dict):
359
359
  The filesystem path to the Zarr store directory where the data will be saved.
360
360
  **kwargs : dict, optional
361
361
  Additional keyword arguments to be passed to the `xarray.Dataset.to_zarr` method.
362
- Refer to the [xarray documentation](https://docs.xarray.dev/en/latest/generated/xarray.Dataset.to_zarr.html)
362
+ Refer to the `xarray.Dataset.to_zarr <https://docs.xarray.dev/en/latest/generated/xarray.Dataset.to_zarr.html>`__
363
363
  for available options.
364
364
 
365
365
  Returns
@@ -1573,6 +1573,36 @@ class WeatherXds:
1573
1573
  class PointingXds:
1574
1574
  """
1575
1575
  Pointing dataset: antenna pointing information.
1576
+
1577
+ In the past the relationship and definition of the pointing infromation has not been clear. Here we attempt to clarify it by explaining the relationship between the ASDM, MSv2 and MSv4 pointing information.
1578
+
1579
+ The following abreviations are used:
1580
+
1581
+ - M2: Measurement Set version 2
1582
+ - M4: Measurement Set version 4
1583
+ - A : ASDM
1584
+
1585
+ The following definitions come from the ASDM's `SDM Tables Short Description <https://drive.google.com/file/d/16a3g0GQxgcO7N_ZabfdtexQ8r2jRbYIS/view>`_ page 97-99:
1586
+
1587
+ - A_encoder: The values measured from the antenna. They may be however affected by metrology, if applied. Note that for ALMA this column will contain positions obtained using the AZ POSN RSP and EL POSN RSP monitor points of the ACU and not the GET AZ ENC and GET EL ENC monitor points (as these do not include the metrology corrections). It is agreed that the the vendor pointing model will never be applied. AZELNOWAntenna.position
1588
+ - A_pointingDirection: This is the commanded direction of the antenna. It is obtained by adding the target and offset columns, and then applying the pointing model referenced by PointingModelId. The pointing model can be the composition of the absolute pointing model and of a local pointing model. In that case their coefficients will both be in the PointingModel table.
1589
+ - A_target: This is the field center direction (as given in the Field Table), possibly affected by the optional antenna-based sourceOffset. This column is in horizontal coordinates. AZELNOWAntenna.position
1590
+ - A_offset: Additional offsets in horizontal coordinates (usually meant for measuring the pointing corrections, mapping the antenna beam, ...). AZELNOWAntenna.positiontarget
1591
+ - A_sourceOffset : Optionally, the antenna-based mapping offsets in the field. These are in the equatorial system, and used, for instance, in on-the-fly mapping when the antennas are driven independently across the field.
1592
+
1593
+ M2_DIRECTION = rotate(A_target,A_offset) #A_target is rotated to by A_offset
1594
+
1595
+ if withPointingCorrection : M2_DIRECTION = rotate(A_target,A_offset) + (A_encoder - A_pointingDirection)
1596
+
1597
+ M2_TARGET = A_target
1598
+ M2_POINTING_OFFSET = A_offset
1599
+ M2_ENCODER = A_encoder
1600
+
1601
+ It should be noted that definition of M2_direction is not consistent, it depends if withPointingCorrection is set to True or False (see the `importasdm documenation <https://casadocs.readthedocs.io/en/v6.2.0/api/tt/casatasks.data.importasdm.html#with-pointing-correction>`_ and `code <https://open-bitbucket.nrao.edu/projects/CASA/repos/casa6/browse/casatools/src/tools/sdm/sdm_cmpt.cc#2257>`_ for details).
1602
+
1603
+ M4_DIRECTION = M2_DIRECTION (withPointingCorrection=True)
1604
+ M4_ENCODER = M2_ENCODER
1605
+
1576
1606
  """
1577
1607
 
1578
1608
  antenna_name: Coordof[AntennaNameArray]
@@ -1595,7 +1625,7 @@ class PointingXds:
1595
1625
  LocalSkyCoordArray,
1596
1626
  ]
1597
1627
  """
1598
- Antenna pointing direction, optionally expressed as polynomial coefficients. DIRECTION in MSv3.
1628
+ The direction of the peak response of the beam and is equavalent to the MSv2 DIRECTION (M2_direction) with_pointing_correction=True, optionally expressed as polynomial coefficients.
1599
1629
  """
1600
1630
 
1601
1631
  time: Optional[Coordof[TimeInterpolatedCoordArray]] = None
@@ -1619,11 +1649,14 @@ class PointingXds:
1619
1649
  ] = None
1620
1650
  """
1621
1651
  The current encoder values on the primary axes of the mount type for
1622
- the antenna. ENCODER in MSv3.
1652
+ the antenna. ENCODER in MSv2 (M2_encoder).
1623
1653
  """
1624
1654
  POINTING_OVER_THE_TOP: Optional[
1625
1655
  Data[Union[tuple[Time, AntennaName], tuple[TimePointing, AntennaName]], bool]
1626
1656
  ] = None
1657
+ """
1658
+ True if the antenna was driven to this position ”over the top” (az-el mount).
1659
+ """
1627
1660
 
1628
1661
  # Attributes
1629
1662
  type: Attr[Literal["pointing"]] = "pointing"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xradio
3
- Version: 0.0.42
3
+ Version: 0.0.43
4
4
  Summary: Xarray Radio Astronomy Data IO
5
5
  Author-email: Jan-Willem Steeb <jsteeb@nrao.edu>
6
6
  License: BSD 3-Clause License
File without changes
File without changes
File without changes
File without changes
File without changes