Skip to content

Commit

Permalink
Drop Py2 stuff and remove commented out code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell committed Jan 8, 2025
1 parent d41daf4 commit e018626
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions python/bifrost/orville.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit e018626

Please sign in to comment.