Module ImportFrom alias alias alias Import alias identifier ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call AttributeLoad NameLoad attr NameLoad Num body Assign NameStore BinOpPow BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Num Assign NameStore BinOpPow BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Num For NameStore Call NameLoad SubscriptLoad NameLoad Index Num body Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad SubscriptLoad NameLoad Index NameLoad If CompareEq Call AttributeLoad NameLoad attr NameLoad Num body Assign NameStore BinOpPow BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Num Assign NameStore BinOpPow BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Num Assign NameStore BinOpPow BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Num For NameStore Call NameLoad SubscriptLoad NameLoad Index Num body For NameStore Call NameLoad SubscriptLoad NameLoad Index Num body Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Index NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore TupleLoad Num Num Assign NameStore TupleLoad Num Num Num Assign NameStore ListLoad NameLoad NameLoad Assign NameStore Num For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Num Call AttributeLoad NameLoad attr NameLoad keyword Num decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad Num Num Assign NameStore BinOpDiv SubscriptLoad NameLoad Index Num Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad Slice BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad Num Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad Num Assert CompareEq Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad Num Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice BinOpSub BinOpFloorDiv SubscriptLoad NameLoad Index Num Num NameLoad BinOpAdd BinOpFloorDiv SubscriptLoad NameLoad Index Num Num NameLoad Slice BinOpSub BinOpFloorDiv SubscriptLoad NameLoad Index Num Num NameLoad BinOpAdd BinOpFloorDiv SubscriptLoad NameLoad Index Num Num NameLoad Num Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg body Return Call NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Expr Call NameLoad AttributeLoad NameLoad attr BinOpPow BinOpMult Num NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Assert CompareLt AttributeLoad NameLoad attr BinOpPow BinOpMult Num NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign TupleStore NameStore NameStore Call NameLoad Assign NameStore ListLoad ListLoad Num Num ListLoad Num Num Num For NameStore NameLoad body Expr Yield TupleLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Yield TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore Call NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad keyword Str keyword NameLoad keyword NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore Call NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Num keyword Num decorator_list Call NameLoad NameLoad
N/A __future__ absolute_import division print_function N/A numpy np numpy.testing assert_equal assert_array_equal assert_array_almost_equal assert_almost_equal nose.tools raises skbeam.core.cdi _dist gauss find_support pi_modulus cal_diff_error cdi_recon generate_random_phase_field generate_box_support generate_disk_support dist_temp N/A N/A dims N/A N/A N/A 
    Another way to create array with pixel value equals euclidian distance
    from array center.
    This is used for test purpose only.
    This is Xiaojing's original code for computing the squared distance and is
    very useful as a test to ensure that new code conforms to the original
    code, as this has been used to publish results.
     N/A new_array N/A N/A np zeros dims N/A N/A N/A N/A np size dims 2 N/A N/A x_sq N/A N/A N/A N/A np arange N/A dims N/A 0 N/A N/A dims N/A 0 2 2 N/A y_sq N/A N/A N/A N/A np arange N/A dims N/A 1 N/A N/A dims N/A 1 2 2 N/A j N/A range N/A dims N/A 1 N/A N/A N/A new_array N/A N/A N/A j N/A N/A np sqrt N/A x_sq N/A y_sq N/A j N/A N/A N/A N/A np size dims 3 N/A N/A x_sq N/A N/A N/A N/A np arange N/A dims N/A 0 N/A N/A dims N/A 0 2 2 N/A y_sq N/A N/A N/A N/A np arange N/A dims N/A 1 N/A N/A dims N/A 1 2 2 N/A z_sq N/A N/A N/A N/A np arange N/A dims N/A 2 N/A N/A dims N/A 2 2 2 N/A j N/A range N/A dims N/A 1 N/A N/A k N/A range N/A dims N/A 2 N/A N/A N/A new_array N/A N/A N/A j N/A k N/A N/A np sqrt N/A N/A x_sq N/A y_sq N/A j N/A z_sq N/A k N/A new_array N/A test_dist N/A N/A N/A N/A N/A shape2D N/A 150 100 N/A data N/A _dist shape2D N/A data1 N/A dist_temp shape2D N/A N/A assert_array_equal N/A data shape shape2D N/A N/A assert_array_equal data data1 N/A shape3D N/A 100 200 300 N/A data N/A _dist shape3D N/A data1 N/A dist_temp shape3D N/A N/A assert_array_equal N/A data shape shape3D N/A N/A assert_array_equal data data1 N/A test_gauss N/A N/A N/A N/A N/A shape2D N/A 100 100 N/A shape3D N/A 100 200 50 N/A shape_list N/A shape2D shape3D N/A std 10 N/A v shape_list N/A N/A d N/A gauss v std N/A N/A assert_almost_equal 0 N/A N/A np mean d decimal 3 N/A test_find_support N/A N/A N/A N/A N/A shape_v N/A 100 100 N/A cenv N/A N/A shape_v N/A 0 2 N/A r 20 N/A a N/A N/A np zeros shape_v N/A N/A a N/A N/A N/A cenv r N/A cenv r N/A N/A cenv r N/A cenv r 1.0 N/A sw_sigma 0.5 N/A sw_threshold 0.05 N/A new_sup_index N/A find_support a sw_sigma sw_threshold N/A new_sup N/A N/A np zeros_like a N/A N/A new_sup N/A new_sup_index 1 N/A N/A N/A N/A np sum new_sup 1760 N/A make_synthetic_data N/A N/A N/A N/A N/A 
    Fft transform of a squared area.

    Returns
    -------
    a : array
        squared sample
    diff_v : array
        fft transform of sample area
     N/A shapev N/A 100 100 N/A r 20 N/A a N/A N/A np zeros shapev N/A N/A a N/A N/A N/A N/A N/A shapev N/A 0 2 r N/A N/A N/A shapev N/A 0 2 r N/A N/A N/A N/A shapev N/A 1 2 r N/A N/A N/A shapev N/A 1 2 r 1 N/A diff_v N/A N/A N/A np abs N/A N/A N/A np fft fftn a N/A N/A np sqrt N/A N/A np size a N/A N/A a diff_v N/A test_pi_modulus N/A N/A N/A N/A N/A N/A a diff_v N/A make_synthetic_data N/A a_new N/A pi_modulus a diff_v N/A N/A assert_array_almost_equal N/A N/A np abs a_new a N/A test_cal_diff_error N/A N/A N/A N/A N/A N/A a diff_v N/A make_synthetic_data N/A result N/A cal_diff_error a diff_v N/A N/A assert_equal N/A N/A np sum result 0 N/A cal_support N/A N/A func N/A N/A inner N/A N/A N/A args N/A N/A N/A func args N/A N/A inner N/A _box_support_area N/A N/A sup_radius shape_v N/A N/A N/A sup N/A generate_box_support sup_radius shape_v N/A new_sup N/A sup N/A N/A sup 0 N/A N/A assert_array_equal N/A new_sup shape N/A N/A 2 sup_radius N/A len shape_v N/A _disk_support_area N/A N/A sup_radius shape_v N/A N/A N/A sup N/A generate_disk_support sup_radius shape_v N/A new_sup N/A sup N/A N/A sup 0 N/A N/A N/A new_sup size N/A N/A 2 sup_radius N/A len shape_v N/A test_support N/A N/A N/A N/A N/A sup_radius 20 N/A N/A a diff_v N/A make_synthetic_data N/A shape_list N/A N/A 100 100 N/A 100 100 100 N/A v shape_list N/A N/A N/A N/A _box_support_area sup_radius v N/A v shape_list N/A N/A N/A N/A _disk_support_area sup_radius v N/A test_recon N/A N/A N/A N/A N/A N/A a diff_v N/A make_synthetic_data N/A total_n 10 N/A sup_radius 20 N/A init_phase N/A generate_random_phase_field diff_v N/A sup N/A generate_box_support sup_radius N/A diff_v shape N/A N/A outv1 error_dict N/A cdi_recon diff_v init_phase sup sw_flag False n_iterations total_n sw_step 2 N/A outv1 N/A N/A np abs outv1 N/A N/A outv2 error_dict N/A cdi_recon diff_v init_phase sup pi_modulus_flag Real sw_flag True n_iterations total_n sw_step 2 N/A outv2 N/A N/A np abs outv2 N/A N/A assert_array_equal N/A outv1 shape N/A outv2 shape N/A test_cdi_plotter N/A N/A N/A N/A N/A N/A a diff_v N/A make_synthetic_data N/A total_n 10 N/A sup_radius 20 N/A init_phase N/A generate_random_phase_field diff_v N/A sup N/A generate_box_support sup_radius N/A diff_v shape N/A N/A outv error_d N/A cdi_recon diff_v init_phase sup sw_flag True n_iterations total_n sw_step 2 cb_function 10 N/A N/A raises TypeError