<no title> — Normalization 0 documentation

    In [1]:

    import os
    import sys
    import numpy as np
    import matplotlib.pyplot as plt
    import matplotlib.patches as patches
    from matplotlib import gridspec
    %matplotlib notebook

    In [2]:

    root_folder = os.path.dirname(os.getcwd())
    sys.path.append(root_folder)

    import NeuNorm as neunorm
    from NeuNorm.normalization import Normalization
    from NeuNorm.roi import ROI

    In [3]:

    path_ob = '../data/ob/'
    assert os.path.exists(path_ob)

    In [4]:

    path_im = '../data/sample'
    assert os.path.exists(path_im)

    In [5]:

    path_df = '../data/df'
    assert os.path.exists(path_df)

    In [6]:

    o_norm = Normalization()
    o_norm.load(folder=path_im)

    In [7]:

    o_norm.load(folder=path_ob, data_type='ob', notebook=True)
    o_norm.load(folder=path_df, data_type='df')

Data type cannot be displayed:

    In [8]:

    o_norm.df_correction()

    In [9]:

    norm_roi = ROI(x0=3, y0=5, width=20, height=40)
    o_norm.normalization(roi=norm_roi, notebook=True)

Data type cannot be displayed:

    Out[9]:

    True

    In [20]:

    normalized_data = o_norm.data['normalized']

    In [21]:

    np.shape(normalized_data)

    Out[21]:

    (15, 100, 100)

    In [ ]:

    roi_to_keep = ROI(x0=0, y0=0, width=2, height=2)
    o_norm.crop(roi=roi_to_keep)

    norm_crop = o_norm.data['normalized']
    np.shape(norm_crop)

    In [ ]:

    In [ ]: