Data Formats and File Layout
pyPhase can handle hdm5, tiff and edf files.
Tiff and Edf directory layout
Projects using tiff or edf data must be organized as follows:
-
A directory/folder
name_(project's name followed by and underscore symbol) in the project's root. The the phase retrieval's resulting files are output to this location. -
The directory
name_shall contain a parammeter file, named phase_parameter.yml. -
Directories
name_1_,name_2_, ...,name_N_, containing the projection images for each distance N. -
Each of the directories
name_N_contains M tiff (or edf) files namedname_N_000M.tif(name_N_000M.edfrespectively). -
Each directories
name_1_,name_2_, ...,name_N_shall also contain dark and reference image files necessary for flat-field correction.
Note: Make sure that to use the same name when you instantiate DataSet objects.
Data Layout Example
Bellow is an example of a directory structure, for a project named holosim, with data for 3 distances, with 2 projections (each).
HoloSim
│
└───holosim_
│ phase_parameters.yml
│ [output files]
│
└───holosim_1_
│ refHST0000.edf
│
│ holosim_1_0000.edf
│ holosim_1_0001.edf
│
└───holosim_2_
│ holosim_2_0000.edf
│ holosim_2_0001.edf
│
└───holosim_3_
holosim_3_0000.edf
holosim_3_0001.edf
Parameter File
A parameter file, named pyphase_parameter.yml can be to the your_project_path/name_ directory.
If the file does not exist, pyPhase will try to find the parameters in the projects .info and '.xmlfiles.
Thepyphase_parameter.yml` file has the following parameters (the values are shown as an example):
axis_position: 256.5
distances: [0, 0.18, 0.38, 0.918]
dss: 145
energy: 24
nD: 4
nbprojections: 1200
distance_number: [1, 2, 3, 4]
nx: 512
ny: 512
pixel_size: 7.5
reference_interval: 300
reference_plane: 1
scan_range: 360
This file can be edited to change the any of the parameters. May be particularly useful when choosing the number of distances to use.
Dark and Reference Images
Each directory name_1_, name_2_, ..., name_N_ shall contain
- a
dark.tif(ordark.edf) containing a dark frame - Files
refHST0000.tif(orrefHST0000.edf) containing the reference (flat-field) images, one per
for flat field correction. The numbering of the re