Files
bo-ptycho/notebooks/mat_preview.ipynb
T
2026-07-21 15:44:51 +09:00

119 lines
2.2 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"id": "5c8aa3fd",
"metadata": {},
"outputs": [],
"source": [
"from scipy.io import loadmat as scipy_loadmat\n",
"from mat73 import loadmat as mat73_loadmat"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "1d3c8601",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/mnt/ptycho_data_share/Si_project/wrapper/utilities'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%pwd"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "4a419040",
"metadata": {},
"outputs": [],
"source": [
"f = \"../results/fold_slice/1/roi0_Ndp64/MLs_L1_p1_g128_Ndp192_Ns20_dz8.6391_reg0.1/Niter10.mat\""
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "405b77b4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['__header__', '__version__', '__globals__', 'outputs', 'probe', 'object', 'p', '__function_workspace__'])"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"contents = scipy_loadmat(f)\n",
"contents.keys()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8a7b58b2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"np.float32(35.53711)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"contents['outputs']['fourier_error_out'][0][0].squeeze()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d8870f98",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "lemon",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}