forked from estonshi/spipy
-
Notifications
You must be signed in to change notification settings - Fork 3
phase
YC.S edited this page Sep 27, 2019
·
18 revisions
(Extension of the original program from European-XFEL team here)
Supported algorithms :
- ER (error reduction)
- DM (difference map)
- RAAR (relaxed averaged alternating reflections)
--> " 2d pattern phase retrieval using iterative (projection-support) methods "
+ :void = new_project (data_mask_path:str, path:str/None, name:str/None)
+ :void = config (params:dict)
+ :void = run (num_proc:int/1, nohup:bool/False, cluster:bool/False)
+ :void = use_project (project_path:str)
All parameters, a dict :
- important :
'input|shape'
: input pattern shape, default='123,123''input|padd_to_pow2'
: zero padding to make the size of pattern to be a 2n number, default=True'input|inner_mask'
: pixels whose radius<inner_mask are allowed to float while phasing, default=5'input|outer_mask'
: pixels whose radius>outer_mask are set to zero, default=64'input|outer_outer_mask'
: pixels whose radius are between outer_mask and outer_outer_mask are allowed to float, default=None'input|mask_edges'
: a switch, whether allow pixels between outer_mask and outer_outer_mask to float, default=True'phasing|repeats'
: how many times of independent phasing for every process, default=40'phasing|iters'
: schedual iterations for 1 phasing loop, default='100RAAR 200DM 200ERA' which means '100 times relaxed averaged alternating reflections algorithm -> 200 times different map algorithm -> 300 times error reduction algorithm''phasing_parameters|support_size'
: set restriction to the number of pixels inside final support of shrinkwrap process, default=200 (pixels)'phasing_parameters|beta'
: beta value for RAAR algorithm, float from 0 to 1, default=0.8- optional (for most time you don't need to change them):
'input|subtract_percentile'
: subtract the ?th percentile value of data for all pixels, float value from 0 to 100, default=None'input|spherical_support'
: radius of spherical support that added at the initiation, default=None'input|init_model'
: filepath of initial REAL space model. Support .npy, .bin and .mat file formats. The size of init model should agree with 'input|shape' after 'input|padd_2_pow', default=None'phasing_parameters|background'
: evaluate background while phasing, default=True
--
-
new_project : create a new project at your given path, NO return
-
data_mask_path
: [data_path, user_mask_path] , data_path is the path of pattern while user_mask_path is the path of mask file, inside the mask file there should be a 0/1 2d array and 1 means masked point -
path
: create work directory at your give path, set None to use current dir, default=None -
name
: give a name to your project, set None to let program choose one for you, default=None - [Notice] Your original intensity file should be 2D array '.npy' or '.mat' or '.bin', mask file must be 'npy'. Leave data_mask_path[1] to None if you don't have user mask
-
--
-
config : edit configure file, NO return
-
params
: dict, parameters that you want to modified. refer to example code
-
--
-
run : start phasing, NO return
-
num_proc
: number of processes, default=1 -
nohup
: whether run in background, default=False -
cluster
: bool, whether you will submit jobs using job scheduling system, if True, the function will only generate a command file at your work path without submitting it; if False, the program will run directly. default=False
-
--
-
show_result : show pahsing result, calling 'show_result.py' in your work_dir, NO return
-
outpath
: IF you move output.h5 to another folder (not your project folder), please give me its path, default is None -
exp_param
: list detd, lambda, det_r, pix_size in a string. Used to calculate q value. e.g. '200,2.5,128,0.3', default=None
-
--
-
use_project : switch to an existing project, NO return
-
project_path
: path of the project directory that you want to use
-
--> " 3d voxel model phase retrieval using iterative (projection-support) methods "
+ :void = new_project (data_path:str, mask_path/None, path:str/None, name:str/None)
+ :void = config (params:dict)
+ :void = run (num_proc:int/1, nohup:bool/False, cluster:bool/True)
+ :void = use_project (project_path:str)
+ :void = show_result (outpath:str/None, exp_param:str/None)
- All parameters
'input|shape'
: default='120,120,120'- There is no 'phasing_parameters|support_size', for replacement, there are
'phasing_parameters|voxel_number'
, default=2000- Others the same with phase2d parameters
--
-
new_project : create a new project at your given path, NO return
-
data_path
: path of your original 3d scattering intensity data, file that contains 3D voxel data should be '.npy' or '.mat', or Dragonfly output '.bin' -
mask_path
: path of user-defined mask file, a 0/1 numpy.2darray where 1 means masked point, default=None -
path
: create work directory at your give path, set None to use current dir, default=None -
name
: give a name to your project, set None to let program choose one for you, default=None
-
--
-
config : edit configure file, NO return
-
params
: dict, parameters that you want to modified. refer to example code
-
--
-
run : start phasing, NO return
-
num_proc
: this function maps multi-processes automatically, so you need to figure out how many processes to run in parallel, default=1 -
nohup
: whether run in background, default=False -
cluster
: bool, whether you will submit jobs using job scheduling system, if True, the function will only generate a command file at your work path without submitting it; if False, the program will run directly. default=True
-
--
-
show_result : show pahsing result, calling 'show_result.py' in your work_dir, NO return
-
outpath
: IF you move output.h5 to another folder (not your project folder), please give me its path, default is None -
exp_param
: list detd, lambda, det_r, pix_size in a string. Used to calculate q value. e.g. '200,2.5,128,0.3', default=None
-
--
-
use_project : switch to an existing project, NO return
-
project_path
: path of the project directory that you want to use
-
Any questions or bug report please contact [email protected]