From e46de1c35fdf5bd7f115309b92d3726cb7a46493 Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:00:50 -0500 Subject: [PATCH 1/7] Fix issue #270 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1851322..6c4136d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ """ from setuptools import setup, find_packages -__version__ = '2.1.1' +__version__ = '2.1.2' with open("README.md", "r") as fh: long_description = fh.read() From 371767cf7519011286bcf87fe8b1e0f4e1a1cfb4 Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:01:48 -0500 Subject: [PATCH 2/7] Fix issue #270 --- VERSION-HISTORY.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VERSION-HISTORY.md b/VERSION-HISTORY.md index 341512b..146daaf 100644 --- a/VERSION-HISTORY.md +++ b/VERSION-HISTORY.md @@ -3,7 +3,8 @@ This file is a version history of blimpy amendments, beginning with version 2.0.
| Date | Version | Contents | | :--: | :--: | :-- | -| 2022-07-20 | 2.1.1 | Mods to Waterfall class, an alternative to file loading (issue #264). | +| 2022-07-22 | 2.1.2 | More container fields needed (issue #270). | +| 2022-07-21 | 2.1.1 | New Waterfall class option, an alternative to file loading (issue #264). | | 2022-07-08 | 2.1.0 | New utility: dsamp (issue #267). | | 2022-04-19 | 2.0.40 | Fixed blimpy to show plots when the display supports it (issue #263). | | 2022-03-30 | 2.0.39 | examine_h5 in hdf_reader.py is loading too much data (issue #261). | From 0f661558675dbf50442acf970abe6bda7939e013 Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:02:52 -0500 Subject: [PATCH 3/7] Fix issue #270 --- blimpy/waterfall.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blimpy/waterfall.py b/blimpy/waterfall.py index 88bd593..5514a75 100755 --- a/blimpy/waterfall.py +++ b/blimpy/waterfall.py @@ -82,11 +82,13 @@ def _init_alternate(self, header_dict, data, filename=None): self.file_size_bytes = 0 # The Waterfall "container": - class Container(): + from blimpy.io.base_reader import Reader + class Container(Reader): n_beams_in_file = 1 n_pols_in_file = 1 _d_type = np.float32 t_begin = 0 + t_start = 0 freq_axis = 2 time_axis = 0 beam_axis = 1 @@ -102,6 +104,10 @@ class Container(): self.container.f_start = self.container.f_begin self.container.f_stop = self.container.f_end self.container.t_end = data.shape[0] + self.container.t_stop = data.shape[0] + self.container.selection_shape = data.shape + self.container.n_ints_in_file = data.shape[0] + self.container.header = header_dict # Set Waterfall object properties. self.header = header_dict From 383d89e427bf5bfa862ac4d81a9f925fa4b0e6fb Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:03:43 -0500 Subject: [PATCH 4/7] Fix issue #270 --- tests/data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/data.py b/tests/data.py index 214ec1a..463624b 100644 --- a/tests/data.py +++ b/tests/data.py @@ -8,3 +8,4 @@ voyager_block1 = path.join(here, 'test_data/Voyager1_block1.npy') test_ifs_fil = path.join(here, 'test_data/test_ifs.fil') test_h5 = path.join(here, 'test_data/test.h5') +test_fil = path.join(here, 'test_data/test.fil') From 6389add55914aaba2f6fd1315faa819c1847350f Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:04:49 -0500 Subject: [PATCH 5/7] Test fix to Issue #270 --- tests/test_waterfall2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_waterfall2.py b/tests/test_waterfall2.py index c968d86..ae3b044 100644 --- a/tests/test_waterfall2.py +++ b/tests/test_waterfall2.py @@ -2,7 +2,7 @@ from astropy import units as u from astropy.coordinates import Angle import blimpy as bl -from tests.data import voyager_h5 +from tests.data import voyager_h5, test_h5, test_fil def test_waterfall_stream_1(): @@ -41,6 +41,8 @@ def test_waterfall_stream_2(): wf_voya1 = bl.Waterfall(voyager_h5) wf_voya2 = bl.Waterfall(header_dict=wf_voya1.header, data_array=wf_voya1.data) wf_voya2.info() + wf_voya2.write_to_fil(test_h5) + wf_voya2.write_to_fil(test_fil) if __name__ == "__main__": From e1a576d6dc50a296aff0837e4f08ef0115ea5e37 Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:05:29 -0500 Subject: [PATCH 6/7] Test fix to issue #270 --- tests/test_waterfall2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_waterfall2.py b/tests/test_waterfall2.py index ae3b044..336f8cc 100644 --- a/tests/test_waterfall2.py +++ b/tests/test_waterfall2.py @@ -41,7 +41,7 @@ def test_waterfall_stream_2(): wf_voya1 = bl.Waterfall(voyager_h5) wf_voya2 = bl.Waterfall(header_dict=wf_voya1.header, data_array=wf_voya1.data) wf_voya2.info() - wf_voya2.write_to_fil(test_h5) + wf_voya2.write_to_h5(test_h5) wf_voya2.write_to_fil(test_fil) From 09289497c9abcae0711ae87da9d502c736d6680b Mon Sep 17 00:00:00 2001 From: Richard Elkins Date: Fri, 22 Jul 2022 16:12:08 -0500 Subject: [PATCH 7/7] Correct member function misspelling: write_to_h5 --> write_to_hdf5 --- tests/test_waterfall2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_waterfall2.py b/tests/test_waterfall2.py index 336f8cc..323f881 100644 --- a/tests/test_waterfall2.py +++ b/tests/test_waterfall2.py @@ -41,7 +41,7 @@ def test_waterfall_stream_2(): wf_voya1 = bl.Waterfall(voyager_h5) wf_voya2 = bl.Waterfall(header_dict=wf_voya1.header, data_array=wf_voya1.data) wf_voya2.info() - wf_voya2.write_to_h5(test_h5) + wf_voya2.write_to_hdf5(test_h5) wf_voya2.write_to_fil(test_fil)