astrohack 1.0.2__tar.gz → 1.1.0__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.
- {astrohack-1.0.2/src/astrohack.egg-info → astrohack-1.1.0}/PKG-INFO +6 -11
- {astrohack-1.0.2 → astrohack-1.1.0}/README.rst +4 -4
- {astrohack-1.0.2 → astrohack-1.1.0}/pyproject.toml +7 -3
- astrohack-1.1.0/src/astrohack/__init__.py +66 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/antenna_surface.py +28 -39
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/base_panel.py +3 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/panel_fitting.py +1 -4
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/polygon_panel.py +4 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/ring_panel.py +2 -1
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/antenna/telescope.py +10 -14
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/beamcut.py +10 -11
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/cassegrain_ray_tracing.py +21 -8
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/combine.py +2 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/beamcut_mds.param.json +5 -5
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/extract_holog.param.json +1 -1
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/extract_pointing.param.json +0 -5
- astrohack-1.1.0/src/astrohack/config/fringefit_locit.param.json +51 -0
- astrohack-1.1.0/src/astrohack/config/locit_mds.param.json +212 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/panel_mds.param.json +5 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/position_mds.param.json +9 -1
- astrohack-1.1.0/src/astrohack/core/__init__.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/beamcut.py +110 -29
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/cassegrain_ray_tracing.py +15 -13
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/combine.py +4 -3
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/extract_holog.py +104 -129
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/extract_locit.py +27 -10
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/extract_pointing.py +46 -26
- astrohack-1.1.0/src/astrohack/core/fringefit_locit.py +260 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/holog.py +1 -1
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/holog_obs_dict.py +15 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/image_comparison_tool.py +13 -10
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/locit.py +22 -8
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/core/panel.py +3 -5
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vla.zarr/.zattrs +18 -11
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vla.zarr/.zmetadata +18 -11
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/extract_holog.py +8 -8
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/extract_locit.py +3 -3
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/extract_pointing.py +5 -6
- astrohack-1.1.0/src/astrohack/fringefit_locit.py +152 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/holog.py +4 -4
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/image_comparison_tool.py +3 -3
- astrohack-1.1.0/src/astrohack/io/__init__.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/base_mds.py +16 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/beamcut_mds.py +64 -98
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/dio.py +10 -9
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/holog_mds.py +56 -58
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/image_mds.py +53 -66
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/locit_mds.py +34 -17
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/panel_mds.py +42 -49
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/point_mds.py +13 -13
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/io/position_mds.py +75 -54
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/locit.py +8 -6
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/panel.py +3 -4
- astrohack-1.1.0/src/astrohack/scripts/__init__.py +0 -0
- astrohack-1.1.0/src/astrohack/scripts/baseline/__init__.py +0 -0
- astrohack-1.1.0/src/astrohack/scripts/baseline/baseline_reduction_pipeline.py +818 -0
- astrohack-1.1.0/src/astrohack/scripts/beamcuts/__init__.py +0 -0
- astrohack-1.1.0/src/astrohack/scripts/beamcuts/beamcut_reduction_pipeline.py +505 -0
- astrohack-1.1.0/src/astrohack/scripts/verification/__init__.py +0 -0
- astrohack-1.1.0/src/astrohack/scripts/verification/execute-and-upload-tests.py +260 -0
- astrohack-1.1.0/src/astrohack/scripts/verification/file_uploader.py +200 -0
- astrohack-1.1.0/src/astrohack/utils/__init__.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/algorithms.py +1 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/constants.py +1 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/conversion.py +5 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/file.py +4 -4
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/fits.py +8 -6
- astrohack-1.1.0/src/astrohack/utils/graph.py +309 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/gridding.py +6 -4
- astrohack-1.1.0/src/astrohack/utils/package_info.py +12 -0
- astrohack-1.1.0/src/astrohack/utils/pipeline_support.py +318 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/ray_tracing_general.py +6 -1
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/text.py +230 -28
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/validation.py +2 -2
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/verification_tools.py +31 -12
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/zernike_aperture_fitting.py +1 -1
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/visualization/array_cfg_plot.py +54 -10
- astrohack-1.1.0/src/astrohack/visualization/observation_summary.py +60 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/visualization/plot_tools.py +212 -102
- {astrohack-1.0.2 → astrohack-1.1.0/src/astrohack.egg-info}/PKG-INFO +6 -11
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack.egg-info/SOURCES.txt +14 -2
- astrohack-1.1.0/src/astrohack.egg-info/entry_points.txt +3 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack.egg-info/requires.txt +5 -12
- astrohack-1.0.2/src/astrohack/__init__.py +0 -43
- astrohack-1.0.2/src/astrohack/antenna/__init__.py +0 -5
- astrohack-1.0.2/src/astrohack/config/locit_mds.param.json +0 -95
- astrohack-1.0.2/src/astrohack/io/__init__.py +0 -9
- astrohack-1.0.2/src/astrohack/utils/__init__.py +0 -5
- astrohack-1.0.2/src/astrohack/utils/graph.py +0 -165
- astrohack-1.0.2/src/astrohack/utils/veritas.py +0 -160
- astrohack-1.0.2/src/astrohack/visualization/__init__.py +0 -10
- astrohack-1.0.2/src/astrohack/visualization/observation_summary.py +0 -44
- {astrohack-1.0.2 → astrohack-1.1.0}/LICENSE +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/MANIFEST.in +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/setup.cfg +0 -0
- {astrohack-1.0.2/src/astrohack/core → astrohack-1.1.0/src/astrohack/antenna}/__init__.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/beamcut.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/cassegrain_ray_tracing.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/combine.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/create_param_json.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/dask.config.yaml +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/extract_locit.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/holog.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/holog_mds.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/image_comparison_tool.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/image_mds.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/locit.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/panel.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/config/point_mds.param.json +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/aca_7m.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/aca_7m.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/aca_7m.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_da.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_da.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_da.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_dv.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_dv.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_dv.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_tp.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_tp.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/alma_tp.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/fix_telescope_files.bash +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/point_cloud/.zarray +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/point_cloud/0.0 +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/qps_coefficients/.zarray +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/qps_coefficients/0 +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vla.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vlba.zarr/.zattrs +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vlba.zarr/.zgroup +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/data/telescopes/vlba.zarr/.zmetadata +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/imaging.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/phase_fitting.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack/utils/tools.py +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack.egg-info/dependency_links.txt +0 -0
- {astrohack-1.0.2 → astrohack-1.1.0}/src/astrohack.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astrohack
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Holography Antenna Commissioning Kit
|
|
5
5
|
Author-email: Joshua Hoskins <jhoskins@nrao.edu>, Victor de Souza Magalhaes <vdesouza@nrao.edu>, Jan-Willem Steeb <jsteeb@nrao.edu>
|
|
6
6
|
Requires-Python: <3.14,>=3.11
|
|
@@ -29,18 +29,13 @@ Requires-Dist: zarr<3.0.0
|
|
|
29
29
|
Requires-Dist: bokeh
|
|
30
30
|
Requires-Dist: pillow
|
|
31
31
|
Requires-Dist: jupyterlab
|
|
32
|
-
Requires-Dist:
|
|
32
|
+
Requires-Dist: casacoretables>=0.0.3
|
|
33
33
|
Provides-Extra: docs
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist: ipython; extra == "docs"
|
|
37
|
-
Requires-Dist: jupyter-client; extra == "docs"
|
|
34
|
+
Requires-Dist: pandoc; extra == "docs"
|
|
35
|
+
Requires-Dist: sphinx-autosummary-accessors; extra == "docs"
|
|
38
36
|
Requires-Dist: nbsphinx; extra == "docs"
|
|
37
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
39
38
|
Requires-Dist: recommonmark; extra == "docs"
|
|
40
|
-
Requires-Dist: scanpydoc; extra == "docs"
|
|
41
39
|
Requires-Dist: sphinx-autoapi; extra == "docs"
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
44
|
-
Requires-Dist: twine; extra == "docs"
|
|
45
|
-
Requires-Dist: pandoc; extra == "docs"
|
|
40
|
+
Requires-Dist: ipython; extra == "docs"
|
|
46
41
|
Dynamic: license-file
|
|
@@ -33,16 +33,16 @@ holography and antenna position corrections.
|
|
|
33
33
|
|
|
34
34
|
Currently AstroHACK supports:
|
|
35
35
|
|
|
36
|
-
- `Astronomical holographies from the VLA <https://astrohack.readthedocs.io/en/stable/
|
|
36
|
+
- `Astronomical holographies from the VLA <https://astrohack.readthedocs.io/en/stable/tutorials/vla_holography_tutorial.html>`_.
|
|
37
37
|
- Astronomical holographies from ALMA.
|
|
38
|
-
- `Antenna position corrections for the VLA <https://astrohack.readthedocs.io/en/stable/locit_tutorial>`_.
|
|
39
|
-
- `Near-field ALMA holographies
|
|
38
|
+
- `Antenna position corrections for the VLA <https://astrohack.readthedocs.io/en/stable/tutorials/locit_tutorial.html>`_.
|
|
39
|
+
- `Near-field ALMA holographies <https://astrohack.readthedocs.io/en/stable/online_pages/AstroHACK-for-NF-ALMA.html>`_ have
|
|
40
40
|
basic support, such as the creation of Aperture images, but the
|
|
41
41
|
correction of near-field effects is not yet supported.
|
|
42
42
|
|
|
43
43
|
In the near term we are working to support the `ngVLA antenna
|
|
44
44
|
prototype <https://public.nrao.edu/ngvla/>`_ comissioning activities.
|
|
45
|
-
The prototype antenna is currently (
|
|
45
|
+
The prototype antenna is currently (August 2026) under imital testing at
|
|
46
46
|
the VLA site.
|
|
47
47
|
|
|
48
48
|
The holography tasks in AstroHACK port much of the functionality of
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "astrohack"
|
|
3
|
-
version = "1.0
|
|
3
|
+
version = "1.1.0"
|
|
4
4
|
description = "Holography Antenna Commissioning Kit"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">= 3.11, < 3.14"
|
|
7
|
-
dependencies = [ "astropy", "dask", "shapely", "distributed", "toolviper", "ipywidgets", "matplotlib", "numba>=0.57.0", "numpy<=2.2", "prettytable", "pycryptodome", "pytest", "pytest-cov", "pytest-html", "scikit_image", "scikit-learn", "scipy", "rich", "xarray", "zarr<3.0.0", "bokeh", "pillow", "jupyterlab", "
|
|
7
|
+
dependencies = [ "astropy", "dask", "shapely", "distributed", "toolviper", "ipywidgets", "matplotlib", "numba>=0.57.0", "numpy<=2.2", "prettytable", "pycryptodome", "pytest", "pytest-cov", "pytest-html", "scikit_image", "scikit-learn", "scipy", "rich", "xarray", "zarr<3.0.0", "bokeh", "pillow", "jupyterlab", "casacoretables>=0.0.3",]
|
|
8
8
|
[[project.authors]]
|
|
9
9
|
name = "Joshua Hoskins"
|
|
10
10
|
email = "jhoskins@nrao.edu"
|
|
@@ -21,4 +21,8 @@ email = "jsteeb@nrao.edu"
|
|
|
21
21
|
file = "LICENSE.txt"
|
|
22
22
|
|
|
23
23
|
[project.optional-dependencies]
|
|
24
|
-
docs = [ "
|
|
24
|
+
docs = [ "pandoc", "sphinx-autosummary-accessors", "nbsphinx", "sphinx_rtd_theme", "recommonmark", "sphinx-autoapi", "ipython",]
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
beamcut-reduction-pipeline = "astrohack.scripts.beamcuts.beamcut_reduction_pipeline:main"
|
|
28
|
+
baseline-reduction-pipeline = "astrohack.scripts.baseline.baseline_reduction_pipeline:main"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from importlib.metadata import version
|
|
3
|
+
|
|
4
|
+
__version__ = version("astrohack")
|
|
5
|
+
|
|
6
|
+
from astrohack.io.dio import open_beamcut as open_beamcut
|
|
7
|
+
from astrohack.io.dio import open_position as open_position
|
|
8
|
+
from astrohack.io.dio import open_image as open_image
|
|
9
|
+
from astrohack.io.dio import open_locit as open_locit
|
|
10
|
+
from astrohack.io.dio import open_panel as open_panel
|
|
11
|
+
from astrohack.io.dio import open_pointing as open_pointing
|
|
12
|
+
from astrohack.io.dio import open_holog as open_holog
|
|
13
|
+
|
|
14
|
+
from astrohack.io.point_mds import AstrohackPointFile as AstrohackPointFile
|
|
15
|
+
from astrohack.io.locit_mds import AstrohackLocitFile as AstrohackLocitFile
|
|
16
|
+
from astrohack.io.holog_mds import AstrohackHologFile as AstrohackHologFile
|
|
17
|
+
from astrohack.io.panel_mds import AstrohackPanelFile as AstrohackPanelFile
|
|
18
|
+
from astrohack.io.beamcut_mds import AstrohackBeamcutFile as AstrohackBeamcutFile
|
|
19
|
+
from astrohack.io.position_mds import AstrohackPositionFile as AstrohackPositionFile
|
|
20
|
+
from astrohack.io.image_mds import AstrohackImageFile as AstrohackImageFile
|
|
21
|
+
|
|
22
|
+
from .extract_holog import extract_holog as extract_holog
|
|
23
|
+
from .extract_holog import generate_holog_obs_dict as generate_holog_obs_dict
|
|
24
|
+
from .beamcut import beamcut as beamcut
|
|
25
|
+
from .extract_pointing import extract_pointing as extract_pointing
|
|
26
|
+
from .holog import holog as holog
|
|
27
|
+
from .panel import panel as panel
|
|
28
|
+
from .combine import combine as combine
|
|
29
|
+
from .locit import locit as locit
|
|
30
|
+
from .extract_locit import extract_locit as extract_locit
|
|
31
|
+
from .fringefit_locit import fringefit_locit as fringefit_locit
|
|
32
|
+
from .cassegrain_ray_tracing import (
|
|
33
|
+
cassegrain_ray_tracing_pipeline as cassegrain_ray_tracing_pipeline,
|
|
34
|
+
)
|
|
35
|
+
from .cassegrain_ray_tracing import (
|
|
36
|
+
create_ray_tracing_telescope_parameter_dict as create_ray_tracing_telescope_parameter_dict,
|
|
37
|
+
)
|
|
38
|
+
from .cassegrain_ray_tracing import plot_2d_maps_from_rt_xds as plot_2d_maps_from_rt_xds
|
|
39
|
+
from .cassegrain_ray_tracing import (
|
|
40
|
+
plot_radial_projection_from_rt_xds as plot_radial_projection_from_rt_xds,
|
|
41
|
+
)
|
|
42
|
+
from .cassegrain_ray_tracing import (
|
|
43
|
+
apply_holog_phase_fitting_to_rt_xds as apply_holog_phase_fitting_to_rt_xds,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
from .image_comparison_tool import compare_fits_images as compare_fits_images
|
|
47
|
+
from .image_comparison_tool import (
|
|
48
|
+
rms_table_from_zarr_datatree as rms_table_from_zarr_datatree,
|
|
49
|
+
)
|
|
50
|
+
from .antenna.telescope import get_proper_telescope as get_proper_telescope
|
|
51
|
+
|
|
52
|
+
# This installs a slick, informational tracebacks logger
|
|
53
|
+
from rich.traceback import install
|
|
54
|
+
from toolviper.utils.logger import setup_logger
|
|
55
|
+
|
|
56
|
+
install(show_locals=False)
|
|
57
|
+
|
|
58
|
+
if not os.getenv("LOGGER_NAME"):
|
|
59
|
+
os.environ["LOGGER_NAME"] = "astrohack"
|
|
60
|
+
setup_logger(
|
|
61
|
+
logger_name="astrohack",
|
|
62
|
+
log_to_term=True,
|
|
63
|
+
log_to_file=False,
|
|
64
|
+
log_file="astrohack-logfile",
|
|
65
|
+
log_level="INFO",
|
|
66
|
+
)
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import xarray as xr
|
|
2
|
+
import numpy as np
|
|
2
3
|
|
|
3
4
|
from matplotlib import patches
|
|
4
5
|
|
|
5
6
|
import toolviper.utils.logger as logger
|
|
6
7
|
|
|
7
8
|
from astrohack.antenna.telescope import get_proper_telescope
|
|
8
|
-
from astrohack.utils import (
|
|
9
|
-
string_to_ascii_file,
|
|
10
|
-
create_dataset_label,
|
|
9
|
+
from astrohack.utils.algorithms import (
|
|
11
10
|
data_statistics,
|
|
12
|
-
statistics_to_text,
|
|
13
11
|
phase_wrapping,
|
|
14
12
|
)
|
|
15
|
-
from astrohack.utils.constants import
|
|
13
|
+
from astrohack.utils.constants import clight, fourpi
|
|
16
14
|
from astrohack.utils.conversion import to_db
|
|
17
15
|
from astrohack.utils.conversion import convert_unit
|
|
18
16
|
from astrohack.utils.text import (
|
|
@@ -20,6 +18,12 @@ from astrohack.utils.text import (
|
|
|
20
18
|
bool_to_str,
|
|
21
19
|
format_frequency,
|
|
22
20
|
format_value_unit,
|
|
21
|
+
string_to_ascii_file,
|
|
22
|
+
create_dataset_label,
|
|
23
|
+
statistics_to_text,
|
|
24
|
+
lnbr,
|
|
25
|
+
spc,
|
|
26
|
+
create_informative_label_from_summary,
|
|
23
27
|
)
|
|
24
28
|
from astrohack.visualization.plot_tools import (
|
|
25
29
|
create_figure_and_axes,
|
|
@@ -36,7 +40,6 @@ from astrohack.utils.fits import (
|
|
|
36
40
|
put_axis_in_fits_header,
|
|
37
41
|
)
|
|
38
42
|
|
|
39
|
-
lnbr = "\n"
|
|
40
43
|
SUPPORTED_POL_STATES = ["I", "RR", "LL", "XX", "YY"]
|
|
41
44
|
|
|
42
45
|
|
|
@@ -137,11 +140,9 @@ class AntennaSurface:
|
|
|
137
140
|
.values
|
|
138
141
|
)
|
|
139
142
|
|
|
140
|
-
self.npoint = np.sqrt(inputxds.sizes["l"] ** 2 + inputxds.sizes["m"] ** 2)
|
|
141
143
|
self.amp_unit = "V"
|
|
142
144
|
self.u_axis = inputxds.u_prime.values
|
|
143
145
|
self.v_axis = inputxds.v_prime.values
|
|
144
|
-
self.computephase = False
|
|
145
146
|
|
|
146
147
|
def _read_panel_xds(self, inputxds):
|
|
147
148
|
self.wavelength = inputxds.attrs["wavelength"]
|
|
@@ -242,7 +243,7 @@ class AntennaSurface:
|
|
|
242
243
|
while fraction_in < threshold:
|
|
243
244
|
clip *= multiplier
|
|
244
245
|
data_in = np.where(in_disk_amp > clip, 1.0, 0.0)
|
|
245
|
-
fraction_in = np.sum(data_in) / n_in_disk
|
|
246
|
+
fraction_in = float(np.sum(data_in)) / n_in_disk
|
|
246
247
|
multiplier *= step_multiplier
|
|
247
248
|
|
|
248
249
|
return clip
|
|
@@ -269,23 +270,6 @@ class AntennaSurface:
|
|
|
269
270
|
self.amplitude = np.where(self.base_mask, self.amplitude, np.nan)
|
|
270
271
|
self.deviation = np.where(self.base_mask, self.deviation, np.nan)
|
|
271
272
|
|
|
272
|
-
def _fetch_panel_ringed(self, ring, panel):
|
|
273
|
-
"""
|
|
274
|
-
Fetch a panel object from the panel list using its ring and panel numbers,
|
|
275
|
-
specific for circular antennas with panels arranged in rings
|
|
276
|
-
Args:
|
|
277
|
-
ring: Ring number
|
|
278
|
-
panel: Panel number
|
|
279
|
-
|
|
280
|
-
Returns:
|
|
281
|
-
Panel object
|
|
282
|
-
"""
|
|
283
|
-
if ring == 1:
|
|
284
|
-
ipanel = panel - 1
|
|
285
|
-
else:
|
|
286
|
-
ipanel = np.sum(self.telescope.n_panel_per_ring[: ring - 1]) + panel - 1
|
|
287
|
-
return self.panels[ipanel]
|
|
288
|
-
|
|
289
273
|
def gains(self):
|
|
290
274
|
"""
|
|
291
275
|
Computes antenna gains in decibels before and after panel surface fitting
|
|
@@ -414,7 +398,7 @@ class AntennaSurface:
|
|
|
414
398
|
plotmask = np.where(self.mask, 1, np.nan)
|
|
415
399
|
plotname = add_prefix(basename, f"{caller}_mask")
|
|
416
400
|
parm_dict["z_lim"] = [0, 1]
|
|
417
|
-
parm_dict["unit"] =
|
|
401
|
+
parm_dict["unit"] = spc
|
|
418
402
|
self._plot_map(plotname, plotmask, "Mask", parm_dict)
|
|
419
403
|
|
|
420
404
|
def plot_amplitude(self, basename, caller, parm_dict):
|
|
@@ -516,8 +500,8 @@ class AntennaSurface:
|
|
|
516
500
|
raise ValueError("Map list and label list must be of the same size")
|
|
517
501
|
nplots = len(maps)
|
|
518
502
|
if parm_dict["z_lim"] is None or parm_dict["z_lim"] == "None":
|
|
519
|
-
vmax =
|
|
520
|
-
np.abs(factor * maps[0])
|
|
503
|
+
vmax = float(
|
|
504
|
+
np.nanmax(np.abs(factor * maps[0]))
|
|
521
505
|
) # Gotten from the original map (displays the biggest variation)
|
|
522
506
|
parm_dict["z_lim"] = [-vmax, vmax]
|
|
523
507
|
for iplot in range(nplots):
|
|
@@ -551,7 +535,8 @@ class AntennaSurface:
|
|
|
551
535
|
ax, screws=parm_dict["plot_screws"], label=parm_dict["panel_labels"]
|
|
552
536
|
)
|
|
553
537
|
|
|
554
|
-
suptitle =
|
|
538
|
+
suptitle = create_informative_label_from_summary(self.summary, "deg")
|
|
539
|
+
suptitle += f", Pol. state: {self.pol_state}"
|
|
555
540
|
close_figure(fig, suptitle, filename, parm_dict["dpi"], parm_dict["display"])
|
|
556
541
|
|
|
557
542
|
def _add_resolution_to_plot(self, ax, xpos=0.9, ypos=0.1):
|
|
@@ -603,14 +588,14 @@ class AntennaSurface:
|
|
|
603
588
|
fig, ax = create_figure_and_axes(parm_dict["figure_size"], [1, 1])
|
|
604
589
|
|
|
605
590
|
fac = convert_unit("m", unit, "length")
|
|
606
|
-
vmax = np.nanmax(np.abs(fac * self.screw_adjustments))
|
|
591
|
+
vmax = float(np.nanmax(np.abs(fac * self.screw_adjustments)))
|
|
607
592
|
vmin = -vmax
|
|
608
593
|
if threshold is None or threshold == "None":
|
|
609
594
|
threshold = 0.1 * vmax
|
|
610
595
|
else:
|
|
611
596
|
threshold = np.abs(threshold)
|
|
612
597
|
|
|
613
|
-
ax.set_title(f"
|
|
598
|
+
ax.set_title(f"{lnbr}Threshold = {threshold:.2f} {unit}", fontsize="small")
|
|
614
599
|
# set the limits of the plot to the limits of the data
|
|
615
600
|
extent = compute_extent(self.u_axis, self.v_axis)
|
|
616
601
|
im = ax.imshow(
|
|
@@ -643,7 +628,8 @@ class AntennaSurface:
|
|
|
643
628
|
ax, cmap, fac * self.screw_adjustments[ipanel], threshold, vmin, vmax
|
|
644
629
|
)
|
|
645
630
|
|
|
646
|
-
suptitle =
|
|
631
|
+
suptitle = create_informative_label_from_summary(self.summary, "deg")
|
|
632
|
+
suptitle += f", Pol. state: {self.pol_state}"
|
|
647
633
|
close_figure(fig, suptitle, filename, parm_dict["dpi"], parm_dict["display"])
|
|
648
634
|
|
|
649
635
|
def _build_panel_data_arrays(self):
|
|
@@ -685,22 +671,26 @@ class AntennaSurface:
|
|
|
685
671
|
unit: unit for panel screw adjustments ['mm','miliinches']
|
|
686
672
|
comment_char: Character used for comments
|
|
687
673
|
"""
|
|
688
|
-
|
|
674
|
+
date_str = create_informative_label_from_summary(self.summary, "deg").split(
|
|
675
|
+
","
|
|
676
|
+
)[-1]
|
|
677
|
+
outfile = f"# Screw adjustments for {self.telescope.name}'s {self.label}, pol. state {self.pol_state}{lnbr}"
|
|
678
|
+
outfile += f"# Observation date:{date_str}{lnbr}"
|
|
689
679
|
freq = clight / self.wavelength
|
|
690
680
|
rmses = self.get_rms(unit)
|
|
691
681
|
outfile += f"# Frequency = {format_frequency(freq)}{lnbr}"
|
|
692
682
|
if unit == "mm":
|
|
693
|
-
outfile += f"# Antenna surface RMS before adjustment: {format_value_unit(rmses[0], unit)}
|
|
694
|
-
outfile += f"# Antenna surface RMS after adjustment: {format_value_unit(rmses[1], unit)}
|
|
683
|
+
outfile += f"# Antenna surface RMS before adjustment: {format_value_unit(rmses[0], unit)}{lnbr}"
|
|
684
|
+
outfile += f"# Antenna surface RMS after adjustment: {format_value_unit(rmses[1], unit)}{lnbr}"
|
|
695
685
|
else:
|
|
696
686
|
mmrms = self.get_rms("mm")
|
|
697
687
|
outfile += (
|
|
698
688
|
f"# Antenna surface RMS before adjustment: {format_value_unit(rmses[0], unit)} or "
|
|
699
|
-
f'{format_value_unit(mmrms[0], "mm")}
|
|
689
|
+
f'{format_value_unit(mmrms[0], "mm")}{lnbr}'
|
|
700
690
|
)
|
|
701
691
|
outfile += (
|
|
702
692
|
f"# Antenna surface RMS after adjustment: {format_value_unit(rmses[1], unit)} or "
|
|
703
|
-
f'{format_value_unit(mmrms[1], "mm")}
|
|
693
|
+
f'{format_value_unit(mmrms[1], "mm")}{lnbr}'
|
|
704
694
|
)
|
|
705
695
|
outfile += "# Lower means away from subreflector" + lnbr
|
|
706
696
|
outfile += "# Raise means toward the subreflector" + lnbr
|
|
@@ -708,7 +698,6 @@ class AntennaSurface:
|
|
|
708
698
|
outfile += "# RAISE the panel if the number is NEGATIVE" + lnbr
|
|
709
699
|
outfile += "# Adjustments are in " + unit + lnbr
|
|
710
700
|
outfile += lnbr
|
|
711
|
-
spc = " "
|
|
712
701
|
outfile += f"{comment_char} Panel{2*spc}"
|
|
713
702
|
nscrews = len(self.telescope.screw_description)
|
|
714
703
|
for screw in self.telescope.screw_description:
|
|
@@ -4,8 +4,9 @@ from matplotlib import pyplot as plt
|
|
|
4
4
|
from matplotlib.colors import Normalize
|
|
5
5
|
|
|
6
6
|
from astrohack.antenna.panel_fitting import PANEL_MODEL_DICT, PanelPoint, PanelModel
|
|
7
|
-
from astrohack.utils.constants import
|
|
8
|
-
from astrohack.utils import convert_unit
|
|
7
|
+
from astrohack.utils.constants import pi, fontsize, markersize
|
|
8
|
+
from astrohack.utils.conversion import convert_unit
|
|
9
|
+
import numpy as np
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class BasePanel:
|
|
@@ -3,7 +3,7 @@ import scipy.optimize as opt
|
|
|
3
3
|
|
|
4
4
|
import toolviper.utils.logger as logger
|
|
5
5
|
|
|
6
|
-
from astrohack.utils import gauss_elimination, least_squares_jit
|
|
6
|
+
from astrohack.utils.algorithms import gauss_elimination, least_squares_jit
|
|
7
7
|
|
|
8
8
|
###################################
|
|
9
9
|
# General purpose #
|
|
@@ -694,6 +694,3 @@ class PanelPoint:
|
|
|
694
694
|
|
|
695
695
|
def __repr__(self):
|
|
696
696
|
return f"{self.xc}, {self.yc}, {self.ix}, {self.iy}, {self.value}"
|
|
697
|
-
|
|
698
|
-
def get_array(self):
|
|
699
|
-
return np.array([self.xc, self.yc, self.ix, self.iy, self.value])
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
from shapely import Polygon, Point
|
|
2
2
|
from shapely.plotting import plot_polygon
|
|
3
3
|
|
|
4
|
-
from astrohack.utils import markersize
|
|
4
|
+
from astrohack.utils.constants import markersize
|
|
5
5
|
from astrohack.antenna.base_panel import BasePanel
|
|
6
6
|
from astrohack.antenna.panel_fitting import PanelPoint
|
|
7
7
|
import numpy as np
|
|
8
8
|
|
|
9
|
+
from astrohack.utils.text import spc
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
class PolygonPanel(BasePanel):
|
|
11
13
|
|
|
@@ -89,7 +91,7 @@ class PolygonPanel(BasePanel):
|
|
|
89
91
|
"""
|
|
90
92
|
print("########################################")
|
|
91
93
|
print("{0:20s}={1:8d}".format("label", self.label))
|
|
92
|
-
print("{0:20s}={1:8s}".format("model",
|
|
94
|
+
print("{0:20s}={1:8s}".format("model", spc + self.model_name))
|
|
93
95
|
print("{0:20s}={1:8d}".format("nsamp", len(self.samples)))
|
|
94
96
|
if verbose:
|
|
95
97
|
for sample in self.samples:
|
|
@@ -2,6 +2,7 @@ import numpy as np
|
|
|
2
2
|
from matplotlib import pyplot as plt
|
|
3
3
|
from astrohack.antenna.base_panel import BasePanel, markersize
|
|
4
4
|
from astrohack.antenna.panel_fitting import PanelPoint
|
|
5
|
+
from astrohack.utils.text import spc
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class RingPanel(BasePanel):
|
|
@@ -139,7 +140,7 @@ class RingPanel(BasePanel):
|
|
|
139
140
|
"""
|
|
140
141
|
print("########################################")
|
|
141
142
|
print("{0:20s}={1:8s}".format("ipanel", self.label))
|
|
142
|
-
print("{0:20s}={1:8s}".format("model",
|
|
143
|
+
print("{0:20s}={1:8s}".format("model", spc + self.model_name))
|
|
143
144
|
print("{0:20s}={1:8.5f}".format("inrad", self.inrad))
|
|
144
145
|
print("{0:20s}={1:8.5f}".format("ourad", self.ourad))
|
|
145
146
|
print("{0:20s}={1:8.5f}".format("theta1", self.theta1))
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
from shapely.geometry.point import Point
|
|
2
2
|
from shapely.geometry.polygon import Polygon
|
|
3
3
|
from shapely.strtree import STRtree
|
|
4
|
-
|
|
5
|
-
import astrohack
|
|
4
|
+
import numpy as np
|
|
6
5
|
import pathlib
|
|
7
6
|
|
|
8
7
|
import xarray as xr
|
|
9
8
|
import toolviper.utils.logger as logger
|
|
10
9
|
|
|
11
|
-
import astrohack.utils.tools
|
|
12
10
|
from astrohack.antenna.polygon_panel import PolygonPanel
|
|
13
|
-
from astrohack.utils.constants import
|
|
11
|
+
from astrohack.utils.constants import twopi, fourpi
|
|
14
12
|
from astrohack.antenna.ring_panel import RingPanel
|
|
15
13
|
from astrohack.utils.algorithms import create_coordinate_images, arm_shadow_masking
|
|
16
14
|
from astrohack.utils.ray_tracing_general import GlobalQPS
|
|
15
|
+
from astrohack.utils.package_info import get_astrohack_path
|
|
16
|
+
from astrohack.utils.text import spc, lnbr, undscr
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Telescope:
|
|
@@ -76,9 +76,7 @@ class Telescope:
|
|
|
76
76
|
Returns:
|
|
77
77
|
None
|
|
78
78
|
"""
|
|
79
|
-
dest_path = "/
|
|
80
|
-
[astrohack.__path__[0], f"data/telescopes/{name.lower()}.zarr"]
|
|
81
|
-
)
|
|
79
|
+
dest_path = get_astrohack_path() / f"data/telescopes/{name.lower()}.zarr"
|
|
82
80
|
self.read(dest_path)
|
|
83
81
|
|
|
84
82
|
def write(self, filename):
|
|
@@ -105,11 +103,9 @@ class Telescope:
|
|
|
105
103
|
return
|
|
106
104
|
|
|
107
105
|
def write_to_distro(self):
|
|
108
|
-
dest_path =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
f'data/telescopes/{self.name.lower().replace(" ", "_")}.zarr',
|
|
112
|
-
]
|
|
106
|
+
dest_path = (
|
|
107
|
+
get_astrohack_path()
|
|
108
|
+
/ f"data/telescopes/{self.name.lower().replace(spc, undscr)}.zarr"
|
|
113
109
|
)
|
|
114
110
|
self.write(dest_path)
|
|
115
111
|
|
|
@@ -124,9 +120,9 @@ class Telescope:
|
|
|
124
120
|
for key, item in obj_dict.items():
|
|
125
121
|
if isinstance(item, dict):
|
|
126
122
|
key_list = list(item.keys())
|
|
127
|
-
outstr += f"{key:20s} = dict({str(key_list)})
|
|
123
|
+
outstr += f"{key:20s} = dict({str(key_list)}){lnbr}"
|
|
128
124
|
else:
|
|
129
|
-
outstr += f"{key:20s} = {str(item)}
|
|
125
|
+
outstr += f"{key:20s} = {str(item)}{lnbr}"
|
|
130
126
|
return outstr
|
|
131
127
|
|
|
132
128
|
|
|
@@ -5,7 +5,7 @@ from toolviper.utils.parameter import validate
|
|
|
5
5
|
import toolviper.utils.logger as logger
|
|
6
6
|
|
|
7
7
|
from astrohack.core.beamcut import process_beamcut_chunk
|
|
8
|
-
from astrohack.utils import get_default_file_name
|
|
8
|
+
from astrohack.utils.text import get_default_file_name
|
|
9
9
|
from astrohack.utils.file import overwrite_file
|
|
10
10
|
from astrohack.utils.graph import create_and_execute_graph_from_dict
|
|
11
11
|
from astrohack.io.beamcut_mds import AstrohackBeamcutFile
|
|
@@ -18,15 +18,15 @@ from typing import Union, List, Tuple
|
|
|
18
18
|
@validate(custom_checker=custom_plots_checker)
|
|
19
19
|
def beamcut(
|
|
20
20
|
holog_name: str,
|
|
21
|
-
beamcut_name: str = None,
|
|
21
|
+
beamcut_name: str | None = None,
|
|
22
22
|
ant: Union[str, List[str]] = "all",
|
|
23
23
|
ddi: Union[int, List[int], str] = "all",
|
|
24
|
-
destination: str = None,
|
|
24
|
+
destination: str | None = None,
|
|
25
25
|
lm_unit: str = "amin",
|
|
26
26
|
azel_unit: str = "deg",
|
|
27
27
|
phase_unit: str = "deg",
|
|
28
|
-
phase_scale: Union[List[float], Tuple[float], np.
|
|
29
|
-
y_scale: list[float] = None,
|
|
28
|
+
phase_scale: Union[List[float | int], Tuple[float | int], np.ndarray, None] = None,
|
|
29
|
+
y_scale: list[float | int] | None = None,
|
|
30
30
|
dpi: int = 300,
|
|
31
31
|
display: bool = False,
|
|
32
32
|
parallel: bool = False,
|
|
@@ -140,12 +140,11 @@ def beamcut(
|
|
|
140
140
|
param_dict=beamcut_params,
|
|
141
141
|
key_order=["ant", "ddi"],
|
|
142
142
|
output_mds=beamcut_mds,
|
|
143
|
-
parallel=parallel,
|
|
144
143
|
)
|
|
145
144
|
if executed_graph:
|
|
146
145
|
if destination is not None:
|
|
147
146
|
logger.info("Producing plots...")
|
|
148
|
-
beamcut_mds.
|
|
147
|
+
beamcut_mds.plot_in_amplitude(
|
|
149
148
|
destination,
|
|
150
149
|
lm_unit=lm_unit,
|
|
151
150
|
azel_unit=azel_unit,
|
|
@@ -154,7 +153,7 @@ def beamcut(
|
|
|
154
153
|
dpi=dpi,
|
|
155
154
|
parallel=parallel,
|
|
156
155
|
)
|
|
157
|
-
beamcut_mds.
|
|
156
|
+
beamcut_mds.plot_in_db(
|
|
158
157
|
destination,
|
|
159
158
|
lm_unit=lm_unit,
|
|
160
159
|
azel_unit=azel_unit,
|
|
@@ -163,7 +162,7 @@ def beamcut(
|
|
|
163
162
|
dpi=dpi,
|
|
164
163
|
parallel=parallel,
|
|
165
164
|
)
|
|
166
|
-
beamcut_mds.
|
|
165
|
+
beamcut_mds.plot_in_phase(
|
|
167
166
|
destination,
|
|
168
167
|
lm_unit=lm_unit,
|
|
169
168
|
azel_unit=azel_unit,
|
|
@@ -173,7 +172,7 @@ def beamcut(
|
|
|
173
172
|
dpi=dpi,
|
|
174
173
|
parallel=parallel,
|
|
175
174
|
)
|
|
176
|
-
beamcut_mds.
|
|
175
|
+
beamcut_mds.plot_lm_offsets(
|
|
177
176
|
destination,
|
|
178
177
|
lm_unit=lm_unit,
|
|
179
178
|
azel_unit=azel_unit,
|
|
@@ -181,7 +180,7 @@ def beamcut(
|
|
|
181
180
|
dpi=dpi,
|
|
182
181
|
parallel=parallel,
|
|
183
182
|
)
|
|
184
|
-
beamcut_mds.
|
|
183
|
+
beamcut_mds.export_report(
|
|
185
184
|
destination,
|
|
186
185
|
lm_unit=lm_unit,
|
|
187
186
|
azel_unit=azel_unit,
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
import toolviper
|
|
2
|
-
import
|
|
2
|
+
import toolviper.utils.logger as logger
|
|
3
|
+
import numpy as np
|
|
3
4
|
|
|
4
5
|
from astrohack.utils.validation import custom_unit_checker, custom_plots_checker
|
|
5
|
-
from astrohack.core.cassegrain_ray_tracing import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
from astrohack.core.cassegrain_ray_tracing import (
|
|
7
|
+
make_gridded_cassegrain_primary,
|
|
8
|
+
reflect_off_primary,
|
|
9
|
+
reflect_off_analytical_secondary,
|
|
10
|
+
detect_light,
|
|
11
|
+
compute_phase,
|
|
12
|
+
write_rt_xds_to_zarr,
|
|
13
|
+
open_rt_zarr,
|
|
14
|
+
title_from_input_parameters,
|
|
15
|
+
plot_2d_map,
|
|
16
|
+
add_rz_ray_to_plot,
|
|
17
|
+
compare_ray_tracing_to_phase_fit_results,
|
|
10
18
|
)
|
|
19
|
+
from astrohack.utils.constants import clight
|
|
20
|
+
from astrohack.utils.conversion import convert_unit
|
|
21
|
+
from astrohack.utils.algorithms import regrid_data_onto_2d_grid
|
|
11
22
|
from astrohack.utils.file import add_caller_and_version_to_dict
|
|
12
23
|
from astrohack.utils.phase_fitting import aips_like_phase_fitting
|
|
13
24
|
from astrohack.visualization.plot_tools import create_figure_and_axes, close_figure
|
|
14
25
|
from typing import Union
|
|
26
|
+
from astrohack.utils.text import spc, undscr
|
|
27
|
+
from astrohack.antenna.telescope import get_proper_telescope
|
|
15
28
|
|
|
16
29
|
|
|
17
30
|
@toolviper.utils.parameter.validate(custom_checker=custom_unit_checker)
|
|
@@ -273,13 +286,13 @@ def plot_2d_maps_from_rt_xds(
|
|
|
273
286
|
if isinstance(keys, str):
|
|
274
287
|
keys = [keys]
|
|
275
288
|
|
|
276
|
-
suptitle = "Cassegrain Ray tracing model for
|
|
289
|
+
suptitle = "Cassegrain Ray tracing model for:{lnbr}" + title_from_input_parameters(
|
|
277
290
|
rt_xds.attrs["input_parameters"]
|
|
278
291
|
)
|
|
279
292
|
for key in keys:
|
|
280
293
|
filename = f"{rootname}_{key}.png"
|
|
281
294
|
|
|
282
|
-
zlabel = key.capitalize().replace(
|
|
295
|
+
zlabel = key.capitalize().replace(undscr, spc)
|
|
283
296
|
if key == "phase":
|
|
284
297
|
fac = convert_unit("rad", phase_unit, "trigonometric")
|
|
285
298
|
zlabel += f" [{phase_unit}]"
|
|
@@ -2,7 +2,7 @@ from typing import Union, List
|
|
|
2
2
|
|
|
3
3
|
import toolviper.utils.parameter
|
|
4
4
|
|
|
5
|
-
from astrohack import open_image
|
|
5
|
+
from astrohack.io.dio import open_image
|
|
6
6
|
from astrohack.core.combine import process_combine_chunk
|
|
7
7
|
from astrohack.utils.graph import create_and_execute_graph_from_dict
|
|
8
8
|
from astrohack.utils.file import overwrite_file
|
|
@@ -13,7 +13,7 @@ from astrohack.io.image_mds import AstrohackImageFile
|
|
|
13
13
|
@toolviper.utils.parameter.validate()
|
|
14
14
|
def combine(
|
|
15
15
|
image_name: str,
|
|
16
|
-
combine_name: str = None,
|
|
16
|
+
combine_name: str | None = None,
|
|
17
17
|
ant: Union[str, List[str]] = "all",
|
|
18
18
|
ddi: Union[int, List[int], str] = "all",
|
|
19
19
|
weighted: bool = False,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
]
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
"AstrohackBeamcutFile.
|
|
77
|
+
"AstrohackBeamcutFile.plot_in_amplitude":{
|
|
78
78
|
"destination":{
|
|
79
79
|
"nullable": false,
|
|
80
80
|
"required": true,
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"type": ["boolean"]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
-
"AstrohackBeamcutFile.
|
|
153
|
+
"AstrohackBeamcutFile.plot_in_db":{
|
|
154
154
|
"destination":{
|
|
155
155
|
"nullable": false,
|
|
156
156
|
"required": true,
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"type": ["boolean"]
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
|
-
"AstrohackBeamcutFile.
|
|
229
|
+
"AstrohackBeamcutFile.plot_lm_offsets":{
|
|
230
230
|
"destination":{
|
|
231
231
|
"nullable": false,
|
|
232
232
|
"required": true,
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"type": ["boolean"]
|
|
288
288
|
}
|
|
289
289
|
},
|
|
290
|
-
"AstrohackBeamcutFile.
|
|
290
|
+
"AstrohackBeamcutFile.plot_in_phase":{
|
|
291
291
|
"destination":{
|
|
292
292
|
"nullable": false,
|
|
293
293
|
"required": true,
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
"type": ["boolean"]
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
|
-
"AstrohackBeamcutFile.
|
|
372
|
+
"AstrohackBeamcutFile.export_report":{
|
|
373
373
|
"destination":{
|
|
374
374
|
"nullable": false,
|
|
375
375
|
"required": true,
|