6. Growth Mechanism#

%load_ext autoreload
%autoreload 2

import sys
import numpy as np
import os
import matplotlib.pyplot as plt
from matplotlib import colors

sys.path.append('../../src')
from m3_learning.RHEED.Dataset import RHEED_parameter_dataset, RHEED_spot_Dataset
from m3_learning.RHEED.Packed_functions import decay_curve_examples, compare_loss_difference, compare_growth_mechanism

from m3_learning.viz.style import set_style
set_style("printing")

%matplotlib inline
2023-06-08 13:25:09.348418: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-06-08 13:25:09.900717: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ferroelectric/micromamba/envs/m3-RHEED/lib/python3.10/site-packages/cv2/../../lib64:/home/ferroelectric/micromamba/envs/m3-RHEED/lib/python3.10/site-packages/cv2/../../lib64:
2023-06-08 13:25:09.900779: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ferroelectric/micromamba/envs/m3-RHEED/lib/python3.10/site-packages/cv2/../../lib64:/home/ferroelectric/micromamba/envs/m3-RHEED/lib/python3.10/site-packages/cv2/../../lib64:
2023-06-08 13:25:09.900784: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
printing set for seaborn
fit_settings = {'savgol_window_order': (15, 3), 'pca_component': 10, 'I_diff': 15000, 'unify':False, 'bounds':[0.001, 1], 'p_init':[0.1, 0.4, 0.1]}
path = './Datasets/test6_gaussian_fit_parameters_all-04232023.h5'
D1_para = RHEED_parameter_dataset(path, camera_freq=500, sample_name='treated_213nm')
decay_curve_examples(D1_para, 'spot_2', 'img_sum', fit_settings)
../../_images/dd43fbfe6279e0000c135d78543e6c0af433d0a91f06a8445f256c0a2c3ceb15.png
compare_loss_difference()
../../_images/fea2b5accb9e873d7ba179eaa6d1be3e196f590e69fdd42e379f54f6e47b3089.png
compare_growth_mechanism()
../../_images/80ce603fff5a6f047131299afc6b540b4db5ae5107984a07c7479771e6bd36fd.png