mirror of
https://github.com/c-sooyoung/fold_slice.git
synced 2026-09-17 23:39:08 +09:00
initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
% This script prepares experimental electron ptycho. data for PtychoShelves
|
||||
%% Step 1: download sample data from Zenodo:
|
||||
% DOI :
|
||||
% link:
|
||||
% 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,'SupFig1a_MEP_Planar_Interface.hdf5'), '/dp');
|
||||
|
||||
%% Step 3: any preprocessing steps if required
|
||||
ADU = 3661; % 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)
|
||||
Reference in New Issue
Block a user