astrohack 1.0.1__tar.gz → 1.0.2__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 (117) hide show
  1. {astrohack-1.0.1/src/astrohack.egg-info → astrohack-1.0.2}/PKG-INFO +1 -1
  2. {astrohack-1.0.1 → astrohack-1.0.2}/pyproject.toml +1 -1
  3. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/beamcut.py +2 -0
  4. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/beamcut.py +31 -11
  5. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/beamcut_mds.py +7 -1
  6. {astrohack-1.0.1 → astrohack-1.0.2/src/astrohack.egg-info}/PKG-INFO +1 -1
  7. {astrohack-1.0.1 → astrohack-1.0.2}/LICENSE +0 -0
  8. {astrohack-1.0.1 → astrohack-1.0.2}/MANIFEST.in +0 -0
  9. {astrohack-1.0.1 → astrohack-1.0.2}/README.rst +0 -0
  10. {astrohack-1.0.1 → astrohack-1.0.2}/setup.cfg +0 -0
  11. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/__init__.py +0 -0
  12. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/__init__.py +0 -0
  13. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/antenna_surface.py +0 -0
  14. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/base_panel.py +0 -0
  15. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/panel_fitting.py +0 -0
  16. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/polygon_panel.py +0 -0
  17. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/ring_panel.py +0 -0
  18. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/antenna/telescope.py +0 -0
  19. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/cassegrain_ray_tracing.py +0 -0
  20. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/combine.py +0 -0
  21. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/beamcut.param.json +0 -0
  22. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/beamcut_mds.param.json +0 -0
  23. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/cassegrain_ray_tracing.param.json +0 -0
  24. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/combine.param.json +0 -0
  25. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/create_param_json.py +0 -0
  26. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/dask.config.yaml +0 -0
  27. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/extract_holog.param.json +0 -0
  28. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/extract_locit.param.json +0 -0
  29. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/extract_pointing.param.json +0 -0
  30. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/holog.param.json +0 -0
  31. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/holog_mds.param.json +0 -0
  32. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/image_comparison_tool.param.json +0 -0
  33. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/image_mds.param.json +0 -0
  34. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/locit.param.json +0 -0
  35. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/locit_mds.param.json +0 -0
  36. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/panel.param.json +0 -0
  37. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/panel_mds.param.json +0 -0
  38. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/point_mds.param.json +0 -0
  39. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/config/position_mds.param.json +0 -0
  40. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/__init__.py +0 -0
  41. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/cassegrain_ray_tracing.py +0 -0
  42. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/combine.py +0 -0
  43. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/extract_holog.py +0 -0
  44. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/extract_locit.py +0 -0
  45. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/extract_pointing.py +0 -0
  46. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/holog.py +0 -0
  47. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/holog_obs_dict.py +0 -0
  48. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/image_comparison_tool.py +0 -0
  49. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/locit.py +0 -0
  50. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/core/panel.py +0 -0
  51. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/aca_7m.zarr/.zattrs +0 -0
  52. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/aca_7m.zarr/.zgroup +0 -0
  53. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/aca_7m.zarr/.zmetadata +0 -0
  54. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_da.zarr/.zattrs +0 -0
  55. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_da.zarr/.zgroup +0 -0
  56. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_da.zarr/.zmetadata +0 -0
  57. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_dv.zarr/.zattrs +0 -0
  58. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_dv.zarr/.zgroup +0 -0
  59. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_dv.zarr/.zmetadata +0 -0
  60. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_tp.zarr/.zattrs +0 -0
  61. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_tp.zarr/.zgroup +0 -0
  62. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/alma_tp.zarr/.zmetadata +0 -0
  63. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/fix_telescope_files.bash +0 -0
  64. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zattrs +0 -0
  65. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zgroup +0 -0
  66. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/.zmetadata +0 -0
  67. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/point_cloud/.zarray +0 -0
  68. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/point_cloud/0.0 +0 -0
  69. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/qps_coefficients/.zarray +0 -0
  70. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/ngvla_proto_2025.zarr/qps_coefficients/0 +0 -0
  71. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vla.zarr/.zattrs +0 -0
  72. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vla.zarr/.zgroup +0 -0
  73. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vla.zarr/.zmetadata +0 -0
  74. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vlba.zarr/.zattrs +0 -0
  75. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vlba.zarr/.zgroup +0 -0
  76. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/data/telescopes/vlba.zarr/.zmetadata +0 -0
  77. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/extract_holog.py +0 -0
  78. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/extract_locit.py +0 -0
  79. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/extract_pointing.py +0 -0
  80. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/holog.py +0 -0
  81. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/image_comparison_tool.py +0 -0
  82. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/__init__.py +0 -0
  83. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/base_mds.py +0 -0
  84. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/dio.py +0 -0
  85. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/holog_mds.py +0 -0
  86. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/image_mds.py +0 -0
  87. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/locit_mds.py +0 -0
  88. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/panel_mds.py +0 -0
  89. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/point_mds.py +0 -0
  90. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/io/position_mds.py +0 -0
  91. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/locit.py +0 -0
  92. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/panel.py +0 -0
  93. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/__init__.py +0 -0
  94. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/algorithms.py +0 -0
  95. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/constants.py +0 -0
  96. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/conversion.py +0 -0
  97. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/file.py +0 -0
  98. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/fits.py +0 -0
  99. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/graph.py +0 -0
  100. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/gridding.py +0 -0
  101. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/imaging.py +0 -0
  102. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/phase_fitting.py +0 -0
  103. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/ray_tracing_general.py +0 -0
  104. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/text.py +0 -0
  105. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/tools.py +0 -0
  106. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/validation.py +0 -0
  107. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/verification_tools.py +0 -0
  108. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/veritas.py +0 -0
  109. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/utils/zernike_aperture_fitting.py +0 -0
  110. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/visualization/__init__.py +0 -0
  111. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/visualization/array_cfg_plot.py +0 -0
  112. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/visualization/observation_summary.py +0 -0
  113. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack/visualization/plot_tools.py +0 -0
  114. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack.egg-info/SOURCES.txt +0 -0
  115. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack.egg-info/dependency_links.txt +0 -0
  116. {astrohack-1.0.1 → astrohack-1.0.2}/src/astrohack.egg-info/requires.txt +0 -0
  117. {astrohack-1.0.1 → astrohack-1.0.2}/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.1
3
+ Version: 1.0.2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "astrohack"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "Holography Antenna Commissioning Kit"
5
5
  readme = "README.md"
6
6
  requires-python = ">= 3.11, < 3.14"
@@ -2,6 +2,7 @@ import pathlib
2
2
  import numpy as np
3
3
 
4
4
  from toolviper.utils.parameter import validate
5
+ import toolviper.utils.logger as logger
5
6
 
6
7
  from astrohack.core.beamcut import process_beamcut_chunk
7
8
  from astrohack.utils import get_default_file_name
@@ -143,6 +144,7 @@ def beamcut(
143
144
  )
144
145
  if executed_graph:
145
146
  if destination is not None:
147
+ logger.info("Producing plots...")
146
148
  beamcut_mds.plot_beamcut_in_amplitude(
147
149
  destination,
148
150
  lm_unit=lm_unit,
@@ -398,7 +398,9 @@ def _perform_curvefit_with_given_functions(
398
398
  return False, np.full_like(initial_guesses, np.nan)
399
399
 
400
400
 
401
- def _identify_pb_and_sidelobes_in_fit(datalabel, x_data, fit_pars):
401
+ def _identify_pb_and_sidelobes_in_fit(
402
+ datalabel, x_data, fit_pars, primary_fwhm_estimate
403
+ ):
402
404
  """
403
405
  Identify primary beam and first sidelobes in fit using expected beam shape heuristics.
404
406
 
@@ -440,7 +442,16 @@ def _identify_pb_and_sidelobes_in_fit(datalabel, x_data, fit_pars):
440
442
  i_pb_cen = np.argmin(np.abs(centers))
441
443
  # This assumes the primary beam is the strongest
442
444
  i_pb_amp = np.argmax(amps)
443
- pb_problem = i_pb_cen != i_pb_amp
445
+
446
+ pb_problem = False
447
+ if i_pb_cen != i_pb_amp:
448
+ pb_problem = True
449
+ else:
450
+ if (
451
+ fwhms[i_pb_cen] < 0.5 * primary_fwhm_estimate
452
+ or fwhms[i_pb_cen] > 3.0 * primary_fwhm_estimate
453
+ ):
454
+ pb_problem = True
444
455
 
445
456
  if pb_problem:
446
457
  logger.warning(f"Cannot reliably identify primary beam for {datalabel}.")
@@ -496,20 +507,29 @@ def _beamcut_multi_lobes_gaussian_fit(cut_xdtree, datalabel):
496
507
  initial_guesses, bounds, n_peaks = _build_multi_gaussian_initial_guesses(
497
508
  x_data, y_data, primary_fwhm
498
509
  )
499
- fit_succeeded, fit_pars = _perform_curvefit_with_given_functions(
500
- x_data,
501
- y_data,
502
- initial_guesses,
503
- bounds,
504
- _multi_gaussian,
505
- this_corr_data_label,
506
- )
510
+
511
+ # This is a test for empty data
512
+ if np.nansum(y_data) == 0:
513
+ logger.warning(
514
+ f"{this_corr_data_label} appears to contain no valid data"
515
+ )
516
+ fit_succeeded = False
517
+ fit_pars = np.full_like(initial_guesses, np.nan)
518
+ else:
519
+ fit_succeeded, fit_pars = _perform_curvefit_with_given_functions(
520
+ x_data,
521
+ y_data,
522
+ initial_guesses,
523
+ bounds,
524
+ _multi_gaussian,
525
+ this_corr_data_label,
526
+ )
507
527
 
508
528
  if fit_succeeded:
509
529
  fit = _multi_gaussian(x_data, *fit_pars)
510
530
  n_peaks, fit_pars, pb_center, pb_fwhm, first_side_lobe_ratio = (
511
531
  _identify_pb_and_sidelobes_in_fit(
512
- this_corr_data_label, x_data, fit_pars
532
+ this_corr_data_label, x_data, fit_pars, primary_fwhm
513
533
  )
514
534
  )
515
535
  else:
@@ -718,6 +718,8 @@ def _plot_single_cut_in_amplitude(cut_xds, axes, par_dict):
718
718
  # Init
719
719
  sub_title = _make_parallel_hand_sub_title(cut_xds.attrs)
720
720
  max_amp = cut_xds.attrs["all_corr_ymax"]
721
+ if max_amp < 1e-2:
722
+ max_amp = 1.0
721
723
  y_off = 0.05 * max_amp
722
724
  lm_unit = par_dict["lm_unit"]
723
725
  lm_fac = convert_unit("rad", lm_unit, "trigonometric")
@@ -944,7 +946,11 @@ def _plot_single_cut_in_attenuation(cut_xds, ax, par_dict):
944
946
  x_data = lm_fac * cut_xds["lm_dist"].values
945
947
  amps = cut_xds[f"{parallel_hand}_amplitude"].values
946
948
  max_amp = np.max(amps)
947
- y_data = to_db(amps / max_amp)
949
+ if max_amp == 0:
950
+ y_data = np.full_like(x_data, -1)
951
+ else:
952
+ y_data = to_db(amps / max_amp)
953
+
948
954
  y_min = np.min(y_data)
949
955
  if y_min < min_attenuation:
950
956
  min_attenuation = y_min
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: astrohack
3
- Version: 1.0.1
3
+ Version: 1.0.2
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
File without changes
File without changes
File without changes
File without changes