From 51441b0a49204a392fa0f490453846f58f072898 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 31 Oct 2022 11:01:57 +0000 Subject: [PATCH 1/9] CHG: fix typo and forcing restored to be float32 --- src/snow/imaging/gpuvmem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/snow/imaging/gpuvmem.py b/src/snow/imaging/gpuvmem.py index 35408f0..b30a2f6 100644 --- a/src/snow/imaging/gpuvmem.py +++ b/src/snow/imaging/gpuvmem.py @@ -269,9 +269,9 @@ def __restore_pyra( hermitian_symmetry=hermitian_symmetry, padding_factor=padding_factor ) - image = dirty_mapper.transform()[0].data[0].compute() + residual_image = dirty_mapper.transform()[0].data[0].compute() - fits_io.write(image, output_name=residual_casa_image + ".fits") + fits_io.write(residual_image, output_name=residual_casa_image + ".fits") psf = dataset.psf[0] @@ -285,9 +285,9 @@ def __restore_pyra( im_model_convolved *= beam_area_pixels.value - im_restored = im_model_convolved + image + im_restored = im_model_convolved + residual_image - fits_io.write(im_restored, output_name=restored_image + ".fits") + fits_io.write(im_restored.astype(np.float32), output_name=restored_image + ".fits") return residual_casa_image + ".fits", restored_image + ".fits" From adf0ee49ef5838393098d6d52e2cde940b171fbc Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 31 Oct 2022 11:46:00 +0000 Subject: [PATCH 2/9] CHG: fix environment --- environment.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/environment.yml b/environment.yml index 834b6da..dd37d5a 100644 --- a/environment.yml +++ b/environment.yml @@ -1,21 +1,21 @@ name: pyralysis-env dependencies: -- python>=3.8, <3.8.10 -- numpy=1.22.4 +- python=3.8 +- numpy=1.23 - anaconda - pip - pip: -- almatasks==1.5.2 -- astropy==5.1 -- casadata==2022.9.5 -- casampi==0.5.01 -- casaplotms==1.8.7 -- casaplotserver==1.4.6 -- casashell==6.5.2.26 -- casatasks==6.5.2.26 -- casatestutils==6.5.2.26 -- casatools==6.5.2.26 -- casaviewer==1.6.6 -- reproject==0.9 -- scipy==1.8.1 -- git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis + - almatasks==1.5.2 + - astropy==5.1 + - casadata==2022.9.5 + - casampi==0.5.01 + - casaplotms==1.8.7 + - casaplotserver==1.4.6 + - casashell==6.5.2.26 + - casatasks==6.5.2.26 + - casatestutils==6.5.2.26 + - casatools==6.5.2.26 + - casaviewer==1.6.6 + - reproject==0.9 + - scipy==1.8.1 + - git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis From 9fe5133ec747a0fd59186598ebad44d3dc6e078f Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Mon, 31 Oct 2022 13:33:46 +0000 Subject: [PATCH 3/9] CHG: fix pyra restore --- src/snow/imaging/gpuvmem.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/snow/imaging/gpuvmem.py b/src/snow/imaging/gpuvmem.py index b30a2f6..242c3b6 100644 --- a/src/snow/imaging/gpuvmem.py +++ b/src/snow/imaging/gpuvmem.py @@ -277,7 +277,11 @@ def __restore_pyra( clean_beam_kernel = psf.as_kernel(pix_scale) - im_model_convolved = convolve_fft(im_model.squeeze(), clean_beam_kernel) + im_model_convolved = convolve_fft( + im_model.squeeze(), + clean_beam_kernel.array.astype(np.float32), + complex_dtype=np.complex64 + ).astype(np.float32) pixel_area = np.abs(pix_scale * pix_scale) pix_area_scale = u.pixel_scale(pixel_area / u.pixel) From f3d444e35658fc531ad3b0bd2f07a42d2ad1d28c Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 1 Nov 2022 12:03:02 +0000 Subject: [PATCH 4/9] CHG: changes to publishpy --- .github/workflows/publishpypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publishpypi.yaml b/.github/workflows/publishpypi.yaml index 304792d..c553b6c 100644 --- a/.github/workflows/publishpypi.yaml +++ b/.github/workflows/publishpypi.yaml @@ -31,7 +31,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: '3.8' - name: Install dependencies run: | python3 -m pip install --upgrade pip wheel setuptools setuptools-scm From d06c079969200547696f7a14b4e34400e2c24b2b Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 1 Nov 2022 13:39:36 +0000 Subject: [PATCH 5/9] CHG: adding mpi4py and python-casacore to requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 35452fc..2d73458 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,9 @@ casatasks==6.5.2.26 casatestutils==6.5.2.26 casatools==6.5.2.26 casaviewer==1.6.6 +mpi4py==3.1.3 numpy==1.23 git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis +python-casacore==3.5.2 reproject==0.9 scipy==1.9.1 From 10075854e5a828623aea7249ca4ff24d5f4b3773 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 1 Nov 2022 13:40:47 +0000 Subject: [PATCH 6/9] CHG: change to environment.yml --- environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index dd37d5a..357bac4 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,8 @@ -name: pyralysis-env +name: snow-env dependencies: - python=3.8 - numpy=1.23 +- mpi4py=3.1.3 - anaconda - pip - pip: @@ -18,4 +19,5 @@ dependencies: - casaviewer==1.6.6 - reproject==0.9 - scipy==1.8.1 + - python-casacore==3.5.2 - git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis From 8dee0bdc8c6144837b6bfd0ef59c79b9437285d7 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 1 Nov 2022 14:02:29 +0000 Subject: [PATCH 7/9] CHG: change environment.yml --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 357bac4..7c2831e 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: snow-env dependencies: - python=3.8 - numpy=1.23 -- mpi4py=3.1.3 +- mpi4py - anaconda - pip - pip: @@ -18,6 +18,6 @@ dependencies: - casatools==6.5.2.26 - casaviewer==1.6.6 - reproject==0.9 - - scipy==1.8.1 + - scipy==1.9.1 - python-casacore==3.5.2 - git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis From 259fad544357b0171252d4c9dc9a4f7cf2ed1034 Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Tue, 1 Nov 2022 22:36:28 +0000 Subject: [PATCH 8/9] CHG: updating pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 83246cd..63e8290 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=62.6.0", "setuptools-scm", "wheel"] +requires = ["setuptools>=65.5.0", "setuptools-scm", "wheel"] build-backend = "setuptools.build_meta" [project] From f0986ae389dfb2011e93645d79be2aba4e66a90f Mon Sep 17 00:00:00 2001 From: Miguel Carcamo Date: Wed, 2 Nov 2022 12:16:31 +0000 Subject: [PATCH 9/9] FIX: bugfix reproject 0.9.1 --- environment.yml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 7c2831e..230a39d 100644 --- a/environment.yml +++ b/environment.yml @@ -17,7 +17,7 @@ dependencies: - casatestutils==6.5.2.26 - casatools==6.5.2.26 - casaviewer==1.6.6 - - reproject==0.9 + - reproject==0.9.1 - scipy==1.9.1 - python-casacore==3.5.2 - git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis diff --git a/requirements.txt b/requirements.txt index 2d73458..c0f97cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,5 +13,5 @@ mpi4py==3.1.3 numpy==1.23 git+https://gitlab.com/miguelcarcamov/pyralysis@development#egg=pyralysis python-casacore==3.5.2 -reproject==0.9 +reproject==0.9.1 scipy==1.9.1