Documented functions with links to source

Program to iteratively refine 3D structure of helical specimens from segment stacks

class sr3d_parameters.SegmentRefine3dParPreparation[source]

Class to initiate default dictionary with input parameters including help and range values and status dictionary

Methods

define_input_output_segmentrefine3d

define_parameters_and_their_properties

define_program_states

define_segmentrefine3d_parameters

set_3dctf_correction_intensity_option

set_3dctf_correction_option

set_amp_corr_out_of_plane_range

set_bin_cutff_enforce_pitch_even_phi

set_choose_out_of_plane_amp_corr

set_enforce_even_phi_distribution

set_enforce_pitch_even_phi

set_fsc_based_filter_option

set_helical_continuity_option

set_helical_symmetry_parameters

set_image_size_to_be_aligned

set_inp_refinement_stack

set_iteration_count

set_reference_volume

set_reference_volume_option

set_refine_helical_symmetry

set_relatives_and_level

set_release_cycle_even_phi

set_volume_prefix_refined_structure

define_input_output_segmentrefine3d()[source]
define_segmentrefine3d_parameters()[source]
set_helical_symmetry_parameters()[source]
set_refine_helical_symmetry(feature_set)[source]
define_parameters_and_their_properties()[source]
define_program_states()[source]
set_inp_refinement_stack(feature_set)[source]
set_volume_prefix_refined_structure(feature_set)[source]
set_iteration_count(feature_set)[source]
set_helical_continuity_option(feature_set)[source]
set_reference_volume_option(feature_set)[source]
set_relatives_and_level(feature_set, inp9)[source]
set_reference_volume(feature_set)[source]
set_image_size_to_be_aligned(feature_set)[source]
set_choose_out_of_plane_amp_corr(feature_set)[source]
set_amp_corr_out_of_plane_range(feature_set)[source]
set_3dctf_correction_option(feature_set)[source]
set_3dctf_correction_intensity_option(feature_set)[source]
set_enforce_even_phi_distribution(feature_set)[source]
set_release_cycle_even_phi(feature_set)[source]
set_enforce_pitch_even_phi(feature_set)[source]
set_bin_cutff_enforce_pitch_even_phi(feature_set)[source]
set_fsc_based_filter_option(feature_set)[source]
class sr3d_parameters.SegmentRefine3dPar[source]

Methods

add_custom_refinement_strategy_as_relative

define_input_output_segmentrefine3d

define_parameters_and_their_properties

define_program_states

define_segmentrefine3d_parameters

get_angular_restraint_title

get_restraint_phrase

get_translation_range_phrase

get_translational_range_title

set_3dctf_correction_intensity_option

set_3dctf_correction_option

set_amp_corr_out_of_plane_range

set_bin_cutff_enforce_pitch_even_phi

set_choose_out_of_plane_amp_corr

set_enforce_even_phi_distribution

set_enforce_pitch_even_phi

set_frame_averaging_size

set_frame_motion_correction

set_fsc_based_filter_option

set_halfset_refinement_option

set_halfset_start

set_helical_continuity_option

set_helical_symmetry_parameters

set_high_resolution_aim

set_high_resolution_angular_restraint

set_high_resolution_trans_range

set_image_size_to_be_aligned

set_inp_refinement_stack

set_iteration_count

set_local_averaging_size

set_low_resolution_aim

set_low_resolution_angular_restraint

set_low_resolution_trans_range

set_max_resolution_trans_range

set_maximum_resolution_aim

set_maximum_resolution_angular_restraint

set_medium_resolution_aim

set_medium_resolution_angular_restraint

set_medium_resolution_trans_range

set_reference_volume

set_reference_volume_option

set_refine_helical_symmetry

set_refinement_strategy

set_refinement_strategy_options

set_relatives_and_level

set_release_cycle_even_phi

set_resolution_aim_choice

set_volume_prefix_refined_structure

set_resolution_aim_choice(feature_set)[source]
set_refinement_strategy(feature_set)[source]
add_custom_refinement_strategy_as_relative(feature_set, current_parameter)[source]
set_low_resolution_aim(feature_set)[source]
get_restraint_phrase()[source]
get_translation_range_phrase()[source]
get_translational_range_title()[source]
set_low_resolution_trans_range(feature_set)[source]
get_angular_restraint_title()[source]
set_low_resolution_angular_restraint(feature_set)[source]
set_medium_resolution_aim(feature_set)[source]
set_medium_resolution_angular_restraint(feature_set)[source]
set_medium_resolution_trans_range(feature_set)[source]
set_high_resolution_aim(feature_set)[source]
set_high_resolution_angular_restraint(feature_set)[source]
set_high_resolution_trans_range(feature_set)[source]
set_maximum_resolution_aim(feature_set)[source]
set_maximum_resolution_angular_restraint(feature_set)[source]
set_max_resolution_trans_range(feature_set)[source]
set_refinement_strategy_options()[source]
set_halfset_refinement_option(feature_set)[source]
set_halfset_start(feature_set)[source]
set_frame_motion_correction(feature_set)[source]
set_frame_averaging_size(feature_set)[source]
set_local_averaging_size(feature_set)[source]
class sr3d_parameters.SegmentRefine3dReadParameters[source]

Methods

define_alignment_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

define_input_output_iteration(p)[source]
define_helical_symmetry_parameters(p)[source]
define_alignment_parameters(p)[source]
define_refinement_strategy_options(p)[source]
define_selection_parameters(p)[source]
define_filter_parameters(p)[source]
define_reconstruction_parameters(p)[source]
define_mpi_parameters(p)[source]
class sr3d_prepare.SegmentRefine3dUnbending[source]

Methods

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

define_alignment_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

fill_in_excluded_quantities_by_interpolation

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_cut_coordinates_named_tuple

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_picked_segment_coordinates

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_unbending_named_tuple

prepare_unique_updated_stack_name

unbend_window_and_mask_input_stack

get_ref_session_and_last_cycle(ref_cycle_id, ref_db_dir='')[source]
get_all_helices_from_last_refinement_cycle(ref_cycle_id, spring_db)[source]
get_segments_from_helix(session, each_helix)[source]
get_segment_ids_from_helix(session, each_helix)[source]
get_all_segments_from_refinement_cycle(ref_session, last_cycle, helix_segments)[source]
get_avg_helix_shift_x_and_y_and_avg_inplane_angles(orientation_result)[source]
sort_data_and_discard_duplicates(x, y)[source]
extrapolate_second_order_to_end_of_box(xcoord, ycoord, avg_rot_angle, alignment_size, stepsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.extrapolate_second_order_to_end_of_box(np.arange(10) + 10, np.arange(10) + 5, 45, 5 * np.sqrt(2), np.sqrt(2)) 
(array([  6.,   7.,   8.,   9.,  10.,  11.,  12.,  13.,  14.,  15.,  16.,
        17.,  18.,  19.,  20.,  21.,  22.,  23.]), 
        array([  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,  11.,
        12.,  13.,  14.,  15.,  16.,  17.,  18.]))
get_picked_segment_coordinates(each_helix_segments, pixelsize)[source]
fill_in_excluded_quantities_by_interpolation(each_helix_segments, unbending_angles, x_coord, y_coord, each_sel_helix_segments, avg_rot_angle, complete_x, complete_y)[source]
get_cut_coordinates_named_tuple()[source]
get_helix_coordinates_named_tuple()[source]
get_helices_coordinates_required_for_unbending_from_database(prev_ref_cycle_id, each_binfactor, info_series, segment_stack, pixelsize, spring_db='spring.db')[source]
make_unbending_named_tuple()[source]
prepare_unique_updated_stack_name(segment_stack, ref_cycle_id)[source]
unbend_window_and_mask_input_stack(segment_stack, ref_cycle_id, pixelinfo, previous_parameters, mask_params, helices_coordinates, cut_coordinates, masked_segment_stack, resolution_aim)[source]
class sr3d_prepare.SegmentRefine3dPreparation(parset=None)[source]

Methods

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

fill_in_excluded_quantities_by_interpolation

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_cut_coordinates_named_tuple

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_picked_segment_coordinates

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_unbending_named_tuple

prepare_unique_updated_stack_name

unbend_window_and_mask_input_stack

define_all_segmentrefine3d_parameters(p)[source]
class sr3d_prepare.SegmentRefine3dSymmetry(parset=None)[source]

Methods

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_square_root_fsc_filter_to_coefficients

build_structural_mask_from_volume

compute_alignment_size_in_pixels

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

generate_long_helix_volume

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_picked_segment_coordinates

get_ref_file_name

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_reference_info_named_tuple

make_unbending_named_tuple

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_reference_volumes

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

read_large_segment_average_if_running_avg_frames_requested

remove_frames_if_running_avg_frames_requested

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_volume

adjust_volume_dimension_by_padding_or_windowing(reference_volume, reconstruction_size, alignment_size)[source]
get_sizes_that_increase_by_percent(cur_zsize, max_zsize, percent)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.get_sizes_that_increase_by_percent(20, 100, 0.2)
[24, 28, 34, 40, 48, 58, 70, 84, 100]
>>> s.get_sizes_that_increase_by_percent(100, 100, 0.2)
[100]
symmetrize_volume(vol, pixelsize, section_size, rise, rotation)[source]
symmetrize_long_volume_in_steps(vol, helical_symmetry, pixelsize, xy_size, z_size)[source]
generate_long_helix_volume(vol, xy_size, z_size, helical_symmetry, pixelsize, point_symmetry)[source]
compute_rec_size_for_helix(helixwidth, helical_rise, pixelsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> SegmentRefine3d().compute_rec_size_for_helix(200, 1.408, 1.2)
220
compute_alignment_size_in_pixels(alignment_size_in_A, pixelsize)[source]
compute_alignment_and_reconstruction_size_in_pixels(alignment_size_in_A, helical_rise, helixwidth_in_A, pixelsize)[source]

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize(reconstruction_size, reference_volume, pixelsize, alignment_size=None)[source]
get_ref_file_name(ref_id)[source]
make_reference_info_named_tuple()[source]
prepare_reference_volumes()[source]
prepare_3dctf_avg_squared(reconstruction_size, pixelsize)[source]
prepare_binary_layer_line_filters_if_layer_line_filtering_demanded(resolution_aim, each_iteration_number, pixelinfo, helical_symmetry, rotational_sym)[source]
add_tempdir_directory_to_filename(tempdir, segment_stack, masked_segment_stack)[source]
get_frame_stack_path(ori_large_segment_stack, each_frame_id)[source]
read_large_segment_average_if_running_avg_frames_requested(segment_stack, large_segment, each_parameter)[source]
remove_frames_if_running_avg_frames_requested(frame_stack_names)[source]
window_and_mask_input_stack(segment_stack, pixelinfo, mask_params, masked_segment_stack, each_info, ref_cycle_id)[source]
build_structural_mask_from_volume(reference_vol, helixwidthpix, helix_inner_width_pix, pixelsize, sigma_factor=1.0, width_falloff=0.03)[source]
compute_prj_size_from_max_out_of_plane_tilt_and_diameter(alignment_size, tilt_range, helixwidthpix)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.compute_prj_size_from_max_out_of_plane_tilt_and_diameter(600, [-12, 12], 180)
675
prepare_volume_for_projection_by_masking_and_thresholding(resolution_aim, reference_volume, pixelinfo, helical_symmetry, point_symmetry)[source]
apply_square_root_fsc_filter_to_coefficients(fsc_lines, filter_coefficients, projection_size, custom_filter_file, pixelsize)[source]
rescale_freq_filter_columns(ori_pixelsize, rescaled_dimension, rescaled_apix, spat_freq, fourier_coeff)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> freq = np.linspace(0, 0.5, 100)
>>> coeff = np.abs(np.cos(np.linspace(0, np.pi, 100)))
>>> rescaled_freq, rescaled_coeff = s.rescale_freq_filter_columns(1.2, 44, 2.4, freq, coeff)
>>> len(rescaled_freq)
22
>>> rescaled_coeff
array([1.        , 0.99725998, 0.98905491, 0.97542979, 0.95645925,
       0.93224727, 0.90292654, 0.86865772, 0.82962861, 0.78605309,
       0.73816997, 0.68624164, 0.63055267, 0.57140824, 0.50913246,
       0.44406661, 0.37656726, 0.3070043 , 0.23575894, 0.1632216 ,
       0.08978981, 0.01586596])
rescale_custom_filter_file(custom_filter_file, ori_pixelsize, rescaled_dimension, rescaled_apix)[source]
write_out_reference_volume(reference_file, each_iteration_number, ref_cycle_id, reference_volume, model_id=None)[source]
filter_and_mask_reference_volume(resolution_aim, each_reference, pixelinfo, fsc_lines=None)[source]
class sr3d_project.SegmentRefine3dPreparationStrategy(parset=None)[source]

Methods

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_square_root_fsc_filter_to_coefficients

build_structural_mask_from_volume

compute_alignment_size_in_pixels

compute_resolution_ranges_for_binseries

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

generate_long_helix_volume

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_picked_segment_coordinates

get_ref_file_name

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_reference_volumes

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

read_large_segment_average_if_running_avg_frames_requested

remove_frames_if_running_avg_frames_requested

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_res_expectation

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_volume

make_series_info_named_tuple()[source]
compute_resolution_ranges_for_binseries(bin_series, pixelsize)[source]
set_res_expectation()[source]
get_closest_binfactors(pixel_res, bin_series)[source]
determine_res_ranges_and_binfactors_to_be_used(pixelsize, resolution_aim)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> res_aim = {'low': True, 'medium': True, 'high': True, 'max': False}
>>> s.determine_res_ranges_and_binfactors_to_be_used(1.78, res_aim)
{'low': 4, 'medium': 2, 'high': 1}
>>> res_aim['max']=True
>>> s.determine_res_ranges_and_binfactors_to_be_used(0.6, res_aim)
{'low': 13, 'medium': 7, 'high': 4, 'max': 1}
get_and_distribute_total_iteration_count(total_iteration_count, aims)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> dd = {'low': True, 'medium': True, 'high': True, 'max': False}
>>> s.get_and_distribute_total_iteration_count(14, dd)
{'low': 5, 'medium': 5, 'high': 4}
>>> s.get_and_distribute_total_iteration_count(7, dd)
{'low': 3, 'medium': 2, 'high': 2}
define_series_of_search_steps(pixelsize, refine_strategy, low_resolution, medium_resolution, high_resolution, max_resolution, total_iteration_count)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> low_res = (False, (180.0, 180.0), (30, 20))
>>> medium_res = (True, (180.0, 180.0), (20, 10))
>>> high_res = (True, (20.0, 10.0), (10, 5)) 
>>> max_res = (False, (2.0, 2.0), (5, 2.5))
>>> p = 1.372, True, low_res, medium_res, high_res, max_res, 10
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=3, resolution_aim='medium', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=4.859086491739553, y_range=2.4295432458697763, 
max_range=4.859086491739553, pixelsize=4.1160000000000005, iteration_count=5), 
series_info(bin_factor=2, resolution_aim='high', azimuthal_restraint=20.0, 
out_of_plane_restraint=10.0, x_range=3.6443148688046643, y_range=1.8221574344023321, 
max_range=7.2886297376093285, pixelsize=2.744, iteration_count=5)], 10)
>>> low_res = (True, (180.0, 180.0), (30, 20))
>>> medium_res = (True, (180.0, 180.0), (20, 10))
>>> high_res = (True, (20.0, 10.0), (10, 5)) 
>>> max_res = (True, (2.0, 2.0), (5, 2.5))
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 18
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=7, resolution_aim='low', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=3.571428571428571, y_range=2.380952380952381, 
max_range=3.571428571428571, pixelsize=8.4, iteration_count=5), series_info(bin_factor=3, 
resolution_aim='medium', azimuthal_restraint=180.0, out_of_plane_restraint=180.0, 
x_range=5.555555555555556, y_range=2.777777777777778, max_range=8.333333333333334,
 pixelsize=3.5999999999999996, iteration_count=5), series_info(bin_factor=2, 
 resolution_aim='high', azimuthal_restraint=20.0, out_of_plane_restraint=10.0, 
 x_range=4.166666666666667, y_range=2.0833333333333335, max_range=12.5, pixelsize=2.4, 
 iteration_count=4), series_info(bin_factor=1, resolution_aim='max', azimuthal_restraint=2.0, 
 out_of_plane_restraint=2.0, x_range=4.166666666666667, y_range=2.0833333333333335, 
 max_range=25.0, pixelsize=1.2, iteration_count=4)], 18)
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 18
>>> ps = s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
>>> [(each.bin_factor, each.pixelsize) for each in ps[0]]
[(7, 8.4), (3, 3.5999999999999996), (2, 2.4), (1, 1.2)]
>>> p = 0.6, True, low_res, medium_res, high_res, max_res, 18
>>> ps = s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6])
>>> [(each.bin_factor, each.pixelsize) for each in ps[0]]
[(13, 7.8), (7, 4.2), (4, 2.4), (1, 0.6)]
>>> low_res  = (True, (180.0, 180.0), (30, 20))
>>> medium_res = (True,(180.0, 180.0), (20, 10))
>>> high_res = (False, (20.0, 10.0), (10, 5))
>>> max_res = (False, (2.0, 2.0), (5, 2.5))
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 13
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=7, resolution_aim='low', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=3.571428571428571, y_range=2.380952380952381, 
max_range=3.571428571428571, pixelsize=8.4, iteration_count=7), series_info(bin_factor=3, 
resolution_aim='medium', azimuthal_restraint=180.0, out_of_plane_restraint=180.0, 
x_range=5.555555555555556, y_range=2.777777777777778, max_range=8.333333333333334, 
pixelsize=3.5999999999999996, iteration_count=6)], 13)
>>> low_res = (False, (180.0, 180.0), (30, 20))
>>> medium_res = (False, (180.0, 180.0), (20, 10))
>>> high_res = (False, (20.0, 10.0), (10, 5))
>>> max_res = (True, (2.0, 2.0), (5, 2.5))
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 7
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=1, resolution_aim='max',
azimuthal_restraint=2.0, out_of_plane_restraint=2.0,
x_range=4.166666666666667, y_range=2.0833333333333335,
max_range=4.166666666666667, pixelsize=1.2, iteration_count=7)], 7)
>>> low_res = (False, (180.0, 180.0), (30, 20))
>>> medium_res = (True, (180.0, 180.0), (20, 10))
>>> high_res = (True, (10.0, 5.0), (10.0, 5.0))
>>> max_res = (False, (2.0, 2.0), (5, 2.5))
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 7
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=3, resolution_aim='medium', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=5.555555555555556, y_range=2.777777777777778, 
max_range=5.555555555555556, pixelsize=3.5999999999999996, iteration_count=4), 
series_info(bin_factor=2, resolution_aim='high', azimuthal_restraint=10.0, 
out_of_plane_restraint=5.0, x_range=4.166666666666667, y_range=2.0833333333333335, 
max_range=8.333333333333334, pixelsize=2.4, iteration_count=3)], 7)
>>> low_res = (True, (180.0, 180.0), (30, 20))
>>> medium_res = (True, (180.0, 180.0), (20, 10))
>>> high_res = (True, (20.0, 10.0), (10, 5))
>>> max_res = (True, (2.0, 2.0), (5, 2.5))
>>> p = 1.2, True, low_res, medium_res, high_res, max_res, 3
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=7, resolution_aim='low', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=3.571428571428571, y_range=2.380952380952381, 
max_range=3.571428571428571, pixelsize=8.4, iteration_count=1), series_info(bin_factor=3, 
resolution_aim='medium', azimuthal_restraint=180.0, out_of_plane_restraint=180.0, 
x_range=5.555555555555556, y_range=2.777777777777778, max_range=8.333333333333334, 
pixelsize=3.5999999999999996, iteration_count=1), series_info(bin_factor=2, 
resolution_aim='high', azimuthal_restraint=20.0, out_of_plane_restraint=10.0, 
x_range=4.166666666666667, y_range=2.0833333333333335, max_range=12.5, pixelsize=2.4, 
iteration_count=1), series_info(bin_factor=1, resolution_aim='max', azimuthal_restraint=2.0, 
out_of_plane_restraint=2.0, x_range=4.166666666666667, y_range=2.0833333333333335, max_range=25.0, 
pixelsize=1.2, iteration_count=1)], 4)
>>> low_res = (False, (180.0, 180.0), (30, 20))
>>> medium_res = (False, (180.0, 180.0), (20, 10))
>>> high_res = (False, (10.0, 5.0), (10.0, 5.0))
>>> max_res = (False, (2.0, 2.0), (5, 2.5))
>>> p = 3.5, True, low_res, medium_res, high_res, max_res, 3
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
Traceback (most recent call last):
  File '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py', line 1254, in __run
    compileflags, 1) in test.globs
  File '<doctest segmentrefine3d_prj_algn.SegmentRefine3dAlign.define_series_of_search_steps[9]>', line 1, in
  <module>
    s.define_series_of_search_steps(1.2, True, False, False, False, False)
  File 'spring/segment3d/segmentrefine3d_prj_algn.py', line 975, in define_series_of_search_steps
    raise ValueError, error_msg
ValueError: You have specified to assemble a refinement strategy without any resolution aim. Please, specify at
least one resolution range you are targeting.
>>> low_res = (True, (180.0, 180.0), (30, 20))
>>> medium_res = (True, (180.0, 180.0), (20, 10))
>>> high_res = (True, (180.0, 20.0), (10.0, 5.0))
>>> max_res = (False, (2.0, 2.0), (5, 2.5))
>>> p = 1.78, True, low_res, medium_res, high_res, max_res, 15
>>> s.define_series_of_search_steps(p[0], p[1], p[2], p[3], p[4], p[5], p[6]) 
([series_info(bin_factor=4, resolution_aim='low', azimuthal_restraint=180.0, 
out_of_plane_restraint=180.0, x_range=4.213483146067416, y_range=2.8089887640449436, 
max_range=4.213483146067416, pixelsize=7.12, iteration_count=5), series_info(bin_factor=2, 
resolution_aim='medium', azimuthal_restraint=180.0, out_of_plane_restraint=180.0, 
x_range=5.617977528089887, y_range=2.8089887640449436, max_range=8.426966292134832, 
pixelsize=3.56, iteration_count=5), series_info(bin_factor=1, resolution_aim='high', 
azimuthal_restraint=180.0, out_of_plane_restraint=20.0, x_range=5.617977528089887, 
y_range=2.8089887640449436, max_range=16.853932584269664, pixelsize=1.78, iteration_count=5)], 15)
class sr3d_project.SegmentRefine3dProjection(parset=None)[source]

Methods

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_square_root_fsc_filter_to_coefficients

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_resolution_ranges_for_binseries

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

generate_long_helix_volume

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_picked_segment_coordinates

get_ref_file_name

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_reference_volumes

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

remove_frames_if_running_avg_frames_requested

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_res_expectation

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(np.arange(78, 106, 4, dtype=float)) 
array([ 78.        ,  80.20802669,  83.08024783,  90.        ,
        96.91975217,  99.79197331, 102.        ])
>>> s.generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(np.arange(78, 106, 2, dtype=float)) 
array([ 78.        ,  79.0488977 ,  80.20802669,  81.52248781,
        83.08024783,  85.10848412,  90.        ,  95.28021705,
        97.47000184,  99.15209489, 100.5716871 , 101.82371539,
       102.95685186, 104.        ])
generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(helical_rotation, azimuth_view_count)[source]
  • Function contributed by Ambroise Desfosses (May 2012)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(22.04, 6)
array([  0.        ,  25.71333333,  51.42666667,  77.14      ,
       102.85333333, 128.56666667])
>>> s.generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(-22.04, 6)
array([  0.        ,  25.71333333,  51.42666667,  77.14      ,
       102.85333333, 128.56666667])
generate_Euler_angles_for_projection(azimuthal_count, out_of_plane_range, out_of_plane_count, helical_rotation)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.generate_Euler_angles_for_projection(4, [0, 0], 0, 22.04) 
[[0.0, 90.0, 270.0, 0.0, 0.0], [27.549999999999997, 90.0, 270.0, 0.0,
0.0], [55.099999999999994, 90.0, 270.0, 0.0, 0.0], [82.65,
90.0, 270.0, 0.0, 0.0]]
>>> s.generate_Euler_angles_for_projection(4, [-8, 8], 3, 22.04) 
[[0.0, 82.0, 270.0, 0.0, 0.0], [27.549999999999997, 82.0, 270.0, 0.0, 0.0], 
[55.099999999999994, 82.0, 270.0, 0.0, 0.0], [82.65, 82.0, 270.0, 0.0, 0.0], 
[0.0, 90.0, 270.0, 0.0, 0.0], [27.549999999999997, 90.0, 270.0, 0.0, 0.0], 
[55.099999999999994, 90.0, 270.0, 0.0, 0.0], [82.65, 90.0, 270.0, 0.0, 0.0], 
[0.0, 98.0, 270.0, 0.0, 0.0], [27.549999999999997, 98.0, 270.0, 0.0, 0.0], 
[55.099999999999994, 98.0, 270.0, 0.0, 0.0], [82.65, 98.0, 270.0, 0.0, 0.0]]
>>> s.generate_Euler_angles_for_projection(2, [-8, 8], 3, 22.04) 
[[0.0, 82.0, 270.0, 0.0, 0.0], 
[33.06, 82.0, 270.0, 0.0, 0.0], 
[0.0, 90.0, 270.0, 0.0, 0.0], 
[33.06, 90.0, 270.0, 0.0, 0.0], 
[0.0, 98.0, 270.0, 0.0, 0.0], 
[33.06, 98.0, 270.0, 0.0, 0.0]]
>>> s.generate_Euler_angles_for_projection(4, [-8, -8], 0, 22.04) 
[[0.0, 82.0, 270.0, 0.0, 0.0], [27.549999999999997, 82.0, 270.0, 0.0,
0.0], [55.099999999999994, 82.0, 270.0, 0.0, 0.0], [82.65,
82.0, 270.0, 0.0, 0.0]]
>>> s.generate_Euler_angles_for_projection(4, [0, 0], 0, 0) 
[[0.0, 90.0, 270.0, 0.0, 0.0], [90.0, 90.0, 270.0, 0.0, 0.0], [180.0,
90.0, 270.0, 0.0, 0.0], [270.0, 90.0, 270.0, 0.0, 0.0]]
>>> s.generate_Euler_angles_for_projection(4, [-12.0, 12.0], 1, 58) 
[[0.0, 90.0, 270.0, 0.0, 0.0], [72.5, 90.0, 270.0, 0.0, 0.0], 
[145.0, 90.0, 270.0, 0.0, 0.0], [217.5, 90.0, 270.0, 0.0, 0.0]]
collect_prj_params_and_update_reference_info(updated_ref_files, each_reference, projection_stack, projection_parameters, fine_projection_stack, fine_projection_parameters, merged_prj_params, merged_fine_prj_params)[source]
merge_prj_ref_stacks_into_single_prj_stack(updated_ref_files, prj_attr)[source]
write_out_reference_and_get_prj_prefix_depending_on_number_of_models(reference_files, ref_cycle_id, each_iteration_number, each_reference, reference_volume)[source]
copy_image_stack_to_new_stack(projection_stack, local_projection_stack)[source]
copy_image_stack_to_new_stack_shutil(projection_stack, local_projection_stack)[source]
generate_projection_stack(resolution_aim, cycle_number, reference_volume, pixelinfo, azimuthal_angle_count, out_of_plane_tilt_angle_count, projection_stack, helical_symmetry, rotational_sym)[source]
project_through_reference_volume_in_helical_perspectives(resolution_aim, cycle_number, reference_volume_file, pixelinfo, helical_symmetry, rotational_sym, prj_prefix='projection_stack')[source]
class sr3d_project.SegmentRefine3dProjectionLayerLineFilter(parset=None)[source]

Methods

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_resolution_ranges_for_binseries

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_ref_file_name

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_reference_volumes

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

remove_frames_if_running_avg_frames_requested

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_res_expectation

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(pixelsize, powersize, reciprocal_Angstrom)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(2.0, 200, 0.25)
100
>>> s.convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(2.0, 200, 0.05)
20
convert_Fouier_pixel_to_reciprocal_Angstrom(pixelsize, powersize, Fourier_pixel)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.convert_Fouier_pixel_to_reciprocal_Angstrom(2.0, 200, 100)
0.25
>>> s.convert_Fouier_pixel_to_reciprocal_Angstrom(2.0, 200, 20)
0.05
determine_Fourier_pixel_position_of_highest_resolution_layer_line(helical_symmetry, rotational_sym, helixwidth, pixelsize, powersize, tilt)[source]
compute_corresponding_tilts_from_Fourier_pixel_series(no_tilt_pixel, tilted_series)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.compute_corresponding_tilts_from_Fourier_pixel_series(200, 201)
5.717679685251981
blur_ideal_power_spectrum_by_even_out_of_plane_variation(helical_symmetry, rotational_sym, helixwidth, pixelsize, powersize, each_unique_tilt, out_of_plane_blur, no_tilt_pixel)[source]
generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles(tilts, helical_symmetry, rotational_sym, helixwidth, pixelsize, powersize, binary=True, out_of_plane_blur=None)[source]
get_maximum_pixel_displacement_by_inplane_rotation_at_edge(inplane_blur, powersize, pixel_pos)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.get_maximum_pixel_displacement_by_inplane_rotation_at_edge(5, 200, 80)
8
>>> s.get_maximum_pixel_displacement_by_inplane_rotation_at_edge(-5, 200, 80)
-9
>>> s.get_maximum_pixel_displacement_by_inplane_rotation_at_edge(-0.3, 200, 80)
0
generate_power_spectrum_average_by_inplane_angle_blurring(power_spectrum, inplane_blur, helical_symmetry, rotational_sym, helixwidth, pixelsize, binary=True)[source]
get_padsize_and_unique_tilts(alignment_size, projection_parameters)[source]
compute_angular_blur_based_on_Crowther_criterion(ref_cycle_id, outer_diameter, pixelsize)[source]
apply_inplane_blurring_to_set_of_power_spectra(ideal_power_imgs, helical_symmetry, rotational_sym, helixwidth, pixelsize, angular_blur, binary=True)[source]
generate_binary_layer_line_filters_including_angular_blur(projection_parameters, pixelinfo, helical_symmetry, rotational_sym, angular_blur=None)[source]
filter_projections_using_provided_layer_line_filters(projection_parameters, prj_ids, projection_stack, unique_tilts, padsize, ideal_power_imgs, pixelinfo)[source]
filter_layer_lines_if_demanded(resolution_aim, projection_parameters, prj_ids, projection_stack, pixelinfo, helical_symmetry, rotational_sym)[source]
class sr3d_align.SegmentRefine3dAlignMatch(parset=None)[source]

Methods

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_resolution_ranges_for_binseries

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_ref_file_name

get_ref_session_and_last_cycle

get_segment_ids_from_helix

get_segments_from_helix

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_reference_volumes

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

remove_frames_if_running_avg_frames_requested

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_res_expectation

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

prepare_segment_for_alignment(masked_segment_stack, previous_params, segment_size, each_info, limit_search_ranges=True)[source]
convert_Euler_angles_to_mirrored_sparx(phi, theta, psi)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> phi, theta, psi = s.convert_Euler_angles_from_mirrored_sparx(90, 90, 270)
>>> s.convert_Euler_angles_to_mirrored_sparx(phi, theta, psi)
(90.0, 90.0, 270.0)
convert_Euler_angles_from_mirrored_sparx(phi, theta, psi)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.convert_Euler_angles_from_mirrored_sparx(90, 90, 270)
(270.0, 90.0, 270.0)
>>> s.convert_Euler_angles_from_mirrored_sparx(np.linspace(0, 360, 2), np.linspace(82, 98, 2), 270 * np.ones(2))
(array([180., 180.]), array([98., 82.]), array([270., 270.]))
combine_determined_parameters_to_final_five(previous_params, reference_rings, projection_parameters, ang, sxs, s_ys, mirror, matched_reference_id, peak)[source]

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

find_inplane_to_match(phiA, thetaA, phiB, thetaB, psiA=0, psiB=0)[source]

Find the z rotation such that ZA RA is as close as possible to RB

this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

filter_angle_ids_according_to_search_restraint(phis, phi_ids, each_phi, phi_restraint, max_angle=360.0)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.filter_angle_ids_according_to_search_restraint(np.arange(0, 360.0, 10), np.arange(36), 55.0, 80.0)
array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12.,
       13., 34., 35.])
>>> s.filter_angle_ids_according_to_search_restraint(np.arange(0, 360.0, 10), np.arange(36), 335.0, 80.0)
array([ 0.,  1.,  2.,  3.,  4.,  5., 26., 27., 28., 29., 30., 31., 32.,
       33., 34., 35.])
>>> s.filter_angle_ids_according_to_search_restraint(np.arange(0, 360.0, 10), np.arange(36), 135.0, 80.0)
array([ 6.,  7.,  8.,  9., 10., 11., 12., 13., 14., 15., 16., 17., 18.,
       19., 20., 21.])
>>> s.filter_angle_ids_according_to_search_restraint(np.arange(82.0, 99.0), np.arange(17.0), 82.0, 3.0)
array([0., 1., 2.])
compute_distance(this_phi, this_theta, phis, thetas)[source]
get_closest_projection_from_projection_list(this_phi, this_theta, phis, thetas, ids)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> phis = np.arange(10, 90, 10)
>>> thetas = np.array(8 * [90.0])
>>> ids = np.arange(len(phis))
>>> s.get_closest_projection_from_projection_list(350, 90, phis, thetas, ids)
(0, 10, 90.0)
>>> phis = np.array(8 * np.arange(10, 90, 10).tolist())
>>> thetas = np.array([each_theta for each_theta in np.arange(82, 98, 2) for each_time in range(8)])
>>> ids = np.arange(len(phis))
>>> s.get_closest_projection_from_projection_list(350, 98, phis, thetas, ids)
(56, 10, 96)
select_reference_rings_according_to_angular_restraints(reference_rings, each_info, projection_parameters, each_proj_parameter)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> ref_rings = ['first_ring', 'second_ring']
>>> restraint_tuple = s.get_restraint_tuple()
>>> info = restraint_tuple(20, 20, 5, 5, 5)
>>> proj_tuple = s.get_prj_params_named_tuple()
>>> proj_params = [proj_tuple(0, 0, 0, 90, 270, 0, 0), proj_tuple(1, 0, 350, 90, 270, 0, 0)]
>>> last_param = proj_tuple(0, 0, 0, 90, 270, 0, 0)
>>> s.select_reference_rings_according_to_angular_restraints(ref_rings, info, proj_params, last_param) 
(['first_ring', 'second_ring'], 
[prj_parameters(id=0, model_id=0, phi=0, theta=90, psi=270, shift_x=0, shift_y=0), 
prj_parameters(id=1, model_id=0, phi=350, theta=90, psi=270, shift_x=0, shift_y=0)], 
('340.00 - 20.00', '90.00 - 90.00'))
>>> proj_params = [proj_tuple(0, 0, 0, 60, 270, 0, 0), proj_tuple(1, 0, 0, 90, 270, 0, 0)]
>>> s.select_reference_rings_according_to_angular_restraints(ref_rings, info, proj_params, last_param) 
(['second_ring'], 
[prj_parameters(id=1, model_id=0, phi=0, theta=90, psi=270, shift_x=0, shift_y=0)], 
('340.00 - 20.00', '70.00 - 110.00'))
>>> proj_params = [proj_tuple(0, 0, 0, 60, 270, 0, 0), proj_tuple(1, 0, 330, 90, 270, 0, 0)]
>>> s.select_reference_rings_according_to_angular_restraints(ref_rings, info, proj_params, last_param) 
(['first_ring'], 
[prj_parameters(id=0, model_id=0, phi=0, theta=60, psi=270, shift_x=0, shift_y=0)], 
('340.00 - 20.00', '70.00 - 110.00'))
>>> proj_params = [proj_tuple(0, 1, 0, 90, 270, 0, 0), proj_tuple(1, 0, 350, 90, 270, 0, 0)]
>>> s.select_reference_rings_according_to_angular_restraints(ref_rings, info, proj_params, last_param) 
(['second_ring'], 
[prj_parameters(id=1, model_id=0, phi=350, theta=90, psi=270, shift_x=0, shift_y=0)], 
('340.00 - 20.00', '90.00 - 90.00'))
match_each_image_against_all_projections_with_delta_in_plane_restraint(masked_segment_stack, previous_params, reference_rings, projection_parameters, each_info, step_x, delta_psi, polar_interpolation_parameters, segment_size, full_circle_mode='F')[source]

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1. EMAN::EMData*, std::__1::vector<EMAN::EMData*, 2. std::__1::allocator<EMAN::EMData*> >, std::__1::vector<float, std::__1::allocator<float> > image, 3. std::__1::vector<float, std::__1::allocator<float> > crefim, 4. float xrng, std::__1::basic_string<char, std::__1::char_traits<char>, 5. std::__1::allocator<char> > yrng, 6. std::__1::vector<int, std::__1::allocator<int> > step, 7. float mode, 8. float numr, 9. float cnx, 10. float cny 11. 0.0 12. delta_psi)

refine_each_image_against_projections_including_delta_inplane_restraint(masked_segment_stack, previous_params, reference_rings, projection_parameters, each_info, step_x, step_angle, delta_psi, polar_interpolation_parameters, segment_size, full_circle_mode='F')[source]
class sr3d_align.SegmentRefine3dAlign(parset=None)[source]

Methods

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

enter_orientation_parameters

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

find_maximum_cross_correlation_for_local_in_plane_angle

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_euler_angles_to_reference_rings

set_res_expectation

setup_parameter_containers

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

set_euler_angles_to_reference_rings(reference_rings, reference_angles)[source]
prepare_reference_rings_from_projections(projection_stack, projection_parameters, alignment_size, max_range)[source]
make_named_tuple_of_orientation_parameters()[source]
get_masking_parameters(masking_parameters, mask_params, each_segment, pixelsize)[source]
make_named_tuple_of_masking_parameters()[source]
compute_optimum_phi_and_index_closest_to_one_of_prj_phis(multiples, phis, prj_phis)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> mult = np.array([0, 1, 2]) 
>>> phis = np.array([325, 97, 355])
>>> prj_phis = np.array([0, 90, 180, 270])
>>> s.compute_optimum_phi_and_index_closest_to_one_of_prj_phis(mult, phis, prj_phis)
(355, 2)
reduce_y_shifts_and_phis_to_half_stepsize(orientation_result, helix_y_shifts, helical_symmetry, projection_parameters, stepsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> n_phi = namedtuple('orient', 'phi')
>>> o_rslt = [n_phi(5), n_phi(87), n_phi(330), n_phi(350)]
>>> y_shifts = np.array([1, 2, 4, 5])
>>> prj_params = [[0], [90], [180], [270]]
>>> s = SegmentRefine3d()
>>> s.reduce_y_shifts_and_phis_to_half_stepsize(o_rslt, y_shifts, (1, 10), prj_params, 10) 
(array([ 1.,  2., -2., -3.]), array([  5.,  87., 270., 270.]))
>>> s.reduce_y_shifts_and_phis_to_half_stepsize(o_rslt, y_shifts, (0, 10), prj_params, 10) 
(array([1., 2., 4., 5.]), array([  5.,  87., 330., 350.]))
enter_orientation_parameters(orientation_parameters, phi, psi, x_shift, y_shift, each_segment, inplane_angle, pixelsize, model_id=None)[source]
setup_parameter_containers()[source]
get_zero_parameters_for_initial_stages_of_refinement(temp_db, included_nonorientation_segments)[source]
get_refined_parameters_for_advanced_stages_of_refinement(each_info, reference_files, included_nonorientation_segments, temp_ref_db, last_cycle, ref_session)[source]
prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle(each_info, info_series, ref_cycle_id, each_iteration_number, reference_files)[source]
find_maximum_cross_correlation_for_local_in_plane_angle(masked_segment_stack, step_x, each_info, reference_rings, projection_parameters, polar_interpolation_parameters, previous_params, alignment_size)[source]
get_restraint_tuple()[source]
refine_local_inplane_angle(masked_segment_stack, step_x, each_info, x_range, y_range, delta_in_plane_rotation, step_angle, reference_rings, projection_parameters, polar_interpolation_parameters, coarse_determined_params, fine_projection_stack, alignment_size)[source]
convert_coarse_into_fine_parameters(coarse_params)[source]
get_prj_params_named_tuple()[source]
get_prj_stack_name_with_ending(projection_stack, ending)[source]
copy_out_angular_series(projection_stack, azimuthal_prj_stack, azimuthal_angles)[source]
get_azimuthal_angles_from_prj_params(projection_parameters, model_id=None, unique_angle='theta')[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> proj_params = s.generate_Euler_angles_for_projection(4, [-8, 8], 3, 22.04) 
>>> proj_params = [[0]+ each_p for each_p in proj_params]
>>> proj_tuples = s.convert_list_of_projection_parameters_to_prj_tuples(proj_params)
>>> s.get_azimuthal_angles_from_prj_params(proj_tuples) 
[prj_parameters(id=4, model_id=0, phi=0.0, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=5, model_id=0, phi=27.549999999999997, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=6, model_id=0, phi=55.099999999999994, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=7, model_id=0, phi=82.65, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0)]
>>> s.get_azimuthal_angles_from_prj_params(proj_tuples, 0) 
[prj_parameters(id=4, model_id=0, phi=0.0, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=5, model_id=0, phi=27.549999999999997, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=6, model_id=0, phi=55.099999999999994, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=7, model_id=0, phi=82.65, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0)]
>>> s.get_azimuthal_angles_from_prj_params(proj_tuples, 1)
[]
get_out_of_plane_angles_from_prj_params(projection_parameters, model_id=None)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> proj_params = s.generate_Euler_angles_for_projection(4, [-8, 8], 3, 22.04) 
>>> proj_params = [[0]+ each_p for each_p in proj_params]
>>> proj_tuples = s.convert_list_of_projection_parameters_to_prj_tuples(proj_params)
>>> s.get_out_of_plane_angles_from_prj_params(proj_tuples) 
[prj_parameters(id=2, model_id=0, phi=55.099999999999994, theta=82.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=6, model_id=0, phi=55.099999999999994, theta=90.0, psi=270.0, shift_x=0.0, shift_y=0.0), 
prj_parameters(id=10, model_id=0, phi=55.099999999999994, theta=98.0, psi=270.0, shift_x=0.0, shift_y=0.0)]
>>> s.get_out_of_plane_angles_from_prj_params(proj_tuples, 1)
[]
remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series(prj_info)[source]
convert_list_of_projection_parameters_to_prj_tuples(projection_parameters)[source]
perform_coarse_and_fine_projection_matching(each_info, masked_segment_stack, prj_info, previous_params, alignment_size)[source]
class sr3d_select.SegmentRefine3dSelectionFilter(parset=None)[source]

Methods

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

enforce_even_phi_distribution

enter_orientation_parameters

enter_results_to_segments

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

find_maximum_cross_correlation_for_local_in_plane_angle

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_excluded_refinement_count

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_segments_from_last_cycle

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_euler_angles_to_reference_rings

set_res_expectation

setup_parameter_containers

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

get_excluded_refinement_count(session, included_segments_classes)[source]
filter_refined_segments_by_property(session, ref_session, refined_segment_table_property, last_cycle, property_selection, property_in_or_exclude, property_range)[source]
filter_segments_by_ccc_against_projections(session, ref_session, last_cycle, ccc_proj_selection, ccc_proj_in_or_exclude, ccc_proj_range)[source]
filter_segments_by_out_of_plane_tilt(session, ref_session, last_cycle, out_of_plane_selection, out_of_plane_in_or_exclude, out_of_plane_in_or_ex_range)[source]
filter_segments_when_located_at_end_of_helix(session, alignment_size)[source]
get_selected_segments_from_last_cycle(ref_session)[source]
filter_phis_such_that_distribution_remains_even(phis, peaks, azimuthal_angle_count, min_bin=None)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> phis = np.array([0, 0, 0, 0, 120, 240,240,240,240,240])
>>> s = SegmentRefine3d()
>>> s.filter_phis_such_that_distribution_remains_even(phis, np.arange(100,110), 3)
([3, 2, 4, 9, 8], array([  0,   0, 120, 240, 240]))
randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(pitch, rand_val, each_included_segment)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> seg_info = namedtuple('seg_info', 'inplane_angle phi helix_shift_x_A helix_shift_y_A shift_x_A shift_y_A')
>>> each_segment = seg_info(0., 0., 0., 0., None, None)
>>> SegmentRefine3d().randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(180, 0, each_segment)
(0.0, 0.0, 0.0, 0.0)
>>> SegmentRefine3d().randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(180, 1, each_segment)
(0.0, 180.0, 0.0, 180.0)
>>> SegmentRefine3d().randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(180, 0.5, each_segment)
(180.0, 90.0, 0.0, 90.0)
>>> SegmentRefine3d().randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(180, -0.5, each_segment)
(180.0, -90.0, 0.0, -90.0)
>>> SegmentRefine3d().randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(0, 1, each_segment)
(0.0, 0.0, 0.0, 0.0)
enter_results_to_segments(results, each_segment)[source]
enforce_even_phi_distribution(enforce_even_phi, release_cycle, ref_session, each_info)[source]
class sr3d_select.SegmentRefine3dSelection(parset=None)[source]

Methods

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

enforce_even_phi_distribution

enter_excluded_refinement_counts_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

find_maximum_cross_correlation_for_local_in_plane_angle

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helix_coordinates_named_tuple

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_segments_from_last_cycle

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

setup_new_refinement_db_for_each_cycle(ref_cycle_id)[source]
enter_refinement_parameters_in_database(ref_session, orientation_parameters, unbending_info, current_translation_step, ref_cycle_id, each_info, pixelinfo, rank=None)[source]
get_exluded_ref_count_named_tuple()[source]
enter_excluded_refinement_counts_in_database(ref_segment_count, ref_session, excluded_refinement_counts)[source]
class sr3d_select.SegmentRefine3dParameterAveraging(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_structural_mask_from_volume

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

enforce_even_phi_distribution

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

find_maximum_cross_correlation_for_local_in_plane_angle

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

measure_inplane_angle_and_decide_for_predominant_angle

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

get_selected_segments_from_last_refinement_cycle(session, ref_session, last_cycle, each_helix)[source]
get_distances_from_segment_ids(session, segment_ids)[source]
sort_inplane_angles_into_0_360_or_180_degrees(selected_inplane_angles, cropped_segment_ids, lavg_inplane_angles, distances_from_start)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> sel = np.array([300.0, 301.0, 119.0])
>>> ids = np.array([0, 1, 2])
>>> angles = np.array([300.0, 300.0, 300.0])
>>> dist = np.array([10, 20, 30])
>>> s.sort_inplane_angles_into_0_360_or_180_degrees(sel, ids, angles, dist) 
(array([30]), array([300.]), array([10, 20]), array([300., 300.]), 
array([2]), array([0, 1]), array([59.]), array([240., 241.]))
compute_fitted_parameters(distances, parameters, new_distances=None)[source]
get_inplane_angles_per_segment_and_interpolate_two_oposite_angles(session, ref_session, current_cycle, each_helix)[source]
measure_inplane_angle_and_decide_for_predominant_angle(ref_session, segments, flip, lavg_close_to_0_360, lavg_close_to_180, ids_close_to_0_360, ids_close_to_180, close_to_0_360, close_to_180, discont_spline_fitted_angles_0_360, spline_fitted_angles_180)[source]
enter_helix_inplane_parameters_in_database(session, ref_session, current_cycle, each_helix, flip, close_to_0_360, close_to_180)[source]
normalize_inplane_angles_by_picked_angles(picked_segment_angles, ref_inplane_angles)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> picked = np.arange(80, 90)
>>> refined = np.arange(80.5, 90.5)
>>> s.normalize_inplane_angles_by_picked_angles(picked, refined)
array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
determine_predominant_side_of_angles(picked_segment_angles, flip, ref_inplane_angles, each_helix_stack_ids)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> picked = np.arange(80, 90)
>>> flip = 0 
>>> refined = np.arange(80.5, 90.5)
>>> ids = np.arange(10)
>>> s.determine_predominant_side_of_angles(picked, flip, refined, ids) 
(0, array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), array([], dtype=int64), 
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]))
>>> picked = np.arange(80, 90)
>>> flip = 0
>>> refined = np.arange(260.5, 270.5)
>>> ids = np.arange(20, 30)
>>> s.determine_predominant_side_of_angles(picked, flip, refined, ids) 
(1, array([], dtype=int64), array([20, 21, 22, 23, 24, 25, 26, 27, 28, 29]), 
array([20, 21, 22, 23, 24, 25, 26, 27, 28, 29]), array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]))
get_all_selected_stack_ids(ref_session, current_cycle)[source]
enter_selected_information(polar_helix, ref_session, ref_segments, predominant_set, inplane_angles_normalized, excluded_polarity_ids)[source]
exclude_inplane_angles_outside_delta_psi(restrain_in_plane_rotation, delta_in_plane_rotation, ref_session, current_cycle)[source]
select_segments_based_on_in_plane_rotation(session, ref_session, last_cycle, helices, polar_helix, restrain_in_plane_rotation, delta_in_plane_rotation, included_non_orientation)[source]
get_all_distances_and_selection_mask_from_ref_segments(session, ref_session, last_cycle, each_helix, included_non_orientation)[source]
compute_fit_if_more_than_three_datapoints(all_distances_from_start, quantity, sel_distances_from_start, selected_quantity)[source]
update_average_in_plane_rotation_angle_per_helix(session, ref_session, last_cycle, helices, included_non_orientation)[source]
update_average_out_of_plane_per_helix(session, ref_session, last_cycle, helices, included_non_orientation)[source]
update_average_helix_shift_x_per_helix(session, ref_session, last_cycle, helices, included_segments_non_orientation)[source]
enter_final_ids_into_database(ref_session, last_cycle, final_combined_ids)[source]
determine_forward_difference_and_set_ref_segments(ref_segments, helix_shift_x_A, attr_to_set)[source]
compute_forward_difference_for_selected_segments_and_select(session, ref_session, last_cycle)[source]
prepare_databases_for_selection(orientation_parameters, unbending_info, current_translation_step, ref_cycle_id, each_info, pixelinfo)[source]
select_segments_based_on_out_of_plane_tilt(ref_session, session, last_cycle)[source]
select_refinement_parameters_based_on_selection_criteria_hierarchically(ref_session, ccc_proj_range_vals, session, last_cycle, helices, included_segments_non_orientation)[source]
perform_helix_based_computations_and_selection(each_info, spring_db, ref_session, ccc_proj_range_vals)[source]
get_helices_from_corresponding_frames(session, ref_session)[source]
average_shifts_between_frames_along_helix(x_shifts, window_size)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> shifts = [[each_frame] * 20 for each_frame in list(range(10))]
>>> shifts = [list(range(each_frame, each_frame + 12)) for each_frame in list(range(10))]
>>> shifts = np.array(shifts) ** 2
>>> shifts
array([[  0,   1,   4,   9,  16,  25,  36,  49,  64,  81, 100, 121],
       [  1,   4,   9,  16,  25,  36,  49,  64,  81, 100, 121, 144],
       [  4,   9,  16,  25,  36,  49,  64,  81, 100, 121, 144, 169],
       [  9,  16,  25,  36,  49,  64,  81, 100, 121, 144, 169, 196],
       [ 16,  25,  36,  49,  64,  81, 100, 121, 144, 169, 196, 225],
       [ 25,  36,  49,  64,  81, 100, 121, 144, 169, 196, 225, 256],
       [ 36,  49,  64,  81, 100, 121, 144, 169, 196, 225, 256, 289],
       [ 49,  64,  81, 100, 121, 144, 169, 196, 225, 256, 289, 324],
       [ 64,  81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361],
       [ 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400]])
>>> avg_shifts = s.average_shifts_between_frames_along_helix(shifts.tolist(), 3)
>>> np.int64(avg_shifts)
array([[ -6,   0,   3,   8,  16,  25,  36,  49,  64,  81, 100, 124],
       [ -3,   3,   8,  15,  24,  36,  49,  64,  81, 100, 121, 146],
       [  0,   8,  15,  24,  36,  49,  64,  81, 100, 121, 144, 170],
       [  6,  15,  24,  36,  49,  64,  81, 100, 121, 144, 169, 197],
       [ 15,  25,  36,  49,  64,  81, 100, 121, 144, 169, 196, 225],
       [ 25,  36,  49,  64,  81, 100, 121, 144, 169, 196, 225, 255],
       [ 38,  49,  64,  81, 100, 121, 144, 169, 196, 225, 256, 288],
       [ 52,  64,  81, 100, 121, 144, 168, 196, 225, 256, 289, 322],
       [ 68,  81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 358],
       [ 87, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 397]])
perform_local_averaging_across_frames(session, ref_session, helix_ids)[source]
sort_and_enter_averaged_shifts(ref_session, shift_info)[source]
perform_local_frame_averaging_and_ref_database_update(spring_db, ref_db, ref_session)[source]
get_selected_alignment_parameters_from_last_cycle(ref_cycle_id, model_id, rank)[source]
update_total_nonorientation_counts_in_ref_db(ref_cycle_id, spring_db, ref_session)[source]
prepare_refined_alignment_parameters_from_database(ref_cycle_id, pixelsize, unbending, reference_files, rank=None)[source]
select_segments_based_on_specified_criteria(orientation_parameters, unbending_info, current_translation_step, ref_cycle_id, each_info, pixelinfo, reference_files)[source]

Program to select segments according to different criteria such as class member, curvature, diffraction quality

class segmentselect.SegmentSelectPar[source]

Class to initiate default dictionary with input parameters including help and range values and status dictionary

Methods

define_parameters_and_their_properties

define_program_states

define_parameters_and_their_properties()[source]
define_program_states()[source]
class segmentselect.SegmentSelectPreparation(parset=None)[source]
  • Class that holds functions to extract members from class average stack

Methods

prepare_list_from_comma_separated_input(…)

  • Function to convert comma or semicolon separated entry string to continuous list of classes

define_defocus_and_astigmatism_selection

define_mics_and_helices_selection

define_selection_parameters_from_segment_table

define_straightness_selection

define_mics_and_helices_selection(obj, p)[source]
define_straightness_selection(obj, p)[source]
define_defocus_and_astigmatism_selection(obj, p)[source]
define_selection_parameters_from_segment_table(obj, p)[source]
prepare_list_from_comma_separated_input(entry, filter_criterion)[source]
  • Function to convert comma or semicolon separated entry string to continuous list of classes

  1. Input: comma or semicolon separated entry string

  2. Output: list of classes

  3. Usage: list = prepare_list_from_comma_separated_input(inputstring)

>>> from spring.segment2d.segmentselect import SegmentSelect
>>> ss = SegmentSelect()
>>> ss.prepare_list_from_comma_separated_input('1 ', 'micrograph')
[1]
>>> ss.prepare_list_from_comma_separated_input('1,2', 'class')
[1, 2]
>>> input = '1,2, 5-10; 66, 99-101'
>>> ss.prepare_list_from_comma_separated_input(input, 'class') 
[1, 2, 5, 6, 7, 8, 9, 10, 66, 99, 100, 101]
>>> input += '; j'
>>> ss.prepare_list_from_comma_separated_input(input, 'class') 
Traceback (most recent call last):
ValueError: Specified class numbers could not be interpreted as integer
 numbers, double-check entry.
class segmentselect.SegmentSelectFilter(parset=None)[source]

Methods

check_whether_all_segments_were_excluded(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

compute_local_average_from_measurements(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

determine_included_stack_ids_according_to_class_persistence(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

prepare_list_from_comma_separated_input(…)

  • Function to convert comma or semicolon separated entry string to continuous list of classes

define_defocus_and_astigmatism_selection

define_mics_and_helices_selection

define_selection_parameters_from_segment_table

define_straightness_selection

filter_by_properties_that_keep_helices_together

filter_by_property_that_take_helices_apart

filter_non_orientation_parameters_based_on_selection_criteria

filter_segments_by_classes_and_persistence

filter_segments_by_entry_string

filter_segments_by_property

get_excluded_count

read_segment_selection_from_file

summarize_counts

read_segment_selection_from_file(segments, segments_selection, segments_in_or_exclude, segment_file)[source]
compute_local_average_from_measurements(segment_measurements, window_size)[source]
>>> from spring.segment2d.segmentselect import SegmentSelect
>>> SegmentSelect().compute_local_average_from_measurements(np.arange(10), 4)
array([1.  , 1.  , 1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 6.5 , 7.5 , 8.25])
>>> SegmentSelect().compute_local_average_from_measurements([1., 1., 1., 1., 1., 1., 0., 0., 0., 0.], 4)
array([1.  , 1.  , 1.  , 1.  , 1.  , 0.75, 0.5 , 0.25, 0.  , 0.  ])
>>> rand_series = [0.33, -0.84, -0.55, 0.27, 0.26, -0.09, -0.85, -0.18, 0.71, 0.07]
>>> SegmentSelect().compute_local_average_from_measurements(rand_series, 5)
array([-0.49 , -0.326, -0.106, -0.19 , -0.192, -0.118, -0.03 , -0.068,
       -0.036,  0.276])
>>> SegmentSelect().compute_local_average_from_measurements(np.arange(10), 12)
array([2.5, 2.5, 2.7, 3.1, 3.7, 4.5, 5.4, 6.1, 6.6, 6.9])
>>> SegmentSelect().compute_local_average_from_measurements(rand_series, 2) 
Traceback (most recent call last):
  File '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py', 
      line 1231, in __run
    compileflags, 1) in test.globs
  File '<doctest segment.SegmentSelect.compute_local_average_from_measurements[4]>', 
      line 1, in <module>
    SegmentSelect().compute_local_average_from_measurements(rand_series, 2)
  File 'spring/segment2d/segment.py', line 994, in 
      compute_local_average_from_measurements
    raise ValueError, msg
ValueError: Please choose larger averaging distance or decrease step 
size of segmentation to allow smaller local averaging. Otherwise turn off 
local averaging option.
determine_included_stack_ids_according_to_class_persistence(segments, class_in_or_exclude, persistence_length, class_list, helices, class_occupancy_thres=0.5, class_attr='class_id')[source]
>>> from spring.segment2d.segmentselect import SegmentSelect
>>> class_list = [1, 2]
>>> stack_ids = range(10, 30)
>>> class_ids = 6 * [0] + 6 * [1] + 8 * [2] 
>>> helix_ids = 10 * [11] + 10 * [12]
>>> distances = 2 * np.linspace(0., 1400., 10).tolist()
>>> segment_nt = namedtuple('seg', 'stack_id class_id, helix_id, distance_from_start_A')
>>> segments = [segment_nt._make(each_info) for each_info in list(zip(stack_ids, class_ids, helix_ids, distances))]
>>> helix_nt = namedtuple('hel', 'id')
>>> helices = [helix_nt(each_helix_id) for each_helix_id in set(helix_ids)]
>>> s = SegmentSelect()
>>> s.determine_included_stack_ids_according_to_class_persistence(segments, 'include', 700, class_list, helices)
[16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
>>> s.determine_included_stack_ids_according_to_class_persistence(segments, 'exclude', 700, class_list, helices)
[10, 11, 12, 13, 14, 15]
>>> helix_ids = 10 * [15] + 10 * [12]
>>> segments = [segment_nt._make(each_info) for each_info in list(zip(stack_ids, class_ids, helix_ids, distances))]
>>> s.determine_included_stack_ids_according_to_class_persistence(segments, 'include', 700, class_list, helices)
[20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
>>> class_list = [0, 1]
>>> class_ids = 1 * [0] + 1 * [1] + 8 * [2] + 1 * [0] + 1 * [1] + 8 * [2] 
>>> segments = [segment_nt._make(each_info) for each_info in list(zip(stack_ids, class_ids, helix_ids, distances))]
>>> s.determine_included_stack_ids_according_to_class_persistence(segments, 'include', 700, class_list, helices)
[]
filter_segments_by_classes_and_persistence(session, segments, classes_selection, class_in_or_exclude, class_entries, persistence_class, persistence_length, class_occupancy_thres, class_type)[source]
filter_segments_by_entry_string(segments, attr_id, attr_selection, attr_in_or_exclude, attr_entries, filter_criterion)[source]
get_excluded_count(session, included_segments_classes)[source]
filter_segments_by_property(session, segment_table_property, property_selection, property_in_or_exclude, property_range)[source]
filter_by_properties_that_keep_helices_together(obj, session, segments)[source]
filter_by_property_that_take_helices_apart(obj, session, segments)[source]
check_whether_all_segments_were_excluded(combined_included_segments, included_segments_mics, included_segments_helices, included_segments_classes, included_segments_curve, included_segments_defocus, included_segments_astigmatism, included_segments_ccc_layer)[source]
>>> from spring.segment2d.segmentselect import SegmentSelect
>>> s = SegmentSelect()
>>> s.check_whether_all_segments_were_excluded([], [0], [0], [0], [0], [0], [0], [0])
Traceback (most recent call last):
    ...
ValueError: All segments were excluded as a result of stringent 
selection criteria. Please, use less stringent criteria.
>>> s.check_whether_all_segments_were_excluded([], [], [0], [0], [0], [0], [0], [0])
Traceback (most recent call last):
    ...
ValueError: All segments were excluded because of 'micrograph' 
selection criteria. Please, use less stringent selection criteria 
for micrographs.
>>> s.check_whether_all_segments_were_excluded([], [0], [], [], [0], [0], [0], [0])
Traceback (most recent call last):
    ...
ValueError: All segments were excluded because of 'helix', 
'class' selection criteria. Please, use less stringent 
selection criteria for helices, classes.
summarize_counts(included_segments, excluded_seg_count, included_segments_mics, included_segments_helices, included_segments_defocus, included_segments_astigmatism, excluded_mics_count, excluded_helix_count, excluded_defocus_count, excluded_astig_count, included_segments_curve, included_segments_classes, included_segments_ccc_layer, excluded_class_count, excluded_curvature_count, excluded_layer_count)[source]
filter_non_orientation_parameters_based_on_selection_criteria(obj, spring_db='spring.db', keep_helices_together=False)[source]
class segmentselect.SegmentSelect(parset=None)[source]

Methods

check_whether_all_segments_were_excluded(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

compute_local_average_from_measurements(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

convert_relative_range_to_absolute_range_values(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

determine_included_stack_ids_according_to_class_persistence(…)

>>> from spring.segment2d.segmentselect import SegmentSelect

prepare_list_from_comma_separated_input(…)

  • Function to convert comma or semicolon separated entry string to continuous list of classes

add_filtered_segments

convert_curvature_ccc_layer_range

copy_segments_onto_output_stack

define_defocus_and_astigmatism_selection

define_mics_and_helices_selection

define_selection_parameters_from_segment_table

define_straightness_selection

extract_segments

filter_by_properties_that_keep_helices_together

filter_by_property_that_take_helices_apart

filter_non_orientation_parameters_based_on_selection_criteria

filter_segments_by_classes_and_persistence

filter_segments_by_entry_string

filter_segments_by_property

get_excluded_count

read_segment_selection_from_file

remove_all_previous_entries

summarize_counts

update_ccc_layer_in_each_helix

update_curvature_in_each_helix

update_inplane_angle_in_each_helix

update_records_in_helix

write_out_new_database_for_filtered_stack

remove_all_previous_entries(session, column_name)[source]
copy_segments_onto_output_stack(segment_ids)[source]
add_filtered_segments(segment_ids, session, updated_session)[source]
update_ccc_layer_in_each_helix(updated_session, each_helix)[source]
update_curvature_in_each_helix(updated_session, each_helix)[source]
update_inplane_angle_in_each_helix(updated_session, each_helix)[source]
update_records_in_helix(updated_session)[source]
write_out_new_database_for_filtered_stack(segment_ids)[source]
convert_relative_range_to_absolute_range_values(pers_length, curvature_range_percent)[source]
>>> from spring.segment2d.segmentselect import SegmentSelect
>>> s = SegmentSelect()
>>> s.convert_relative_range_to_absolute_range_values(np.arange(10), [80, 100])
(7, 9)
>>> s.convert_relative_range_to_absolute_range_values(np.arange(10), [0, 20])
(0, 1)
>>> s.convert_relative_range_to_absolute_range_values(np.arange(10), [60, 80])
(5, 7)
convert_curvature_ccc_layer_range(spring_db, straightness_selection, curvature_range, ccc_layer_selection=None, ccc_layer_range=None)[source]
extract_segments()[source]
segmentselect.main()[source]
class sr3d_reconstruct.SegmentRefine3dCylindrical(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_structural_mask_from_volume

cart2polar

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

enforce_even_phi_distribution

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

assemble_image_plane(bessel_line)[source]
build_3d_layer_line_mask_half_as_wide_as_high(image_slice)[source]
index_coords(data, origin=None)[source]

Creates x & y coords for the indicies in a numpy array ‘data’. ‘origin’ defaults to the center of the image. Specify origin=(0,0) to set the origin to the lower left corner of the image.

cart2polar(x, y)[source]
polar2cart(r, theta)[source]
map_new_coordinates(data, ny, nx, xi, yi)[source]
reproject_image_into_polar(data, origin=None)[source]

Reprojects a 3D numpy array (‘data’) into a polar coordinate system. ‘origin’ is a tuple of (x0, y0) and defaults to the center of the image.

reproject_polar_into_image(data, origin=None)[source]
reproject_volume_into_cylinder(data, origin=None)[source]
plot_polar_image(data, origin=None)[source]

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

filter_volume_by_fourier_filter_while_padding(vol, volsize, padsize_along_z, layer_mask)[source]
generate_and_apply_layerline_filter(vol, pixelsize, helical_symmetry, rotational_sym, helixwidth)[source]
class sr3d_reconstruct.SegmentRefine3dReconstruction(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

enter_asymmetric_unit_parameters_in_database(ref_session, symmetry_alignment_parameters, pixelsize)[source]
check_whether_adjacent_values_are_closer_to_cutoff_value(value, fsc_line, first_value_id)[source]
get_resolution_closest_to_value(value, fsc_line, resolution)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> fsc_line = (np.cos(np.linspace(0, 2 * np.pi, 30)) + 1) / 2
>>> res = SegmentExam().make_oneoverres(fsc_line, 3.489)
>>> s = SegmentRefine3d()
>>> s.get_resolution_closest_to_value(0.5, fsc_line, res)
28.908857142857148
>>> s.get_resolution_closest_to_value(0.5, np.ones(30), res)
6.978
>>> fsc_line = np.append(-1 /  np.arange(10.0) + 1, [0.4, 0.2, 0.])
>>> res = SegmentExam().make_oneoverres(fsc_line, 3.489)
>>> s.get_resolution_closest_to_value(0.5, fsc_line, res)
8.373600000000001
>>> fsc_line = [1.0, 0.9640229344367981, 0.9330880641937256, 0.6869177222251892, 0.5881993174552917, 0.6750558614730835, 0.5739578008651733, 0.2881937623023987, 0.3714075982570648, 0.5021396279335022, 0.13414639234542847, 0.2937462329864502]
>>> res = SegmentExam().make_oneoverres(fsc_line, 3.489)
>>> s.get_resolution_closest_to_value(0.143, fsc_line, res)
6.978
enter_fsc_values_in_database(ref_session, fsc_line, amp_cc, variance, mean_error, pixelsize)[source]
update_persistence_length_in_spring_db()[source]
update_segment_subunits_database_with_final_refinement_parameters(ref_session, last_cycle, is_last_cycle)[source]
enter_additional_ref_parameters_in_database(ref_cycle_id, symmetry_alignment_parameters, fsc_line, amp_cc, variance, helical_error, pixelsize, each_reference, is_last_cycle)[source]
generate_file_name_with_apix(each_iteration_number, outfile_prefix, pixelsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> SegmentRefine3d().generate_file_name_with_apix(3, 'test_rec.hdf', 4.55)
'test_rec_455apix_003.hdf'
write_out_file_of_fsc_lines(fsc_lines, pixelsize, fsc_name)[source]
write_out_fsc_line(fsc_lines, pixelsize, fsc_prefix, each_iteration)[source]
get_symmetry_views_count_from_stepsize(helical_symmetry, stepsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> SegmentRefine3d().get_symmetry_views_count_from_stepsize((1.408, 22.03), 70)
50
prepare_helical_reconstruction_using_Fourier_interpolation(large_input_stack, alignment_parameters, helical_symmetry, stepsize, pixelsize, reconstruction_size, rec_stack, point_symmetry)[source]
finish_Fourier_interpolation_reconstruction(r, fftvol, weight)[source]
class sr3d_reconstruct.SegmentRefine3dVolume(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

launch_3dreconstruction_by_SIRT

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_prj_ref_stacks_into_single_prj_stack

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_volume_operations_ctf_and_symmetrization

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

compute_3dreconstruction_by_Fourier_interpolation(large_input_stack, pixelsize, helical_symmetry, stepsize, reconstruction_size, rec_stack, point_symmetry, alignment_parameters)[source]
launch_3dreconstruction_by_SIRT(large_input_stack, pixelsize, helical_symmetry, stepsize, reconstruction_size, rec_stack, point_symmetry, alignment_parameters, mask3d, maxit=40, lam=0.0001, tol=0.0)[source]
compute_3dreconstruction_by_SIRT(large_input_stack, pixelsize, helical_symmetry, stepsize, reconstruction_size, rec_stack, point_symmetry, alignment_parameters, lam)[source]
determine_percent_amplitude_for_Wiener_filter_constant(ctf_correction_type, pixelsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.determine_percent_amplitude_for_Wiener_filter_constant('low', 1.2)
0.009680622
>>> [s.determine_percent_amplitude_for_Wiener_filter_constant('low', e_apix) for e_apix in range(1, 8, 2)]
[0.006534870000000002, 0.03799239, 0.06944991000000002, 0.10090743]
>>> [s.determine_percent_amplitude_for_Wiener_filter_constant('high', e_apix) for e_apix in range(1, 8, 2)]
[0.032674350000000005, 0.18996195, 0.3472495500000001, 0.50453715]
>>> [s.determine_percent_amplitude_for_Wiener_filter_constant('medium', e_apix) for e_apix in range(1, 8, 2)]
[0.016337175000000002, 0.094980975, 0.17362477500000004, 0.252268575]
perform_ctf_correction_on_volume(ctf_correction_type, vol, avg_ctf_squared_file, pixelsize)[source]
perform_ctf_correction_and_volume_symmetrization(resolution_aim, uncorrected_reconstruction, ctf3d_avg_squared, pixelsize, each_reference)[source]
perform_volume_operations_ctf_and_symmetrization(resolution_aim, uncorrected_reconstruction, ctf3d_avg_squared, pixelsize, each_reference)[source]
class sr3d_reconstruct.SegmentRefine3dFsc(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_prj_ref_stacks_into_single_prj_stack

normalize_and_scale_volumes_including_mask_and_compute_fsc

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

if_no_selected_images_left_abort_refinement()[source]
make_fsc_line_named_tuple()[source]
normalize_and_scale_volumes_including_mask_and_compute_fsc(first_rec, second_rec, mask=None)[source]
build_smooth_mask_with_top_and_bottom_cut(reconstruction_size, percent=60)[source]
compute_fsc_of_raw_reconstruction_halves(first_rec, second_rec, top_bottom_cut, reconstruction_size)[source]
compute_fsc_of_cylinder_masked_reconstruction_halves(first_rec, second_rec, top_bottom_cut, pixelinfo)[source]
compute_Fourier_radius(res_cutoff, pixelsize, dim)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.compute_Fourier_radius(20, 5.0, 100)
25
>>> s.compute_Fourier_radius(40, 5.0, 100)
12
>>> s.compute_Fourier_radius(11, 5.0, 100)
45
randomize_quant_beyond_circle(F_phase, circ_np, amp=False)[source]
generate_structure_with_phases_randomized(vol, res_cutoff, pixelsize)[source]
compute_fsc_of_structure_masked_reconstruction_halves(first_rec, second_rec, uncorrected_reconstruction, pixelinfo, top_bottom_cut, res=None)[source]
compute_fsc_of_layer_line_filtered_reconstruction_halves(reconstruction_size, first_rec_norm, second_rec_norm, fsc_mask_vol, pixelinfo, helical_symmetry, rotational_sym)[source]
compute_fsc_on_volumes_from_half_the_dataset(resolution_aim, first_rec, second_rec, pixelinfo, helical_symmetry, rotational_sym)[source]
merge_list_of_helical_errors(helical_error)[source]
prepare_empty_helical_error()[source]
log_helical_error(helical_error)[source]
apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry(alignment_parameters, ref_cycle_id, resolution_aim, large_input_stack, pixelinfo, each_reference, stepsize, rec_stack, lambda_sirt, unbending, rank=None, split_reconstruction=True)[source]
generate_refinement_grid_to_be_evaluated(helical_symmetry, grid_count=25)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.generate_refinement_grid_to_be_evaluated((10.0, 50.0), 5) 
array([[(10.013927576601672, 50.13927576601671),
        (9.958448753462605, 49.86149584487535)],
       [(10.041782729805012, 50.13927576601671),
        (9.986149584487535, 49.86149584487535)]], dtype=object)
>>> s.generate_refinement_grid_to_be_evaluated((10.0, 50.0), 9) 
array([[(10.013927576601672, 50.13927576601671), 
        (9.986111111111112, 50.0),
        (9.958448753462605, 49.86149584487535)],
       [(10.027855153203342, 50.13927576601671), 
       (10.0, 50.0),
        (9.97229916897507, 49.86149584487535)],
       [(10.041782729805012, 50.13927576601671),
        (10.013888888888888, 50.0), (9.986149584487535, 49.86149584487535)]], dtype=object)
>>> grid = s.generate_refinement_grid_to_be_evaluated((10.0, 50.0), 38) 
>>> grid.shape
(6, 6)
generate_refinement_grid_to_be_evaluated_fixed_inc(helical_symmetry, grid_count=25)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.generate_refinement_grid_to_be_evaluated_fixed_inc((10.0, 50.0), 5) 
array([[(10.0, 50.06954102920723), (9.986111111111112, 50.0),
        (9.972260748959778, 49.930651872399444)],
       [(10.013908205841446, 50.06954102920723), (10.0, 50.0),
        (9.98613037447989, 49.930651872399444)],
       [(10.027816411682892, 50.06954102920723),
        (10.013888888888888, 50.0), (10.0, 49.930651872399444)]],
      dtype=object)
>>> s.generate_refinement_grid_to_be_evaluated_fixed_inc((10.0, 50.0), 9) 
array([[(10.0, 50.06954102920723), 
        (9.986111111111112, 50.0),
        (9.972260748959778, 49.930651872399444)],
       [(10.013908205841446, 50.06954102920723), 
       (10.0, 50.0),
        (9.98613037447989, 49.930651872399444)],
       [(10.027816411682892, 50.06954102920723),
        (10.013888888888888, 50.0), 
        (10.0, 49.930651872399444)]], dtype=object)
>>> grid = s.generate_refinement_grid_to_be_evaluated((10.0, 50.0), 38) 
>>> grid.shape
(6, 6)
get_fsc_cutoff_and_mask(pixelinfo, fsc_lines, segment_size)[source]
prepare_local_symmetry_refinement(pixelinfo, each_reference, fsc_lines, ref_cycle_id, large_reconstruction_stack)[source]
compute_helical_autocorrelation_map(reconstruction, pixelinfo, helical_symmetry)[source]
compute_amp_corr_for_different_symmetry_combinations(each_info, pixelinfo, each_reference, sym_comb_rise_seq, corr_rec, mean_out_of_plane, exp_power, segment_size, fourier_mask, fsc_px_cutoff)[source]
round_grid_value_tuples_to_readable_number_of_digits(sym_comb_rise_grid, digit=3)[source]
get_maximum_correlation_symmetry_pair(each_info, pixelinfo, each_reference, sym_comb_rise_grid, amp_ccs, fsc_px_cutoff)[source]
perform_local_symmetry_refinement_based_on_power_spectra_matching(each_info, pixelinfo, ctf3d_avg_squared, each_reference, uncorrected_reconstruction, fsc_lines, ref_cycle_id, large_reconstruction_stack)[source]
class sr3d_diagnostics.EulerPlot[source]

Methods

convert_3d_xyz_vector_latitude_and_longitude(x, y, z)

>>> from spring.segment3d.refine.sr3d_diagnostics import EulerPlot

spider_unit_vector_transformation_by_euler_angles(…)

v = Rv’, where R is the matrix for transforming vector v’ to vector v.

add_colorbar_to_upper_left_corner

convert_latitude_and_longitude_to_xyz

plot_euler_angle_scatter

plot_euler_angles_on_polar_plot_hist

plot_euler_angles_on_polar_plot_scatter

plot_euler_angles_on_sphere

plot_euler_angles_on_spherical_projection

plot_euler_angles_on_spherical_projection_scatter

prepare_plot_including_solid_sphere

read_angles_from_file

set_label_and_grid_of_hammer_sphere

set_phi_theta_label_x_and_y

read_angles_from_file(filename)[source]
spider_unit_vector_transformation_by_euler_angles(phi, theta, psi=None)[source]

v = Rv’, where R is the matrix for transforming vector v’ to vector v.

R = R(psi) * R(theta) * R(phi)

R(psi) = cos(psi) sin(psi) 0
-sin(psi) cos(psi) 0

0 0 1

R(theta) = cos(theta) 0 -sin(theta)

0 1 0

sin(theta) 0 cos(theta)

R(phi) = cos(phi) sin(phi) 0
-sin(phi) cos(phi) 0

0 0 1

equivalent Euler angles phi, theta, psi = 180 + phi, theta, 180 + psi = phi + 90, theta, 270 - psi

convert_3d_xyz_vector_latitude_and_longitude(x, y, z)[source]
>>> from spring.segment3d.refine.sr3d_diagnostics import EulerPlot
>>> e = EulerPlot()
>>> e.convert_3d_xyz_vector_latitude_and_longitude( 1., 1., 1.)
(0.6154797086703875, 0.7853981633974483)
>>> la, lo = e.convert_3d_xyz_vector_latitude_and_longitude( 1., 1., 1.)
>>> e.convert_latitude_and_longitude_to_xyz(la, lo, np.sqrt(3))
(0.9999999999999998, 0.9999999999999997, 1.0)
convert_latitude_and_longitude_to_xyz(latitude, longitude, radius=1.0)[source]
plot_euler_angles_on_spherical_projection_scatter(fig, phi_angles, theta_angles, psi_angles)[source]
add_colorbar_to_upper_left_corner(fig, im)[source]
set_label_and_grid_of_hammer_sphere(subplot)[source]
plot_euler_angles_on_spherical_projection(fig, phi_angles, theta_angles, psi_angles)[source]
plot_euler_angle_scatter(fig, phi_angles, theta_angles)[source]
prepare_plot_including_solid_sphere(ax1, side_of_spere='front')[source]
plot_euler_angles_on_sphere(fig, phi_angles, theta_angles, psi_angles)[source]
set_phi_theta_label_x_and_y(subplot)[source]
plot_euler_angles_on_polar_plot_scatter(fig, phi_angles, theta_angles, psi_angles)[source]
plot_euler_angles_on_polar_plot_hist(fig, phi_angles, theta_angles, psi_angles)[source]
class sr3d_diagnostics.SegmentRefine3dDiagnosticsVisualizeTicksMontages(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_color_bar_according_to_array

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_zero_parameters_for_initial_stages_of_refinement

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

add_color_bar_according_to_array(label, img, location)[source]
reformat_ticklabels_according_to_image_plot(helical_parameter, max_label_count)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> SegmentRefine3d().reformat_ticklabels_according_to_image_plot(range(31), 8)
(['0.0', '4.0', '8.0', '12.0', '16.0', '20.0', '24.0', '28.0', '30.0'], 4)
>>> SegmentRefine3d().reformat_ticklabels_according_to_image_plot(range(31), 6)
(['0.0', '6.0', '12.0', '18.0', '24.0', '30.0'], 6)
montage_reprojections_to_image_according_to_given_shape(diagnostic_stack, symmetry_grid)[source]
distribute_x_and_y_ticks_evenly_along_montage(subplot, montage, rotation_count, rise_count, xtick_count=None, ytick_count=None)[source]
move_ticks_to_correct_location(subplot, montage, symmetry_grid)[source]
class sr3d_diagnostics.SegmentRefine3dDiagnostics(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_color_bar_according_to_array

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_forward_difference_and_set_ref_segments

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_diagnostics_statistics_file_name

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

prepare_3dctf_avg_squared

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

sort_and_enter_averaged_shifts

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

setup_statistics_plot_layout()[source]
visualize_in_plane_rotation_angles(subplot, in_plane_rotations)[source]
evaluate_in_plane_rotation_angles(subplot, ref_session, last_cycle, model_id)[source]
make_five_xticks_from_all_helix_ids(helix_ids)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> import numpy as np
>>> SegmentRefine3d().make_five_xticks_from_all_helix_ids(np.arange(1, 22))
[1, '', '', '', '', 6, '', '', '', '', 11, '', '', '', '', 16, '', '', '', '', 21]
>>> SegmentRefine3d().make_five_xticks_from_all_helix_ids(np.arange(1, 3))
[1, 2]
>>> helix_ids = np.append(np.arange(1, 7), np.arange(9, 12))
>>> SegmentRefine3d().make_five_xticks_from_all_helix_ids(helix_ids)
[1, '', 3, '', 5, '', 9, '', 11]
plot_forward_difference_x_shift(subplot, ref_session, last_cycle, model_id, max_shift_range)[source]
get_polarity_ratios_per_helix(subplot, ref_session, last_cycle)[source]
get_plot_parameters_from_last_cycle(ref_session, last_cycle, model_id)[source]
get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle(stack_ids, ref_cycle_id)[source]
compute_bin_count_from_quantity_and_step(quantity, quantity_step)[source]
evaluate_shifts_perpendicular_to_helix_axis(subplot, x_shifts, xshift_step, max_range, global_eval_label=False)[source]
plot_x_and_yshifts_in_scattered(plot, subplot, x_shifts, y_shifts, max_range=False)[source]
plot_fsc_lines(subplot, fsc_lines, pixelsize)[source]
generate_histogram_of_angular_distribution(subplot, angles, out_of_plane_count, labeltxt=None)[source]
evaluate_out_of_plane_tilt_angles(subplot, out_of_plane_angles, out_of_plane_count, resolution_aim)[source]
evaluate_azimuthal_angles(subplot, azimuthal_angles, azimuthal_count)[source]
get_segment_helix_count_and_length_from_spring_db()[source]
plot_excluded_criteria_as_bar_plot(subplot, last_cycle)[source]
generate_diagnostics_statistics_file_name(iteration_number, pixelsize, diagnostic_plot_prefix)[source]
enter_cycle_criteria_in_database(ref_session, last_cycle, errors, unit_count, avg_sampling, dev_sampling)[source]
log_processing_statistics(resolution, unit_count, helical_symmetry, length, hel_mic_count, segment_count, alignment_size_A, stepsize_A, pixelsize)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.log_processing_statistics((10, 5), 10000, (1.408, 22.03), (10000, 20000), (10,2), (888, 1000), 300, 50, 1.2)
'-----------------------------------------------------------  ---------  --------\nResolution at FSC (0.5/0.143) (Angstrom)                        10          5\nNumber of asymmetric units (before/after symmetrization)       888      10000\nHelical rise/rotation (Angstrom/degrees)                         1.408     22.03\nTotal length of helices including/excluding ends (Angstrom)  10000      20000\nNumber of included/total segments                              888       1000\nNumber of micrographs/helices                                    2         10\nAlignment size/segment step size (Angstrom)                    300         50\nPixel size on the specimen (Angstrom)                            1.2\n-----------------------------------------------------------  ---------  --------'
evaluate_alignment_parameters_and_summarize_in_plot(alignment_parameters, symmetry_alignment_parameters, fsc_lines, ref_cycle_id, each_reference, pixelinfo, diagnostic_plot_prefix, resolution_aim)[source]
class sr3d_diagnostics.SegmentRefine3dSummary(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

add_color_bar_according_to_array

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_whether_adjacent_values_are_closer_to_cutoff_value

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

setup_summary_figure()[source]
determine_mean_angle(out_of_plane_angles)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> angles = np.array([33, 33, 44.5, 44.5, 44.5, 45, 66])
>>> s.determine_mean_angle(angles)
44.5
>>> angles = np.array([33, 33, 33, 33, 33, 33, 44.5, 44.5, 44.5, 45, 66, 66, 66, 66, 66])
>>> s.determine_mean_angle(angles)
45.0
get_mean_out_of_plane_angle(ref_session, last_cycle, model_id)[source]
get_segment_size(large_binned_stack)[source]
generate_experimental_sum_of_powerspectra(ref_session, last_cycle, large_binned_stack, mean_out_of_plane, pixelinfo, model_id)[source]
generate_sim_power_from_reconstruction(resolution_aim, segment_size, mean_out_of_plane, each_reference, pixelinfo, rec)[source]
generate_simulated_power_from_latest_reconstruction(resolution_aim, reconstruction, segment_size, mean_out_of_plane, each_reference, pixelinfo)[source]
make_experimental_and_simulated_power_spectra_figure(sim_power, exp_power, sim_power_enhanced, exp_power_enhanced, mean_out_of_plane, each_reference, pixelinfo)[source]
get_segment_closest_to_given_phi(ref_session, last_cycle, each_theta, each_phi, model_id)[source]
get_inplane_rotation_and_x_and_y_shifts_from_segment_entry(max_cc_segment, pixelsize)[source]
prepare_projection_images_and_cc_maps_on_diagnostic_stack(large_binned_stack, diagnostic_stack, projection_parameters, pixelinfo, projection, segment, blank, helixmask, each_prj_id, max_cc_segments)[source]
prepare_average_from_maximum_of_20_images(diagnostic_stack, gallery_id, max_cc_segments, pixelinfo, large_binned_stack, helix_mask)[source]
generate_cc_maps_and_aligned_segments(ref_session, last_cycle, large_binned_stack, diagnostic_stack, projection_parameters, pixelinfo, model_id, segment_info=None)[source]
get_azimuthal_angles_from_projection_parameters(projection_parameters)[source]
perform_fit_of_gaussian(x_cc_arr, pixels)[source]
average_and_summarize_results_of_error_esimation(projection_parameters, x_err_data, y_err_data)[source]
compute_shift_error_from_cc_map(pixelsize, x_cc, helix_half_width)[source]
get_error_estimates_from_cc_maps(diagnostic_stack, cc_map_ids, pixelinfo, each_reference)[source]
make_angles_centered_around_phi_and_continuous(azimuthal_angles, each_phi)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 90), 180)
(array([0, 1, 2, 3]), array([  0.,  90., 180., 270.]))
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 72), 144)
(array([0, 1, 2, 3, 4]), array([  0.,  72., 144., 216., 288.]))
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 90), 90)
(array([3, 0, 1, 2]), array([-90.,   0.,  90., 180.]))
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 72), 72)
(array([4, 0, 1, 2, 3]), array([-72.,   0.,  72., 144., 216.]))
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 90), 270)
(array([1, 2, 3, 0]), array([ 90., 180., 270., 360.]))
>>> s.make_angles_centered_around_phi_and_continuous(range(0, 360, 72), 288)
(array([2, 3, 4, 0, 1]), array([144., 216., 288., 360., 432.]))
determine_angular_error(projection_parameters, img_ids, diagnostic_stack, azimuthal_angles, azimuth_prj_stack, azimuth_half_range, model_id, azimuth=True)[source]
average_and_summarize_results_of_ang_error_estimation(projection_parameters, azimuth_err_data, tilt_err_data, rot_err_data)[source]
get_error_estimates_from_angles(prj_info, diagnostic_stack, projection_parameters, img_ids, each_reference)[source]
get_error_estimates_for_inplane_rotation(diagnostic_stack, img_ids, prj_ids)[source]
prepare_upper_part_of_figure(resolution_aim, latest_reconstruction, each_reference, pixelinfo, mean_out_of_plane, exp_power, segment_size, ref_cycle_id, diagnostic_plot_prefix)[source]
generate_diagnostics_reprojection_file_name(ref_cycle_id, pixelsize, diagnostic_plot_prefix, extension=None)[source]
summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra(resolution_aim, large_binned_stack, latest_reconstruction, ref_cycle_id, each_reference, pixelinfo, diagnostic_plot_prefix, prj_info, exp_power)[source]
class sr3d_main.SegmentRefine3dCheck(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

clean_up_temporary_large_stack

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

remove_intermediate_files_if_desired(*files)[source]
get_aim_dict()[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> SegmentRefine3d().get_aim_dict()
{'low': 0, 'medium': 1, 'high': 2, 'max': 3}
check_whether_search_restraints_are_correctly_set_for_half_set_refinement(info_series)[source]
check_whether_search_restraints_and_refinement_option_are_correctly_set(info_series)[source]
check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement(info_series)[source]
estimate_required_tmp_disk_space()[source]
check_helical_rise_and_segmentation_step(helical_symmetry)[source]
copy_spring_db_to_tempdir()[source]
get_frame_id_from_mic_stack_file(segment_mic)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> from collections import namedtuple
>>> mic = namedtuple('mic', 'micrograph_name')
>>> segment_mic = mic('stack_name@2.mrcs')
>>> s.get_frame_id_from_mic_stack_file(segment_mic)
2
determine_upper_and_lower_bound_from_central_frame_id(frame_avg_window, frame_id, frame_count)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> from collections import namedtuple
>>> mic = namedtuple('mic', 'micrograph_name')
>>> segment_mic = mic('stack_name@2.mrcs')
>>> s.determine_upper_and_lower_bound_from_central_frame_id(3, 4, 7)
(3, 5)
>>> s.determine_upper_and_lower_bound_from_central_frame_id(3, 0, 7)
(0, 2)
>>> s.determine_upper_and_lower_bound_from_central_frame_id(5, 1, 7)
(0, 4)
>>> s.determine_upper_and_lower_bound_from_central_frame_id(5, 6, 7)
(2, 6)
assert_segment_count_on_stack_equals_that_in_database()[source]
get_last_cycle_from_refinement_database(refine_db)[source]
get_original_image_list(image_list)[source]
check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement(image_list)[source]
check_entry_count_for_segmultirefine3d()[source]
assert_at_least_view_count_of_100_for_3dreconstruction(sym_view_count, polar_helix, rotational_symmetry_start, segment_count)[source]
check_sanity_of_input_parameters()[source]
copy_ref_db_to_tempdir(cycle_id=None)[source]
merge_model_ids_into_presplit_state(ref_session, last_cycle, reference_files)[source]
get_last_cycle_id_from_refinement_database(refinementdb_path, reference_files)[source]
update_image_list_after_file_transfer(ori_image_list, image_list)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.frame_motion_corr = False
>>> s.frame_avg_window = 5
>>> ori_image_list = list(range(0, 10, 2))
>>> s.update_image_list_after_file_transfer(ori_image_list, ori_image_list)
[0, 1, 2, 3, 4]
>>> s.frame_motion_corr = True
>>> frame_list = [[0, 2, 4], [0, 2, 4], [2, 4, 6], [4, 6, 8], [4, 6, 8]]
>>> image_list = zip(ori_image_list, frame_list)
>>> s.update_image_list_after_file_transfer(ori_image_list, image_list)
[(0, [0, 1, 2]), (1, [0, 1, 2]), (2, [1, 2, 3]), (3, [2, 3, 4]), (4, [2, 3, 4])]
pre_cycle_setup(info_series)[source]
define_original_input_values_before_binning(large_segment_stack, reference_files)[source]
volume_decimate(vol, decimation=2, fit_to_fft=True, frequency_low=0, frequency_high=0)[source]

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

give_name_and_write_out_reference(reference_vol, each_reference, ref_cycle_id, updated_references)[source]
make_pixel_info_named_tuple()[source]
update_reference_info(reference_files)[source]
distribute_segment_ids_into_two_halves_based_on_helices(stack_ids, helix_ids, length_sorted_helices)[source]
>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d
>>> s = SegmentRefine3d()
>>> s.distribute_segment_ids_into_two_halves_based_on_helices(range(5), [0] * 2 + [1] * 3, [0, 1])
(array([0, 1]), array([2, 3, 4]))
>>> s.distribute_segment_ids_into_two_halves_based_on_helices(range(5), [0] * 5, [0])
(array([0, 1]), array([2, 3, 4]))
split_ref_ids_according_to_even_and_odd_helices(reference_files, session, ref_session, last_cycle)[source]
prepare_reference_files_for_halfset_refinement(reference_files, cycle_id)[source]
update_pixelinfo_based_on_different_helical_symmetries(segment_size_pix, helixwidthpix, pixelsize)[source]
precycle_setup_before_binning(info_series, large_segment_stack, reference_files, ori_reference_files, ori_pixelsize, each_binindex, ref_cycle_id, segment_size_pix, helixwidthpix)[source]
generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header(ref_cycle_id, reconstruction, outfile_prefix, pixelsize, helical_symmetry, point_symmetry)[source]
clean_up_temporary_large_stack(large_segment_stack, masked_segment_stack)[source]
class sr3d_main.SegmentRefine3d(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

measure_inplane_angle_and_decide_for_predominant_angle

merge_list_of_helical_errors

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

setup_dummies_for_iteration(start_ref_cycle_id)[source]
get_prj_named_tuple()[source]
package_parameters_and_stack_name_into_prj_info(merged_prj_params, merged_fine_prj_params, merged_prj_stack, merged_prj_fine_stack)[source]
project_including_masking_and_filtering(required_byte, info_series, reference_files, start_ref_cycle_id, ref_cycle_id, each_info, each_iteration_number, pixelinfo)[source]
mask_and_window_and_unbend_if_required(info_series, masked_segment_stack, start_ref_cycle_id, ref_cycle_id, each_info, large_segment_stack, each_iteration_number, mask_params, previous_params, unbending_info, large_straightened_stack, pixelinfo)[source]
add_model_id_to_prefix(prefix, model_id)[source]
add_iter_id_to_prefix(prefix, ref_cycle_id)[source]
write_out_reconstruction_and_remove_reference(reference_files, ref_cycle_id, pixelinfo, each_reference, reconstructed_volume)[source]
determine_whether_is_last_cycle(start_ref_cycle_id, ref_cycle_id)[source]
choose_reconstruction_stack_based_on_unbending(large_straightened_stack, large_reconstruction_stack)[source]
cleanup_of_prj_stacks(prj_info)[source]
reconstruct_volume(reference_files, lambda_sirt, start_ref_cycle_id, ref_cycle_id, each_info, pixelinfo, ctf3d_avg_squared, large_reconstruction_stack, selected_parameters, prj_info)[source]
print_fsc_to_diagnostic_plot(reference_files, pixelinfo, ref_cycle_id, each_ref_id, each_reference, fsc_lines, fsc_prefix)[source]
update_highest_fsc_database(ref_cycle_id, model_fscs, model_resolution)[source]
compute_cross_fsc_and_write_out_merged_volume(reference_files, resolution_aim, pixelinfo, ref_cycle_id)[source]
bin_including_copies_of_frames_if_requested(image_list, ori_large_segment_stack, ori_alignment_size, ori_helixwidthpix, ori_pixelsize, each_info)[source]
perform_iterative_projection_matching_and_3d_reconstruction()[source]
sr3d_main.main()[source]
class sr3d_mpi.SegmentRefine3dMpiDatabase(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

copy_one_entry_from_one_session_to_local_session_by_id(session, table, local_session, columns, each_entry_id)[source]
select_segment_ids_and_corresponding_helices_from_spring_db(session, temp_db)[source]
create_new_spring_db_with_specified_ids(session, seg_ids_per_helix, helix_ids, spring_db)[source]
split_spring_db_according_to_helix_entities_to_local_db()[source]
split_refinement_db_according_to_seg_ids(seg_ids, ref_db)[source]
transfer_records_from_local_table_to_global(ref_columns, table, ref_session, local_ref_session, unique_id)[source]
merge_local_db_table_entries_to_single_db(local_dbs, table, db_base, single_db, unique_id=True)[source]
merge_local_entries_from_spring_db(local_spring_db)[source]
merge_local_entries_from_refinement_segment_and_refinement_helix_table(ref_cycle_id, local_ref_cycle_db)[source]
merge_and_reduce_local_entries_from_refinement_cycle_table(global_ref_db, local_dbs)[source]
merge_local_db_into_global_databases(ref_cycle_id, spring_db, local_ref_db)[source]
class sr3d_mpi.SegmentRefine3dMpiBinning(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

prepare_pre_cycle_setup_mpi()[source]
mask_and_window_and_unbend_if_required_mpi(masked_segment_stack, large_segment_stack, each_iteration_number, ref_cycle_id, previous_params, mask_params, info_series, each_index, unbending_info, large_straightened_stack, pixelinfo)[source]
perform_binning_mpi(info_series, reference_files, ori_large_segment_stack, ori_reference_file, ori_reconstruction_size, ori_helixwidthpix, ori_pixelsize, each_index, image_list, ref_cycle_id)[source]
class sr3d_mpi.SegmentRefine3dMpiProjection(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_for_each_node_wether_sufficient_temporary_disk_space_available

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_projection_stack_mpi

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_including_masking_and_filtering_mpi

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

generate_projection_stack_mpi(resolution_aim, cycle_number, reference_volume, pixelinfo, azimuthal_angle_count, out_of_plane_tilt_angle_count, projection_stack, helical_symmetry, rotational_sym)[source]
check_for_each_node_wether_sufficient_temporary_disk_space_available(required_byte)[source]
project_including_masking_and_filtering_mpi(each_info, reference_files, each_iteration_number, ref_cycle_id, info_series, required_byte, pixelinfo)[source]
class sr3d_mpi.SegmentRefine3dMpiSelect(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_for_each_node_wether_sufficient_temporary_disk_space_available

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_projection_stack_mpi

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_frame_averaging_and_ref_database_update_mpi

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_including_masking_and_filtering_mpi

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

select_segments_based_on_specified_criteria_mpi

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

perform_local_frame_averaging_and_ref_database_update_mpi(ref_cycle_id)[source]
select_segments_based_on_specified_criteria_mpi(orientation_parameters, unbending_info, current_translation_step, ref_cycle_id, each_info, pixelinfo, reference_files)[source]
class sr3d_mpi.SegmentRefine3dMpiDiagnostics(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_for_each_node_wether_sufficient_temporary_disk_space_available

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_prj_params_and_update_reference_info

collect_selected_images_from_large_binned_stack_to_common_disk

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

copy_stack_from_to

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

gather_images_from_distributed_stacks_or_add_blank

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_experimental_sum_of_powerspectra_mpi

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_projection_stack_mpi

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_mean_out_of_plane_angle_mpi

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_entries_closest_to_phi_on_rank0_and_broadcast_results

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_frame_averaging_and_ref_database_update_mpi

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_local_symmetry_refinement_based_on_power_spectra_matching_mpi

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_including_masking_and_filtering_mpi

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_volume

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

select_segments_based_on_specified_criteria_mpi

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra_mpi

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

get_segment_entries_closest_to_phi_on_rank0_and_broadcast_results(ref_session, last_cycle, ref_columns, ref_namedtuple, each_phi, each_theta, model_id)[source]
gather_images_from_distributed_stacks_or_add_blank(large_binned_stack, combined_stack, segment_info, segment_prop, ref_namedtuple, max_cc_segments_list, combined_stack_id)[source]
collect_selected_images_from_large_binned_stack_to_common_disk(ref_session, last_cycle, predominant_out_of_plane, projection_parameters, large_binned_stack, model_id)[source]
copy_stack_from_to(src_stack, target_stack)[source]
perform_local_symmetry_refinement_based_on_power_spectra_matching_mpi(each_info, pixelinfo, each_reference, corr_rec, fsc_lines, ref_cycle_id, large_reconstruction_stack)[source]
get_mean_out_of_plane_angle_mpi(model_id, ref_session, last_cycle)[source]
generate_experimental_sum_of_powerspectra_mpi(large_binned_stack, each_reference, pixelinfo, ref_session, last_cycle, required_on_all_ranks=False)[source]
summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra_mpi(resolution_aim, large_binned_stack, latest_reconstruction, ref_cycle_id, each_reference, exp_power, pixelinfo, diagnostic_prefix, prj_info)[source]
class sr3d_mpi.SegmentRefine3dMpiReconstruct(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_even_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_first_half_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_odd_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_second_half_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_for_each_node_wether_sufficient_temporary_disk_space_available

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_and_avearge_helical_error

collect_prj_params_and_update_reference_info

collect_selected_images_from_large_binned_stack_to_common_disk

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

copy_stack_from_to

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

gather_images_from_distributed_stacks_or_add_blank

gather_reconstructions_from_nodes_compute_fsc_lines

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_experimental_sum_of_powerspectra_mpi

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_projection_stack_mpi

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_mean_out_of_plane_angle_mpi

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_entries_closest_to_phi_on_rank0_and_broadcast_results

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_frame_averaging_and_ref_database_update_mpi

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_local_symmetry_refinement_based_on_power_spectra_matching_mpi

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

post_processing_of_reconstruct_mpi

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_including_masking_and_filtering_mpi

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_partial_volumes_on_distributed_nodes

reconstruct_volume

reconstruct_volume_mpi

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

select_segments_based_on_specified_criteria_mpi

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra_mpi

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reconstruction_on_rank0

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

get_first_half_reconstruction_files(rec_files)[source]
>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi
>>> SegmentRefine3dMpi().get_first_half_reconstruction_files(list(range(10)))
[0, 1, 2, 3, 4]
get_second_half_reconstruction_files(rec_files)[source]
>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi
>>> SegmentRefine3dMpi().get_second_half_reconstruction_files(list(range(10)))
[5, 6, 7, 8, 9]
get_even_reconstruction_files(rec_files)[source]
>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi
>>> SegmentRefine3dMpi().get_even_reconstruction_files(list(range(10)))
[0, 2, 4, 6, 8]
get_odd_reconstruction_files(rec_files)[source]
>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi
>>> SegmentRefine3dMpi().get_odd_reconstruction_files(list(range(10)))
[1, 3, 5, 7, 9]
>>> SegmentRefine3dMpi().get_odd_reconstruction_files(10 * [50])
[50, 50, 50, 50, 50]
gather_reconstructions_from_nodes_compute_fsc_lines(reconstructed_volume, ctf3d_avg_squared, each_reference, each_info, pixelinfo, ref_cycle_id, load_rec_on_all_nodes=True)[source]
reconstruct_partial_volumes_on_distributed_nodes(alignment_parameters, ref_cycle_id, each_info, ctf3d_avg_squared, large_reconstruction_stack, rec_stack, lambda_sirt, each_reference, pixelinfo)[source]
collect_and_avearge_helical_error(helical_error)[source]
write_out_reconstruction_on_rank0(reference_files, pixelinfo, ref_cycle_id, each_reference, reconstructed_volume)[source]
post_processing_of_reconstruct_mpi(each_info, reference_files, pixelinfo, ref_cycle_id, large_reconstruction_stack, each_reference, exp_power, reconstructed_volume, alignment_parameters, symmetry_alignment_parameters, fsc_lines, helical_error, prj_info, is_last_cycle)[source]
reconstruct_volume_mpi(selected_parameters, each_info, info_series, reference_files, ctf3d_avg_squared, each_index, pixelinfo, ref_cycle_id, start_ref_cycle_id, large_reconstruction_stack, lambda_sirt, prj_info)[source]
class sr3d_mpi.SegmentRefine3dMpi(parset=None)[source]

Methods

average_shifts_between_frames_along_helix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

combine_determined_parameters_to_final_five(…)

Function to convert (in-plane rotation and shifts) to (shifts and rotation) if mirror parameters have been found, adjust Euler angles

compute_Fourier_radius(res_cutoff, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_alignment_and_reconstruction_size_in_pixels(…)

# values for fast boxsizes from http://blake.bcm.edu/emanwiki/EMAN2/BoxSize >>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d >>> s = SegmentRefine3d() >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 100, 1.0) (220, 168) >>> s.compute_alignment_and_reconstruction_size_in_pixels(200, 1.408, 300, 1.0) (352, 352)

compute_corresponding_tilts_from_Fourier_pixel_series(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_optimum_phi_and_index_closest_to_one_of_prj_phis(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_prj_size_from_max_out_of_plane_tilt_and_diameter(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

compute_rec_size_for_helix(helixwidth, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_from_mirrored_sparx(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Euler_angles_to_mirrored_sparx(phi, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_Fouier_pixel_to_reciprocal_Angstrom(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

convert_reciprocal_Angstrom_to_Fourier_pixel_position_in_power_spectrum(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

define_series_of_search_steps(pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_mean_angle(out_of_plane_angles)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_percent_amplitude_for_Wiener_filter_constant(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_predominant_side_of_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_res_ranges_and_binfactors_to_be_used(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

determine_upper_and_lower_bound_from_central_frame_id(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

distribute_segment_ids_into_two_halves_based_on_helices(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

extrapolate_second_order_to_end_of_box(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_angle_ids_according_to_search_restraint(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

filter_phis_such_that_distribution_remains_even(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

find_inplane_to_match(phiA, thetaA, phiB, thetaB)

Find the z rotation such that ZA RA is as close as possible to RB this maximizes trace of ( RB^T ZA RA) = trace(ZA RA RB^T)

generate_Euler_angles_for_projection(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_file_name_with_apix(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_phis_evenly_across_asymmetric_unit_and_distribute_over_360(…)

  • Function contributed by Ambroise Desfosses (May 2012)

generate_refinement_grid_to_be_evaluated(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_refinement_grid_to_be_evaluated_fixed_inc(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

generate_thetas_evenly_dependent_on_cos_of_out_of_plane_angle(thetas)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_aim_dict()

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_and_distribute_total_iteration_count(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_azimuthal_angles_from_prj_params(…[, …])

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_closest_projection_from_projection_list(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_even_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_first_half_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_frame_id_from_mic_stack_file(segment_mic)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_maximum_pixel_displacement_by_inplane_rotation_at_edge(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_odd_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_out_of_plane_angles_from_prj_params(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_resolution_closest_to_value(value, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_second_half_reconstruction_files(rec_files)

>>> from spring.segment3d.refine.sr3d_mpi import SegmentRefine3dMpi

get_sizes_that_increase_by_percent(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

get_symmetry_views_count_from_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

index_coords(data[, origin])

Creates x & y coords for the indicies in a numpy array ‘data’.

log_processing_statistics(resolution, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_angles_centered_around_phi_and_continuous(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

make_five_xticks_from_all_helix_ids(helix_ids)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

match_each_image_against_all_projections_with_delta_in_plane_restraint(…)

Updated Util.multiref_polar_ali_2d_delta(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim, 0.0, delta_psi) 2020-12-11: 1.

normalize_inplane_angles_by_picked_angles(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

plot_polar_image(data[, origin])

Plots an image reprojected into polar coordinates with the origin at ‘origin’ (a tuple of (x0, y0), defaults to the center of the image)

randomize_phi_and_corresponding_helix_y_shift_based_to_pitch(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reduce_y_shifts_and_phis_to_half_stepsize(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reformat_ticklabels_according_to_image_plot(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

reproject_image_into_polar(data[, origin])

Reprojects a 3D numpy array (‘data’) into a polar coordinate system.

rescale_freq_filter_columns(ori_pixelsize, …)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

select_reference_rings_according_to_angular_restraints(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

sort_data_and_discard_duplicates(x, y)

sort_inplane_angles_into_0_360_or_180_degrees(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

update_image_list_after_file_transfer(…)

>>> from spring.segment3d.refine.sr3d_main import SegmentRefine3d

volume_decimate(vol[, decimation, …])

Window 3D volume to FFT-friendly size, apply Butterworth low pass filter, and decimate image by integer factor cs: adapted from image_decimate (fundamentals)

add_color_bar_according_to_array

add_iter_id_to_prefix

add_model_id_to_prefix

add_tempdir_directory_to_filename

adjust_volume_dimension_by_padding_or_windowing

apply_inplane_blurring_to_set_of_power_spectra

apply_orientation_parameters_and_reconstruct_imposing_helical_symmetry

apply_square_root_fsc_filter_to_coefficients

assemble_image_plane

assert_at_least_view_count_of_100_for_3dreconstruction

assert_segment_count_on_stack_equals_that_in_database

average_and_summarize_results_of_ang_error_estimation

average_and_summarize_results_of_error_esimation

bin_including_copies_of_frames_if_requested

blur_ideal_power_spectrum_by_even_out_of_plane_variation

build_3d_layer_line_mask_half_as_wide_as_high

build_smooth_mask_with_top_and_bottom_cut

build_structural_mask_from_volume

cart2polar

check_entry_count_for_segmultirefine3d

check_for_each_node_wether_sufficient_temporary_disk_space_available

check_helical_rise_and_segmentation_step

check_sanity_of_input_parameters

check_wether_search_restraints_make_sense_in_multi_model_refinement_and_half_set_refinement

check_whether_adjacent_values_are_closer_to_cutoff_value

check_whether_ref_db_has_fewer_segment_entries_than_requested_in_case_of_continued_refinement

check_whether_search_restraints_and_refinement_option_are_correctly_set

check_whether_search_restraints_are_correctly_set_for_half_set_refinement

choose_reconstruction_stack_based_on_unbending

clean_up_temporary_large_stack

cleanup_of_prj_stacks

collect_and_avearge_helical_error

collect_prj_params_and_update_reference_info

collect_selected_images_from_large_binned_stack_to_common_disk

compute_3dreconstruction_by_Fourier_interpolation

compute_3dreconstruction_by_SIRT

compute_alignment_size_in_pixels

compute_amp_corr_for_different_symmetry_combinations

compute_angular_blur_based_on_Crowther_criterion

compute_bin_count_from_quantity_and_step

compute_cross_fsc_and_write_out_merged_volume

compute_distance

compute_fit_if_more_than_three_datapoints

compute_fitted_parameters

compute_forward_difference_for_selected_segments_and_select

compute_fsc_of_cylinder_masked_reconstruction_halves

compute_fsc_of_layer_line_filtered_reconstruction_halves

compute_fsc_of_raw_reconstruction_halves

compute_fsc_of_structure_masked_reconstruction_halves

compute_fsc_on_volumes_from_half_the_dataset

compute_helical_autocorrelation_map

compute_resolution_ranges_for_binseries

compute_shift_error_from_cc_map

convert_coarse_into_fine_parameters

convert_list_of_projection_parameters_to_prj_tuples

copy_image_stack_to_new_stack

copy_image_stack_to_new_stack_shutil

copy_one_entry_from_one_session_to_local_session_by_id

copy_out_angular_series

copy_ref_db_to_tempdir

copy_spring_db_to_tempdir

copy_stack_from_to

create_new_spring_db_with_specified_ids

define_alignment_parameters

define_all_segmentrefine3d_parameters

define_filter_parameters

define_helical_symmetry_parameters

define_input_output_iteration

define_mpi_parameters

define_original_input_values_before_binning

define_reconstruction_parameters

define_refinement_strategy_options

define_selection_parameters

determine_Fourier_pixel_position_of_highest_resolution_layer_line

determine_angular_error

determine_forward_difference_and_set_ref_segments

determine_whether_is_last_cycle

distribute_x_and_y_ticks_evenly_along_montage

enforce_even_phi_distribution

enter_additional_ref_parameters_in_database

enter_asymmetric_unit_parameters_in_database

enter_cycle_criteria_in_database

enter_excluded_refinement_counts_in_database

enter_final_ids_into_database

enter_fsc_values_in_database

enter_helix_inplane_parameters_in_database

enter_orientation_parameters

enter_refinement_parameters_in_database

enter_results_to_segments

enter_selected_information

estimate_required_tmp_disk_space

evaluate_alignment_parameters_and_summarize_in_plot

evaluate_azimuthal_angles

evaluate_in_plane_rotation_angles

evaluate_out_of_plane_tilt_angles

evaluate_shifts_perpendicular_to_helix_axis

exclude_inplane_angles_outside_delta_psi

fill_in_excluded_quantities_by_interpolation

filter_and_mask_reference_volume

filter_layer_lines_if_demanded

filter_projections_using_provided_layer_line_filters

filter_refined_segments_by_property

filter_segments_by_ccc_against_projections

filter_segments_by_out_of_plane_tilt

filter_segments_when_located_at_end_of_helix

filter_volume_by_fourier_filter_while_padding

finalize_figure_with_gallery

find_maximum_cross_correlation_for_local_in_plane_angle

finish_Fourier_interpolation_reconstruction

gather_images_from_distributed_stacks_or_add_blank

gather_reconstructions_from_nodes_compute_fsc_lines

generate_and_apply_layerline_filter

generate_binary_layer_line_filter_for_different_out_of_plane_tilt_angles

generate_binary_layer_line_filters_including_angular_blur

generate_cc_maps_and_aligned_segments

generate_diagnostics_reprojection_file_name

generate_diagnostics_statistics_file_name

generate_experimental_sum_of_powerspectra

generate_experimental_sum_of_powerspectra_mpi

generate_histogram_of_angular_distribution

generate_long_helix_volume

generate_nice_gallery_of_ten_images_corresponding_projections

generate_power_spectrum_average_by_inplane_angle_blurring

generate_projection_stack

generate_projection_stack_mpi

generate_reconstruction_name_with_Angstrom_per_pixel_and_set_header

generate_sim_power_from_reconstruction

generate_simulated_power_from_latest_reconstruction

generate_structure_with_phases_randomized

get_all_distances_and_selection_mask_from_ref_segments

get_all_helices_from_last_refinement_cycle

get_all_segments_from_refinement_cycle

get_all_selected_stack_ids

get_avg_helix_shift_x_and_y_and_avg_inplane_angles

get_azimuthal_angles_from_projection_parameters

get_closest_binfactors

get_cut_coordinates_named_tuple

get_distances_from_segment_ids

get_error_estimates_for_inplane_rotation

get_error_estimates_from_angles

get_error_estimates_from_cc_maps

get_excluded_refinement_count

get_exluded_ref_count_named_tuple

get_frame_stack_path

get_fsc_cutoff_and_mask

get_helically_related_parameters_for_first_refinement_cycle

get_helices_coordinates_required_for_unbending_from_database

get_helices_from_corresponding_frames

get_helix_coordinates_named_tuple

get_inplane_angles_per_segment_and_interpolate_two_oposite_angles

get_inplane_rotation_and_x_and_y_shifts_from_segment_entry

get_last_cycle_from_refinement_database

get_last_cycle_id_from_refinement_database

get_masking_parameters

get_maximum_correlation_symmetry_pair

get_mean_out_of_plane_angle

get_mean_out_of_plane_angle_mpi

get_original_image_list

get_padsize_and_unique_tilts

get_picked_segment_coordinates

get_plot_parameters_from_last_cycle

get_polarity_ratios_per_helix

get_prj_named_tuple

get_prj_params_named_tuple

get_prj_stack_name_with_ending

get_ref_file_name

get_ref_session_and_last_cycle

get_refined_parameters_for_advanced_stages_of_refinement

get_restraint_tuple

get_segment_closest_to_given_phi

get_segment_entries_closest_to_phi_on_rank0_and_broadcast_results

get_segment_helix_count_and_length_from_spring_db

get_segment_ids_from_helix

get_segment_size

get_segments_from_helix

get_selected_alignment_parameters_from_last_cycle

get_selected_segments_from_last_cycle

get_selected_segments_from_last_refinement_cycle

get_x_and_y_shifts_perpendicular_to_helix_from_penultimate_cycle

get_zero_parameters_for_initial_stages_of_refinement

give_name_and_write_out_reference

if_no_selected_images_left_abort_refinement

launch_3dreconstruction_by_SIRT

log_helical_error

make_experimental_and_simulated_power_spectra_figure

make_fsc_line_named_tuple

make_named_tuple_of_masking_parameters

make_named_tuple_of_orientation_parameters

make_pixel_info_named_tuple

make_reference_info_named_tuple

make_series_info_named_tuple

make_unbending_named_tuple

map_new_coordinates

mask_and_window_and_unbend_if_required

mask_and_window_and_unbend_if_required_mpi

measure_inplane_angle_and_decide_for_predominant_angle

merge_and_reduce_local_entries_from_refinement_cycle_table

merge_list_of_helical_errors

merge_local_db_into_global_databases

merge_local_db_table_entries_to_single_db

merge_local_entries_from_refinement_segment_and_refinement_helix_table

merge_local_entries_from_spring_db

merge_model_ids_into_presplit_state

merge_prj_ref_stacks_into_single_prj_stack

montage_reprojections_to_image_according_to_given_shape

move_ticks_to_correct_location

normalize_and_scale_volumes_including_mask_and_compute_fsc

package_parameters_and_stack_name_into_prj_info

perform_binning_mpi

perform_coarse_and_fine_projection_matching

perform_ctf_correction_and_volume_symmetrization

perform_ctf_correction_on_volume

perform_fit_of_gaussian

perform_helix_based_computations_and_selection

perform_iterative_projection_matching_and_3d_reconstruction

perform_local_averaging_across_frames

perform_local_frame_averaging_and_ref_database_update

perform_local_frame_averaging_and_ref_database_update_mpi

perform_local_symmetry_refinement_based_on_power_spectra_matching

perform_local_symmetry_refinement_based_on_power_spectra_matching_mpi

perform_mean_ccc_evaluation_of_images_with_symmetry_related_projections

perform_volume_operations_ctf_and_symmetrization

plot_excluded_criteria_as_bar_plot

plot_forward_difference_x_shift

plot_fsc_lines

plot_x_and_yshifts_in_scattered

polar2cart

post_processing_of_reconstruct_mpi

pre_cycle_setup

precycle_setup_before_binning

prepare_3dctf_avg_squared

prepare_average_from_maximum_of_20_images

prepare_binary_layer_line_filters_if_layer_line_filtering_demanded

prepare_databases_for_selection

prepare_empty_helical_error

prepare_gallery_figure

prepare_helical_reconstruction_using_Fourier_interpolation

prepare_local_symmetry_refinement

prepare_pre_cycle_setup_mpi

prepare_previous_parameters_either_from_inplane_angle_or_from_previous_cycle

prepare_projection_images_and_cc_maps_on_diagnostic_stack

prepare_reference_files_for_halfset_refinement

prepare_reference_rings_from_projections

prepare_reference_volumes

prepare_refined_alignment_parameters_from_database

prepare_segment_for_alignment

prepare_unique_updated_stack_name

prepare_upper_part_of_figure

prepare_volume_for_projection_by_masking_and_thresholding

print_fsc_to_diagnostic_plot

project_including_masking_and_filtering

project_including_masking_and_filtering_mpi

project_through_reference_volume_in_helical_perspectives

randomize_quant_beyond_circle

read_large_segment_average_if_running_avg_frames_requested

reconstruct_partial_volumes_on_distributed_nodes

reconstruct_volume

reconstruct_volume_mpi

refine_each_image_against_projections_including_delta_inplane_restraint

refine_local_inplane_angle

remove_frames_if_running_avg_frames_requested

remove_intermediate_files_if_desired

remove_projection_stacks_and_copy_out_azimuthal_and_out_of_plane_series

reproject_polar_into_image

reproject_volume_into_cylinder

rescale_custom_filter_file

rescale_reference_volume_in_case_vol_pixelsize_differs_from_current_pixelsize

round_grid_value_tuples_to_readable_number_of_digits

select_refinement_parameters_based_on_selection_criteria_hierarchically

select_segment_ids_and_corresponding_helices_from_spring_db

select_segments_based_on_in_plane_rotation

select_segments_based_on_out_of_plane_tilt

select_segments_based_on_specified_criteria

select_segments_based_on_specified_criteria_mpi

set_euler_angles_to_reference_rings

set_res_expectation

setup_dummies_for_iteration

setup_new_refinement_db_for_each_cycle

setup_parameter_containers

setup_statistics_plot_layout

setup_summary_figure

sort_and_enter_averaged_shifts

split_ref_ids_according_to_even_and_odd_helices

split_refinement_db_according_to_seg_ids

split_spring_db_according_to_helix_entities_to_local_db

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra

summarize_each_bin_round_with_simulated_vs_experimental_images_and_powerspectra_mpi

symmetrize_long_volume_in_steps

symmetrize_volume

transfer_records_from_local_table_to_global

unbend_window_and_mask_input_stack

update_average_helix_shift_x_per_helix

update_average_in_plane_rotation_angle_per_helix

update_average_out_of_plane_per_helix

update_highest_fsc_database

update_persistence_length_in_spring_db

update_pixelinfo_based_on_different_helical_symmetries

update_reference_info

update_segment_subunits_database_with_final_refinement_parameters

update_total_nonorientation_counts_in_ref_db

visualize_in_plane_rotation_angles

window_and_mask_input_stack

write_out_file_of_fsc_lines

write_out_fsc_line

write_out_reconstruction_and_remove_reference

write_out_reconstruction_on_rank0

write_out_reference_and_get_prj_prefix_depending_on_number_of_models

write_out_reference_volume

perform_iterative_projection_matching_and_3d_reconstruction()[source]
sr3d_mpi.main()[source]