From e018626f085e9577071c171059209c612ea69f40 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 8 Jan 2025 09:57:03 -0700 Subject: [PATCH] Drop Py2 stuff and remove commented out code. --- python/bifrost/orville.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/python/bifrost/orville.py b/python/bifrost/orville.py index 272a22f9..891a881a 100644 --- a/python/bifrost/orville.py +++ b/python/bifrost/orville.py @@ -24,9 +24,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Python2 compatibility -from __future__ import absolute_import, print_function, division - from bifrost.libbifrost import _bf, _check, _get, BifrostObject, _string2space from bifrost.ndarray import ndarray, zeros, empty_like, asarray, memset_array, copy_array @@ -295,27 +292,6 @@ def execute(self, idata, odata, weighting='natural'): self._fft_im.init(self._stcgrid, self._stcgrid, axes=(1,2)) self._fft_im.execute(self._stcgrid, self._stcgrid, inverse=True) - ### Correct for the kernel - #map('img(c,i,j) /= corr(i)*corr(j)', - # {'img':self._stcgrid, 'corr':self._img_correction}, - # axis_names=('c','i','j'), shape=self._stcgrid.shape) - # - ## Shift and accumulate onto odata - #oshape = odata.shape - #odata = odata.reshape(-1,odata.shape[-2],odata.shape[-1]) - #padding = self._gridsize - self._origsize - #offset = padding/2# - padding%2 - #map(""" - # auto k = i + {offset} - {gridsize}/2; - # auto l = j + {offset} - {gridsize}/2; - # if( k < 0 ) k += {gridsize}; - # if( l < 0 ) l += {gridsize}; - # odata(c,i,j) += idata(c,k,l).real; - # """.format(gridsize=self._gridsize, offset=offset), - # {'odata':odata, 'idata':self._stcgrid}, - # axis_names=('c','i','j'), shape=odata.shape) - #odata = odata.reshape(oshape) - # Correct for the kernel, shift, and accumulate onto odata oshape = odata.shape odata = odata.reshape(-1,odata.shape[-2],odata.shape[-1])