From 8321eaa0879111876b3c0e0ac0786208bb11f7ab Mon Sep 17 00:00:00 2001
From: AK <empty>
Date: Tue, 12 Apr 2022 15:58:46 +0200
Subject: [PATCH] wsclean v=3.0

---
 Dockerfile | 3 +++
 imcal.py   | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index e7e4b77..98a8e03 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -117,6 +117,9 @@ RUN git clone --depth 1 --branch ${DP3_VERSION} \
 ARG WSCLEAN_VERSION=master
 RUN git clone --depth 1 --branch ${WSCLEAN_VERSION} \
         https://gitlab.com/aroffringa/wsclean.git && \
+    cd wsclean && \
+    git reset --hard v3.0 && \
+    cd .. && \
     mkdir wsclean/build && \
     cd wsclean/build && \
     cmake .. -DPORTABLE=${PORTABLE} && \
diff --git a/imcal.py b/imcal.py
index 2da680f..f3eb164 100755
--- a/imcal.py
+++ b/imcal.py
@@ -217,15 +217,15 @@ def makeCombMask(ima1='noiseMap.fits', ima2='noiseMapLow.fits',
     return
 
 
-def get_image_ra_dec_min_max(msin, ):
+def get_image_ra_dec_min_max(msin):
     """
     Determine image center coords, min and max values for msin
     """
     cmd = f'wsclean -niter 0 -size 3072 3072 -scale 3arcsec -use-wgridder {msin}'
+    logging.debug('Running command: %s', cmd)
     subprocess.call(cmd, shell=True)
     data = fits.getdata('wsclean-image.fits')
     header = fits.getheader('wsclean-image.fits')
-    
     return header['CRVAL1'], header['CRVAL2'], np.nanmin(data), np.nanmax(data)
 
 
-- 
GitLab