diff --git a/Cattery/Scripter/scripter.10calibration.funcs b/Cattery/Scripter/scripter.10calibration.funcs index 3a4a712..a623874 100644 --- a/Cattery/Scripter/scripter.10calibration.funcs +++ b/Cattery/Scripter/scripter.10calibration.funcs @@ -407,7 +407,7 @@ end src='${SSCCM}' # helper function to take center quadrant qq=lambda x:x[0,0,x.shape[2]/4:-x.shape[2]/4,x.shape[3]/4:-x.shape[3]/4] -import pyfits +import astropy.io.fits as pyfits cc = qq(pyfits.open('$model.fits')[0].data); di = qq(pyfits.open('%s-dirty.fits'%src)[0].data); ri = qq(pyfits.open('$residual.fits')[0].data); @@ -486,4 +486,4 @@ end $TIGGER_CONVERT $LSM $LSM -f --remove-source "$srcname*" --add-brick $srcname:${SSCCM}-cc.fits:$pad${_dE}brick fi done -} \ No newline at end of file +} diff --git a/Cattery/Siamese/OMS/emss_beams/EMSSVoltageBeam.py b/Cattery/Siamese/OMS/emss_beams/EMSSVoltageBeam.py index 194832f..001b706 100644 --- a/Cattery/Siamese/OMS/emss_beams/EMSSVoltageBeam.py +++ b/Cattery/Siamese/OMS/emss_beams/EMSSVoltageBeam.py @@ -364,7 +364,7 @@ def grid (self,lgrid,mgrid,freqgrid): c = vb.interpolate(l,l.T,freq=freq,freqaxis=2); # create FITS file - import pyfits; + import astropy.io.fits as pyfits; x = abs(c.transpose()); hdu = pyfits.PrimaryHDU(x); hdr = hdu.header; diff --git a/Cattery/Siamese/OMS/emss_beams/InterpolatedBeams.py b/Cattery/Siamese/OMS/emss_beams/InterpolatedBeams.py index b0f8e39..fe50b1b 100644 --- a/Cattery/Siamese/OMS/emss_beams/InterpolatedBeams.py +++ b/Cattery/Siamese/OMS/emss_beams/InterpolatedBeams.py @@ -5,7 +5,7 @@ import os.path import math import numpy -import pyfits +import astropy.io.fits as pyfits from scipy.ndimage import interpolation from scipy import interpolate diff --git a/Cattery/Siamese/OMS/emss_beams/emss2fits.py b/Cattery/Siamese/OMS/emss_beams/emss2fits.py index ded494d..8cd8427 100755 --- a/Cattery/Siamese/OMS/emss_beams/emss2fits.py +++ b/Cattery/Siamese/OMS/emss_beams/emss2fits.py @@ -139,7 +139,7 @@ # if template FITS file is provided, get l/m/frequency grid from there l0 = m0 = freq = None; - import pyfits + import astropy.io.fits as pyfits if options.template: ff = pyfits.open(options.template); hdr = ff[0].header; diff --git a/Dockerfile b/Dockerfile index 6946bf4..2d01aeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN docker-apt-install \ casacore-tools \ casarest \ python-pip \ - python-pyfits \ + python-astropy \ python-numpy \ python-scipy \ python-astlib \ @@ -75,4 +75,4 @@ WORKDIR /usr/local/lib/python2.7/dist-packages/Pyxis/recipies/meqtrees-batch-tes RUN python2.7 -m "nose" ENTRYPOINT ["meqtree-pipeliner.py"] -CMD ["--help"] \ No newline at end of file +CMD ["--help"] diff --git a/requirements.txt b/requirements.txt index 3672153..4b99463 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ +astropy numpy Purr -pyfits pyrap scipy Timba diff --git a/setup.py b/setup.py index 2c181a2..45f7156 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def fullsplit(path, result=None): setup(name='meqtrees_cattery', - version='1.7.2', + version='1.7.3', python_requires='>=3.0.0', description='MeqTrees-based frameworks for simulation and calibration of radio interferometers ', author='Oleg Smirnov',