{ "cells": [ { "cell_type": "code", "execution_count": 17, "id": "5c8aa3fd", "metadata": {}, "outputs": [], "source": [ "from scipy.io import loadmat as scipy_loadmat\n", "from mat73 import loadmat as mat73_loadmat\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 2, "id": "1d3c8601", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'/home/swim/bo-ptycho/notebooks'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%pwd" ] }, { "cell_type": "code", "execution_count": 5, "id": "4a419040", "metadata": {}, "outputs": [], "source": [ "f = \"/home/swim/Si_project/Si8V2_full/roi1_Ndp256/MLs_L1_p1_g64_Ndp192_pc1_noModel_Ns23_dz14.6087_reg0.2/Niter1000.mat\"" ] }, { "cell_type": "code", "execution_count": 6, "id": "405b77b4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "dict_keys(['__header__', '__version__', '__globals__', 'outputs', 'probe', 'object', 'p', '__function_workspace__'])" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "contents = scipy_loadmat(f)\n", "contents.keys()" ] }, { "cell_type": "code", "execution_count": 25, "id": "8a7b58b2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "mappingproxy({'object_ROI': (dtype('O'), 0),\n", " 'binning': (dtype('O'), 8),\n", " 'detector': (dtype('O'), 16),\n", " 'dx_spec': (dtype('O'), 24),\n", " 'lambda': (dtype('O'), 32),\n", " 'multi_slice_param': (dtype('O'), 40),\n", " 'obj_init_param': (dtype('O'), 48),\n", " 'init_probe_file': (dtype('O'), 56),\n", " 'normalize_init_probe': (dtype('O'), 64)})" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "contents['p'].dtype.fields" ] }, { "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 }