9.1. Folder Walker#
import sys
sys.path.insert(0, '../../../molass-library')
sys.path.insert(0, '../../../molass-legacy')
import os
import matplotlib.pyplot as plt
from molass.Local import get_local_settings
from molass.DataUtils.FolderWalker import walk_folders
from molass.Global.Options import set_molass_options
set_molass_options(flowchange='auto')
local_settings = get_local_settings()
DATA_ROOT_FOLDER = local_settings['DATA_ROOT_FOLDER']
from molass.DataObjects import SecSaxsData as SSD
output_folder = "figs"
if not os.path.exists(output_folder):
os.makedirs(output_folder)
for k, path in enumerate(walk_folders(DATA_ROOT_FOLDER)):
if k < 0:
continue
print([k], path)
ssd = SSD(path, remove_bubbles=True)
if ssd.uv is None:
print("No UV data found in %s, skipping." % path)
continue
title = "Compact Plot for %s" % path
result = ssd.plot_compact(title=title)
result.savefig(os.path.join(output_folder, "plot_%03d.png" % k))
result.close()
if k > 3:
break
[0] C:\Users\takahashi\PyTools\Data\00_model_001
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\Trimming\FlangeLimit.py:128: RuntimeWarning: invalid value encountered in scalar divide
check_ratio = np.average(agy[safe_f-w:safe_f])/agy[f]
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\KekLib\GeometryUtils.py:19: RuntimeWarning: divide by zero encountered in divide
wy_ = wy/(np.max(wy) - np.min(wy))
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\KekLib\GeometryUtils.py:13: RuntimeWarning: invalid value encountered in subtract
wy_ = wy - cy
[1] C:\Users\takahashi\PyTools\Data\00_model_005
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\Trimming\FlangeLimit.py:128: RuntimeWarning: invalid value encountered in scalar divide
check_ratio = np.average(agy[safe_f-w:safe_f])/agy[f]
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\KekLib\GeometryUtils.py:19: RuntimeWarning: divide by zero encountered in divide
wy_ = wy/(np.max(wy) - np.min(wy))
C:\Users\takahashi\GitHub\molass-technical\chapters\70\../../../molass-legacy\molass_legacy\KekLib\GeometryUtils.py:13: RuntimeWarning: invalid value encountered in subtract
wy_ = wy - cy
Rg=None < 10.0 has been replaced by 10.0 to avoid exception.
[2] C:\Users\takahashi\PyTools\Data\20160227\backsub
zeros at the angular ends of error data have been replaced with the adjacent values.
[3] C:\Users\takahashi\PyTools\Data\20160628
C:\Program Files\Python312\Lib\site-packages\scipy\stats\_stats_py.py:10730: RuntimeWarning: invalid value encountered in scalar divide
slope = ssxym / ssxm
C:\Program Files\Python312\Lib\site-packages\scipy\stats\_stats_py.py:10744: RuntimeWarning: invalid value encountered in sqrt
t = r * np.sqrt(df / ((1.0 - r + TINY)*(1.0 + r + TINY)))
C:\Program Files\Python312\Lib\site-packages\scipy\stats\_stats_py.py:10750: RuntimeWarning: invalid value encountered in scalar divide
slope_stderr = np.sqrt((1 - r**2) * ssym / ssxm / df)
[4] C:\Users\takahashi\PyTools\Data\20161006\OA01\Backsub
zeros at the angular ends of error data have been replaced with the adjacent values.