Skip to content

Commit

Permalink
tweaks to coeff naming
Browse files Browse the repository at this point in the history
  • Loading branch information
landmanbester committed Jan 25, 2024
1 parent 796390a commit 7533ebc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
9 changes: 5 additions & 4 deletions pfb/operators/psi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ def coef2im(alpha, x, bases, ntot, iy, sy, nx, ny, nthreads=1):

for f in cf.as_completed(futures):
wave, l = f.result()
ne.evaluate('x + wave', local_dict={
'x': x[l],
'wave': wave/sqrtP},
out=x[l], casting='same_kind')
# ne.evaluate('x + wave', local_dict={
# 'x': x[l],
# 'wave': wave/sqrtP},
# out=x[l], casting='same_kind')
x[l] += wave


def _im2coef_impl(x, base, l, b, nlevels):
Expand Down
18 changes: 9 additions & 9 deletions pfb/wavelets/coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
@numba.njit(nogil=True, cache=True)
def coeffs(wavelet):
COEFFICIENTS = {
"db0": np.array(
"db1": np.array(
[7.071067811865475244008443621048490392848359376884740365883398e-01,
7.071067811865475244008443621048490392848359376884740365883398e-01]),

"db1": np.array(
"db2": np.array(
[4.829629131445341433748715998644486838169524195042022752011715e-01,
8.365163037378079055752937809168732034593703883484392934953414e-01,
2.241438680420133810259727622404003554678835181842717613871683e-01,
-1.294095225512603811744494188120241641745344506599652569070016e-01]),

"db2": np.array(
"db3": np.array(
[3.326705529500826159985115891390056300129233992450683597084705e-01,
8.068915093110925764944936040887134905192973949948236181650920e-01,
4.598775021184915700951519421476167208081101774314923066433867e-01,
-1.350110200102545886963899066993744805622198452237811919756862e-01,
-8.544127388202666169281916918177331153619763898808662976351748e-02,
3.522629188570953660274066471551002932775838791743161039893406e-02]),

"db3": np.array(
"db4": np.array(
[2.303778133088965008632911830440708500016152482483092977910968e-01,
7.148465705529156470899219552739926037076084010993081758450110e-01,
6.308807679298589078817163383006152202032229226771951174057473e-01,
Expand All @@ -34,7 +34,7 @@ def coeffs(wavelet):
3.288301166688519973540751354924438866454194113754971259727278e-02,
-1.059740178506903210488320852402722918109996490637641983484974e-02]),

"db4": np.array(
"db5": np.array(
[1.601023979741929144807237480204207336505441246250578327725699e-01,
6.038292697971896705401193065250621075074221631016986987969283e-01,
7.243085284377729277280712441022186407687562182320073725767335e-01,
Expand All @@ -46,7 +46,7 @@ def coeffs(wavelet):
-1.258075199908199946850973993177579294920459162609785020169232e-02,
3.335725285473771277998183415817355747636524742305315099706428e-03]),

"db5": np.array(
"db6": np.array(
[1.115407433501094636213239172409234390425395919844216759082360e-01,
4.946238903984530856772041768778555886377863828962743623531834e-01,
7.511339080210953506789344984397316855802547833382612009730420e-01,
Expand All @@ -60,7 +60,7 @@ def coeffs(wavelet):
4.777257510945510639635975246820707050230501216581434297593254e-03,
-1.077301085308479564852621609587200035235233609334419689818580e-03]),

"db6": np.array(
"db7": np.array(
[7.785205408500917901996352195789374837918305292795568438702937e-02,
3.965393194819173065390003909368428563587151149333287401110499e-01,
7.291320908462351199169430703392820517179660611901363782697715e-01,
Expand All @@ -76,7 +76,7 @@ def coeffs(wavelet):
-1.801640704047490915268262912739550962585651469641090625323864e-03,
3.537137999745202484462958363064254310959060059520040012524275e-04]),

"db7": np.array(
"db8": np.array(
[5.441584224310400995500940520299935503599554294733050397729280e-02,
3.128715909142999706591623755057177219497319740370229185698712e-01,
6.756307362972898068078007670471831499869115906336364227766759e-01,
Expand All @@ -94,7 +94,7 @@ def coeffs(wavelet):
6.754494064505693663695475738792991218489630013558432103617077e-04,
-1.174767841247695337306282316988909444086693950311503927620013e-04]),

"db8": np.array(
"db9": np.array(
[3.807794736387834658869765887955118448771714496278417476647192e-02,
2.438346746125903537320415816492844155263611085609231361429088e-01,
6.048231236901111119030768674342361708959562711896117565333713e-01,
Expand Down
4 changes: 4 additions & 0 deletions pfb/workers/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ def _grid(xdsi=None, **kw):
else:
nx = opts.nx
ny = opts.ny if opts.ny is not None else nx
cell_deg = np.rad2deg(cell_rad)
fovx = nx*cell_deg
fovy = ny*cell_deg
print(f"Field of view is ({fovx:.3e},{fovy:.3e}) degrees")

if opts.dirty:
print(f"Image size = (ntime={ntime}, nband={nband}, nx={nx}, ny={ny})", file=log)
Expand Down

0 comments on commit 7533ebc

Please sign in to comment.