Welcome to Tapy

Let's fire up

Eventually you can hack the functions.py in order to tune or create functionts that suit your purpose better


In [1]:
%matplotlib inline
from functions import read_data,cropped,createIm,normalization,saveIm,binning,oscillation,createIm_fft

Data folders

Open Beam data path:


In [2]:
path_ob = 'data/data_OB'

Sample data path:


In [3]:
path_im = 'data/data_smp'

Dark current data path:


In [4]:
path_dc = 'data/DCs'

Setting parameters

Binning:


In [5]:
bin_fac = None

ROI for normalization:


In [6]:
norm_param = [3,5,20,40]

ROI for cropping:


In [7]:
crop_param = [10,15,80,60]

ROI for pixels intensity oscillation as a function of the step:


In [8]:
oscillationParam = [30,1,1,1]

Number of periods in the phase scan:


In [9]:
numberPeriods = 1

Data processing

Loading:


In [10]:
im,ob = read_data(path_im,path_ob,path_dc)

Normalizing:


In [11]:
#im,ob=normalization(im,ob,*norm_param)

Oscillation:


In [12]:
oscillation(im,ob,*oscillationParam,repeatedPeriod=False)


Cropping:


In [13]:
im,ob = cropped(im,ob,*crop_param)


(100, 100)
25.9370803833 16.9146957397

Binning:


In [14]:
im, ob = binning(im,ob,bin_fac)

Creating:


In [15]:
ti, dpci, dfi, vis_map = createIm(im,ob,numberPeriods)

Saving the images


In [16]:
saveIm(ti, dpci, dfi, vis_map,name='period2',folder='folder',overWrite=True)


files saved in folder:  folder