From 15e35fe644f7315da33f52401d33e5910bf61df4 Mon Sep 17 00:00:00 2001 From: Bobby Pascua Date: Wed, 19 Jan 2022 15:58:22 -0500 Subject: [PATCH] fix: set normalize_beams in ModelData.from_config --- CHANGELOG.rst | 8 ++++++++ hera_sim/visibilities/simulators.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ce5f7be1..244d8be1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,14 @@ Changelog ========= +v2.3.1 [2022.01.19] +=================== + +Fixed +----- +- Using the ``normalize_beams`` option is now possible with the ``from_config`` + class method. + v2.3.0 [2022.01.19] =================== diff --git a/hera_sim/visibilities/simulators.py b/hera_sim/visibilities/simulators.py index 4bf4f8a6..dfc2b357 100644 --- a/hera_sim/visibilities/simulators.py +++ b/hera_sim/visibilities/simulators.py @@ -166,7 +166,9 @@ def _validate_beam_ids(self, beam_ids, beams): ) @classmethod - def from_config(cls, config_file: str | Path) -> ModelData: + def from_config( + cls, config_file: str | Path, normalize_beams: bool = False + ) -> ModelData: """Initialize the :class:`ModelData` from a pyuvsim-compatible config.""" uvdata, beams, beam_ids = initialize_uvdata_from_params(config_file) catalog = initialize_catalog_from_params(config_file, return_recarray=False)[0] @@ -178,6 +180,7 @@ def from_config(cls, config_file: str | Path) -> ModelData: beams=beams, beam_ids=beam_ids, sky_model=catalog, + normalize_beams=normalize_beams, ) @cached_property