Commit 24cef791 by Martin Reinecke

### more renaming

parent 3439205f
 ... @@ -348,7 +348,7 @@ The employed algorithm is highly accurate, even for angles close to 0 or pi. ... @@ -348,7 +348,7 @@ The employed algorithm is highly accurate, even for angles close to 0 or pi. void add_pyHealpix(py::module &msup) void add_pyHealpix(py::module &msup) { { using namespace pybind11::literals; using namespace pybind11::literals; auto m = msup.def_submodule("pyHealpix"); auto m = msup.def_submodule("healpix"); m.doc() = pyHealpix_DS; m.doc() = pyHealpix_DS; py::class_ (m, "Healpix_Base", py::module_local()) py::class_ (m, "Healpix_Base", py::module_local()) ... ...
 import time import time import math import math import numpy as np import numpy as np import ducc_0_1.pyHealpix as ph import ducc_0_1.healpix as ph def report (name,vlen,ntry,nside,isnest,perf): def report (name,vlen,ntry,nside,isnest,perf): print (name,": ",perf*1e-6,"MOps/s",sep="") print (name,": ",perf*1e-6,"MOps/s",sep="") ... ...
 import ducc_0_1.pyHealpix as ph import ducc_0_1.healpix as ph import numpy as np import numpy as np import math import math ... ...
 import ducc_0_1.pyHealpix as ph import ducc_0_1.healpix as ph import numpy as np import numpy as np import math import math import pytest import pytest ... ...
 ... @@ -4,7 +4,7 @@ ... @@ -4,7 +4,7 @@ # and Fejer quadrature rules are very similar (see the documentation in # and Fejer quadrature rules are very similar (see the documentation in # sharp_geomhelpers.h). An exact analogon to DH can be added easily, I expect. # sharp_geomhelpers.h). An exact analogon to DH can be added easily, I expect. import pysharp import ducc_0_1.sht as sht import numpy as np import numpy as np from time import time from time import time ... @@ -21,7 +21,7 @@ mmax = lmax ... @@ -21,7 +21,7 @@ mmax = lmax nlon = 4096 nlon = 4096 # create an object which will do the SHT work # create an object which will do the SHT work job = pysharp.sharpjob_d() job = sht.sharpjob_d() # create a set of spherical harmonic coefficients to transform # create a set of spherical harmonic coefficients to transform # Libsharp works exclusively on real-valued maps. The corresponding harmonic # Libsharp works exclusively on real-valued maps. The corresponding harmonic ... ...
 ... @@ -271,7 +271,7 @@ py::array py_upsample_to_cc(const py::array &in, size_t nrings_out, bool has_np, ... @@ -271,7 +271,7 @@ py::array py_upsample_to_cc(const py::array &in, size_t nrings_out, bool has_np, void add_pysharp(py::module &msup) void add_pysharp(py::module &msup) { { using namespace pybind11::literals; using namespace pybind11::literals; auto m = msup.def_submodule("pysharp"); auto m = msup.def_submodule("sht"); m.doc() = pysharp_DS; m.doc() = pysharp_DS; py::class_> (m, "sharpjob_d", py::module_local()) py::class_> (m, "sharpjob_d", py::module_local()) ... ...
 import ducc_0_1.pysharp as pysharp import ducc_0_1.sht as sht import numpy as np import numpy as np import math import math import pytest import pytest ... @@ -11,7 +11,7 @@ pmp = pytest.mark.parametrize ... @@ -11,7 +11,7 @@ pmp = pytest.mark.parametrize (511, 0, 512, 1)]) (511, 0, 512, 1)]) def test_GL(params): def test_GL(params): lmax, mmax, nlat, nlon = params lmax, mmax, nlat, nlon = params job = pysharp.sharpjob_d() job = sht.sharpjob_d() nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm_r = nalm*2-lmax-1 nalm_r = nalm*2-lmax-1 rng = np.random.default_rng(np.random.SeedSequence(42)) rng = np.random.default_rng(np.random.SeedSequence(42)) ... @@ -30,7 +30,7 @@ def test_GL(params): ... @@ -30,7 +30,7 @@ def test_GL(params): (511, 0, 1024, 1)]) (511, 0, 1024, 1)]) def test_fejer1(params): def test_fejer1(params): lmax, mmax, nlat, nlon = params lmax, mmax, nlat, nlon = params job = pysharp.sharpjob_d() job = sht.sharpjob_d() nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm_r = nalm*2-lmax-1 nalm_r = nalm*2-lmax-1 rng = np.random.default_rng(np.random.SeedSequence(42)) rng = np.random.default_rng(np.random.SeedSequence(42)) ... @@ -49,7 +49,7 @@ def test_fejer1(params): ... @@ -49,7 +49,7 @@ def test_fejer1(params): (511, 0, 1024, 1)]) (511, 0, 1024, 1)]) def test_dh(params): def test_dh(params): lmax, mmax, nlat, nlon = params lmax, mmax, nlat, nlon = params job = pysharp.sharpjob_d() job = sht.sharpjob_d() nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm = ((mmax+1)*(mmax+2))//2 + (mmax+1)*(lmax-mmax) nalm_r = nalm*2-lmax-1 nalm_r = nalm*2-lmax-1 rng = np.random.default_rng(np.random.SeedSequence(42)) rng = np.random.default_rng(np.random.SeedSequence(42)) ... ...
 import pysharp import ducc_0_1.sht as sht import numpy as np import numpy as np from time import time from time import time ... @@ -17,7 +17,7 @@ alm = np.random.uniform(-1., 1., nalm) + 1j*np.random.uniform(-1., 1., nalm) ... @@ -17,7 +17,7 @@ alm = np.random.uniform(-1., 1., nalm) + 1j*np.random.uniform(-1., 1., nalm) # make a_lm with m==0 real-valued # make a_lm with m==0 real-valued alm[0:lmax+1].imag = 0. alm[0:lmax+1].imag = 0. job = pysharp.sharpjob_d() job = sht.sharpjob_d() # describe the a_lm array to the job # describe the a_lm array to the job job.set_triangular_alm_info(lmax, mmax) job.set_triangular_alm_info(lmax, mmax) ... @@ -33,7 +33,7 @@ map = job.alm2map(alm) ... @@ -33,7 +33,7 @@ map = job.alm2map(alm) print("time for map synthesis: {}s".format(time()-t0)) print("time for map synthesis: {}s".format(time()-t0)) nlat2 = 2*lmax+3 nlat2 = 2*lmax+3 t0=time() t0=time() map2 = pysharp.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, False, False) map2 = sht.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, False, False) print("time for upsampling: {}s".format(time()-t0)) print("time for upsampling: {}s".format(time()-t0)) job.set_cc_geometry(nlat2, nlon) job.set_cc_geometry(nlat2, nlon) t0=time() t0=time() ... @@ -55,7 +55,7 @@ map = job.alm2map(alm) ... @@ -55,7 +55,7 @@ map = job.alm2map(alm) print("time for map synthesis: {}s".format(time()-t0)) print("time for map synthesis: {}s".format(time()-t0)) nlat2 = 2*lmax+3 nlat2 = 2*lmax+3 t0=time() t0=time() map2 = pysharp.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, True, True) map2 = sht.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, True, True) print("time for upsampling: {}s".format(time()-t0)) print("time for upsampling: {}s".format(time()-t0)) job.set_cc_geometry(nlat2, nlon) job.set_cc_geometry(nlat2, nlon) t0=time() t0=time() ... @@ -78,7 +78,7 @@ map = job.alm2map(alm) ... @@ -78,7 +78,7 @@ map = job.alm2map(alm) print("time for map synthesis: {}s".format(time()-t0)) print("time for map synthesis: {}s".format(time()-t0)) nlat2 = 2*lmax+3 nlat2 = 2*lmax+3 t0=time() t0=time() map2 = pysharp.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, False, True) map2 = sht.upsample_to_cc(map.reshape((nlat,nlon)), nlat2, False, True) print("time for upsampling: {}s".format(time()-t0)) print("time for upsampling: {}s".format(time()-t0)) job.set_cc_geometry(nlat2, nlon) job.set_cc_geometry(nlat2, nlon) t0=time() t0=time() ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment