-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.py
30 lines (25 loc) · 1.04 KB
/
notes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
VMI Code Notes
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage
from skimage import restoration #scikit-image
import abel.tools, abel.transform #PyAbel
import cv2 #OpenCV
#local import
import tools
def plain_abel_trasformation():
m = tools.creat_mask([201, 201], center = [100,100], radious=(70,70),output_values='1/0', place_true='inside')
basex = abel.transform.Transform(m, method='basex', direction='inverse',\
center = (100, 100)).transform
linbasex = abel.transform.Transform(m, method='linbasex', direction='inverse',\
center = (100, 100)).transform
fig, a = plt.subplots(1,3, dpi = 200)
a[0].imshow(m, cmap = 'gray')
a[0].set_title('Data of 1/0')
a[1].imshow(basex, cmap = 'gray', vmin = 0.001, vmax = 0.05)
a[1].set_title('Basex')
a[2].imshow(linbasex, cmap = 'gray', vmin = 0.001, vmax = 0.05)
a[2].set_title('LinBasex')
plt.show()