black without mortimer

This commit is contained in:
Noe Brucy
2022-11-28 18:01:18 +01:00
parent 7548ef7e0a
commit fa396178c6
14 changed files with 371 additions and 304 deletions
+4 -5
View File
@@ -6,7 +6,7 @@ import aplpy
def make_images(im, wt, M, meanim, label):
""" show the Gaussian and coherent part of the image """
"""show the Gaussian and coherent part of the image"""
total = np.sum(wt[:M, :, :], axis=0).real + meanim
coherent = np.sum(wt[M : 2 * M, :, :], axis=0).real + meanim
@@ -52,7 +52,7 @@ def make_images(im, wt, M, meanim, label):
def scale_images(thingy, M, label, scale=14, mode="wt"):
""" visualize wt or S11a for a specific scale. Remark S11a = wt^2"""
"""visualize wt or S11a for a specific scale. Remark S11a = wt^2"""
total = thingy[scale, :, :].real
coherent = thingy[M + scale, :, :].real
Gaussian = thingy[2 * M + scale, :, :].real
@@ -93,7 +93,7 @@ def scale_images(thingy, M, label, scale=14, mode="wt"):
def plot_each_scale(S11a, wav_k, q, label, coherent=False, reso=1):
""" plot histogram at a certain scale """
"""plot histogram at a certain scale"""
nsize = len(S11a[0, 0, :])
M = len(q)
for scl in range(0, M):
@@ -237,7 +237,7 @@ def load_results(label):
def analyse_sim(im, load=False, scale_image=False):
""" Do the MnGseg analysis """
"""Do the MnGseg analysis"""
meanim = np.mean(im)
imzm = im - meanim
M = nb_scale(im.shape)
@@ -264,7 +264,6 @@ def analyse_sim(im, load=False, scale_image=False):
# make images of the Gaussian and coherent part
make_images(im, wt, M, meanim, label)
if scale_image:
# (optional) make the image for each scale
for s in range(fit_min, fit_max + 1):