initial commit

This commit is contained in:
2026-08-07 15:56:42 +09:00
commit 91ad25aca9
1012 changed files with 159314 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
% This script prepares experimental electron ptycho. data for PtychoShelves
%% Step 1: download the sample data from Zenodo:
% DOI : 10.5281/zenodo.13787852
% Note: it's a good practice to store data (and reconstructions) in a
% different folder from fold_slice
%% Step 2: load data
data_dir = '/path/to/file/'; %change this
dp = h5read(strcat(data_dir,'Fig_1_and_2a-c.hdf5'), '/dp');
%% Step 3: any preprocessing steps if required
ADU = 578; % Analog to Digital units for EMPAD-1 detector
dp = dp / ADU; % convert to electron count
%% Step 4: save .hdf5 file in the folder structure used in PtychoShelves
scan_number = 1; %Ptychoshelves needs
save_dir = strcat(data_dir,num2str(scan_number),'/');
mkdir(save_dir)
roi_label = '0_Ndp255';
saveName = strcat('data_roi',roi_label,'_dp.hdf5');
h5create(strcat(save_dir,saveName), '/dp', size(dp),'ChunkSize',[size(dp,1), size(dp,2), 1],'Deflate',4)
h5write(strcat(save_dir,saveName), '/dp', dp)