Documented functions with links to source

Program to compute 3D reconstruction from a single class average using a range of different helical symmetries

class segclassreconstruct_prep.SegClassReconstructPar[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

set_center_and_rotation_option

set_local_grid_option

set_minimum_image_count_reconstruction

set_montage_class_reprj_out_stack

set_montage_class_reprj_periodogram_out_stack

set_volume_prefix_symmetry_grid

define_parameters_and_their_properties()[source]
define_program_states()[source]
set_center_and_rotation_option(feature_set)[source]
set_volume_prefix_symmetry_grid(feature_set)[source]
set_minimum_image_count_reconstruction(feature_set)[source]
set_local_grid_option(feature_set)[source]
set_montage_class_reprj_out_stack(feature_set)[source]
set_montage_class_reprj_periodogram_out_stack(feature_set)[source]
class segclassreconstruct_prep.SegClassReconstructPreparation(parset=None)[source]
  • Class that holds functions to insert_image_slices_in_3D_volume helically symmetric volumes

Methods

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

clear_previous_alignment_parameters_and_copy_class_to_local_directory

generate_series

get_standard_proj_parameters

set_projection_transform_for_helix_azimuth_zero

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(rise_series, rotation_series)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct                                                                          
>>> s = SegClassReconstruct()
>>> s.convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(range(2), range(3))
array([[(0.0, 0.0), (0.0, 1.0), (0.0, 2.0)],
       [(1.0, 0.0), (1.0, 1.0), (1.0, 2.0)]], dtype=object)
generate_series(helical_rise_range, helical_rise_increment)[source]
generate_unique_rise_rotation_or_pitch_unitnumber_arrays(helical_rise_range, helical_rise_increment, helical_rotation_range, helical_rotation_increment)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct                                                                          
>>> s = SegClassReconstruct()
>>> s.generate_unique_rise_rotation_or_pitch_unitnumber_arrays([2,4], 2, [10,30], 10)
([2.0, 4.0], [10.0, 20.0, 30.0])
>>> s.generate_unique_rise_rotation_or_pitch_unitnumber_arrays((275.0, 305.0), 5.0, (3.8, 4.2), 0.1)
([275.0, 280.0, 285.0, 290.0, 295.0, 300.0, 305.0], [3.8, 3.9, 4.0, 4.1, 4.2])
>>> s.generate_unique_rise_rotation_or_pitch_unitnumber_arrays((270.0, 310.0), 5.0, (3.1, 3.7), 0.1) 
([270.0, 275.0, 280.0, 285.0, 290.0, 295.0, 300.0, 305.0, 310.0], 
[3.1, 3.2, 3.3000000000000003, 3.4000000000000004, 3.5, 3.6, 3.7])
generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(helical_rise_range, helical_rise_increment, helical_rotation_range, helical_rotation_increment)[source]
  • Function to generate pairs of rise and rotation for symmetry grid search

#. Usage: symmetry_grid = generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(helical_rise_range, helical_rise_increment, helical_rotation_range, helical_rotation_increment)

#. Input: helical_rise_range, helical_rotation_range = list of start and end values helical_rise_increment, helical_rotation_increment = number of increment #. Output: list of symmetry pairs of rise and rotation

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct                                                                          
>>> s = SegClassReconstruct()
>>> s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid([2,4], 2, [10,30], 10)
array([[(2.0, 10.0), (2.0, 20.0), (2.0, 30.0)],
       [(4.0, 10.0), (4.0, 20.0), (4.0, 30.0)]], dtype=object)
>>> s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid([2,3], 0, [10,20], 2)
array([[(2.0, 10.0), (2.0, 12.0), (2.0, 14.0), (2.0, 16.0), (2.0, 18.0),
        (2.0, 20.0)]], dtype=object)
>>> s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid([2,3], 1, [10,10], 0)
array([[(2.0, 10.0)],
       [(3.0, 10.0)]], dtype=object)
>>> s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid((275.0, 305.0), 5.0, (3.8, 4.2), 0.1)
array([[(275.0, 3.8), (275.0, 3.9), (275.0, 4.0), (275.0, 4.1),
        (275.0, 4.2)],
       [(280.0, 3.8), (280.0, 3.9), (280.0, 4.0), (280.0, 4.1),
        (280.0, 4.2)],
       [(285.0, 3.8), (285.0, 3.9), (285.0, 4.0), (285.0, 4.1),
        (285.0, 4.2)],
       [(290.0, 3.8), (290.0, 3.9), (290.0, 4.0), (290.0, 4.1),
        (290.0, 4.2)],
       [(295.0, 3.8), (295.0, 3.9), (295.0, 4.0), (295.0, 4.1),
        (295.0, 4.2)],
       [(300.0, 3.8), (300.0, 3.9), (300.0, 4.0), (300.0, 4.1),
        (300.0, 4.2)],
       [(305.0, 3.8), (305.0, 3.9), (305.0, 4.0), (305.0, 4.1),
        (305.0, 4.2)]], dtype=object)
convert_rise_rotation_pair_to_pitch_unit_pair(each_rise_rotation_pair)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> s.convert_rise_rotation_pair_to_pitch_unit_pair((1.408, 22.03))
(23.00862460281434, 16.34135270086246)
>>> s.convert_rise_rotation_pair_to_pitch_unit_pair((1.408, -22.03))
(-23.00862460281434, -16.34135270086246)
>>> s.convert_rise_rotation_pair_to_pitch_unit_pair((-1.408, -22.03))
(23.00862460281434, -16.34135270086246)
>>> s.convert_rise_rotation_pair_to_pitch_unit_pair((-1.408, 22.03))
(-23.00862460281434, 16.34135270086246)
convert_pitch_unit_pair_to_rise_rotation_pairs(pitch, unit_number)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> s.convert_pitch_unit_pair_to_rise_rotation_pairs(23, 16.3333334)
(1.4081632595585172, 22.040816236568094)
>>> s.convert_pitch_unit_pair_to_rise_rotation_pairs(-23, -16.3333334)
(1.4081632595585172, -22.040816236568094)
>>> s.convert_pitch_unit_pair_to_rise_rotation_pairs(23, -16.3333334)
(-1.4081632595585172, -22.040816236568094)
>>> s.convert_pitch_unit_pair_to_rise_rotation_pairs(-23, 16.3333334)
(-1.4081632595585172, 22.040816236568094)
convert_rise_rotation_grid_to_pitch_unit_grid(rise_rot_grid, shape=None)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct 
>>> s = SegClassReconstruct()
>>> r_r_grid = s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid([10,30], 10, [10,40], 10) 
>>> s.convert_rise_rotation_grid_to_pitch_unit_grid(r_r_grid)
array([[(360.0, 36.0), (180.0, 18.0), (120.0, 12.0), (90.0, 9.0)],
       [(720.0, 36.0), (360.0, 18.0), (240.0, 12.0), (180.0, 9.0)],
       [(1080.0, 36.0), (540.0, 18.0), (360.0, 12.0), (270.0, 9.0)]],
      dtype=object)
convert_pitch_unit_grid_to_rise_rotation_grid(pitch_unit_grid, shape=None)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct 
>>> s = SegClassReconstruct()
>>> p_u_grid = s.generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid([10,30], 10, [10,40], 10) 
>>> s.convert_pitch_unit_grid_to_rise_rotation_grid(p_u_grid)
array([[(1.0, 36.0), (0.5, 18.0), (0.3333333333333333, 12.0),
        (0.25, 9.0)],
       [(2.0, 36.0), (1.0, 18.0), (0.6666666666666666, 12.0), (0.5, 9.0)],
       [(3.0, 36.0), (1.5, 18.0), (1.0, 12.0), (0.75, 9.0)]], dtype=object)
get_standard_proj_parameters(out_of_plane_tilt_angle)[source]
set_projection_transform_for_helix_azimuth_zero(segment, out_of_plane_tilt_angle)[source]
clear_previous_alignment_parameters_and_copy_class_to_local_directory(infile, classno, out_of_plane_tilt_angle)[source]
class segclassreconstruct_prep.SegClassReconstructCylinderMask(parset=None)[source]

Methods

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

make_smooth_cylinder_mask(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

clear_previous_alignment_parameters_and_copy_class_to_local_directory

generate_series

get_standard_proj_parameters

prepare_volume_locally

project_locally

set_projection_transform_for_helix_azimuth_zero

make_smooth_cylinder_mask(outer_diameter_in_pixel, inner_diameter_in_pixel, segment_size_in_pixel, segment_height_in_pixel=None, width_falloff=0.1)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct      
>>> from EMAN2 import EMNumPy
>>> cylinder = SegClassReconstruct().make_smooth_cylinder_mask(8,4,10)
>>> EMNumPy.em2numpy(cylinder)[5]
array([[6.8550038e-01, 6.8550038e-01, 6.8550038e-01, 6.8550038e-01,
        6.8550038e-01, 6.8550038e-01, 6.8550038e-01, 6.8550038e-01,
        6.8550038e-01, 6.8550038e-01],
       [6.8550038e-01, 6.8550038e-01, 6.8550038e-01, 5.2786398e-01,
        8.7689447e-01, 1.0000000e+00, 8.7689447e-01, 5.2786398e-01,
        6.8550038e-01, 6.8550038e-01],
       [6.8550038e-01, 6.8550038e-01, 7.5735956e-01, 9.6786237e-01,
        9.3174678e-01, 9.1852522e-01, 9.3174678e-01, 9.6786237e-01,
        7.5735956e-01, 6.8550038e-01],
       [6.8550038e-01, 5.2786398e-01, 9.6786237e-01, 8.6742067e-01,
        6.9098115e-01, 6.2066615e-01, 6.9098115e-01, 8.6742067e-01,
        9.6786237e-01, 5.2786398e-01],
       [6.8550038e-01, 8.7689447e-01, 9.3174678e-01, 6.9098115e-01,
        2.5708830e-01, 5.9604645e-08, 2.5708830e-01, 6.9098115e-01,
        9.3174678e-01, 8.7689447e-01],
       [6.8550038e-01, 1.0000000e+00, 9.1852522e-01, 6.2066615e-01,
        5.9604645e-08, 5.9604645e-08, 5.9604645e-08, 6.2066615e-01,
        9.1852522e-01, 1.0000000e+00],
       [6.8550038e-01, 8.7689447e-01, 9.3174678e-01, 6.9098115e-01,
        2.5708830e-01, 5.9604645e-08, 2.5708830e-01, 6.9098115e-01,
        9.3174678e-01, 8.7689447e-01],
       [6.8550038e-01, 5.2786398e-01, 9.6786237e-01, 8.6742067e-01,
        6.9098115e-01, 6.2066615e-01, 6.9098115e-01, 8.6742067e-01,
        9.6786237e-01, 5.2786398e-01],
       [6.8550038e-01, 6.8550038e-01, 7.5735956e-01, 9.6786237e-01,
        9.3174678e-01, 9.1852522e-01, 9.3174678e-01, 9.6786237e-01,
        7.5735956e-01, 6.8550038e-01],
       [6.8550038e-01, 6.8550038e-01, 6.8550038e-01, 5.2786398e-01,
        8.7689447e-01, 1.0000000e+00, 8.7689447e-01, 5.2786398e-01,
        6.8550038e-01, 6.8550038e-01]], dtype=float32)
prepare_volume_locally(vol)[source]
project_locally(vol, params, stack=None)[source]
class segclassreconstruct_assist.SegClassReconstructAssist(parset=None)[source]

Methods

compute_all_symmetry_related_views(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_distances_to_helical_axis(shift_x, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_inplane_rotation_from_Euler_angles(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_symmetry_related_views(…)

  1. positive y-shift for straight helix

compute_point_where_normal_and_parallel_line_intersect(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

make_smooth_cylinder_mask(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

clear_previous_alignment_parameters_and_copy_class_to_local_directory

compute_and_write_symmetry_related_views

compute_point_group_symmetry_related_views

compute_straight_phi_and_yshift

compute_transform_with_aligned_helix_segment

convert_alignment_parameters_to_symmetry_alignment_parameters

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts_old

generate_series

get_Euler_angles_after_transformation

get_standard_proj_parameters

get_symmetry_transformations

prepare_symmetry_computation

prepare_volume_locally

project_from_volume_and_backproject

project_locally

set_projection_transform_for_helix_azimuth_zero

setup_reconstructor

setup_transform_with_reduced_alignment_parameters

compute_transform_with_aligned_helix_segment(phi, theta, psi)[source]
compute_helical_inplane_rotation_from_Euler_angles(phi, theta, psi)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(180, 90, 270)
0.0
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(0, 90, 270)
0.0
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(33, 90, 334)
63.999997560564
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(180, 90, 240)
329.999999554708
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(150.0, 94.0, 315)
44.999997495521825
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(150.0, 86.0, 315)
224.99999749552182
>>> SegClassReconstruct().compute_helical_inplane_rotation_from_Euler_angles(170.0, 90.0, 315)
44.999997495521825
compute_point_where_normal_and_parallel_line_intersect(shift_x, shift_y, inplane_angle)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> s.compute_point_where_normal_and_parallel_line_intersect(3, 1, 0)
(3.0, -1.8369701987210297e-16)
>>> s.compute_point_where_normal_and_parallel_line_intersect(3, 1, 45)
(2.0000000000000004, 2.0)
>>> s.compute_point_where_normal_and_parallel_line_intersect(3, 1, -45)
(0.9999999999999998, -0.9999999999999999)
>>> s.compute_point_where_normal_and_parallel_line_intersect(3, 1, 90)
(1.7449489701899453e-12, 1.000000000005235)
compute_distances_to_helical_axis(shift_x, shift_y, inplane_angle)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> SegClassReconstruct().compute_distances_to_helical_axis(22, 2, 0)
(-22.0, 2.0000000000000013)
>>> SegClassReconstruct().compute_distances_to_helical_axis(22, 2, 180)
(22.0, -2.000000000000004)
>>> SegClassReconstruct().compute_distances_to_helical_axis(22, 2, 90)
(-2.000000000038389, -21.99999999999651)
>>> SegClassReconstruct().compute_distances_to_helical_axis(3, 1, -45)
(-1.414213562373095, 2.82842712474619)
>>> SegClassReconstruct().compute_distances_to_helical_axis(3, 1, 45)
(-2.8284271247461903, -1.4142135623730947)
>>> SegClassReconstruct().compute_distances_to_helical_axis(22, 2, 20)
(-21.357277943941323, -5.645057911592895)
>>> s = SegClassReconstruct()
>>> hx, hy = s.compute_distances_to_helical_axis(22, 2, 180)
>>> SegClassReconstruct().compute_distances_to_helical_axis(hx, hy, 180)
(22.0, 2.0)
prepare_symmetry_computation(alignment_parameters, each_symmetry_pair, pixelsize, symmetry_views_count)[source]
compute_straight_phi_and_yshift(each_symmetry_view, phi, helical_rotation, out_of_plane_correction, helical_rise)[source]
compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(helix_shift_x, helix_shift_y, inplane_angle)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> hx, hy = SegClassReconstruct().compute_distances_to_helical_axis(3, 1, -45)
>>> s = SegClassReconstruct()
>>> s.compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(hx, hy, -45)
(2.9999999999999996, 1.0000000000000002)
>>> s.compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(3, 0, -45)
(-2.121320343559643, 2.1213203435596424)
>>> hx, hy = SegClassReconstruct().compute_distances_to_helical_axis(22, 2, 20)
>>> s.compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(hx, hy, 20)
(22.0, 2.0)
correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts_old(inplane_angle, x_shift, y_shift, straight_yshift)[source]
correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts(inplane_angle, x_shift, y_shift, straight_yshift)[source]
  1. positive y-shift for straight helix

  2. negative y-shift for straight helix

  3. negative y-shift including x-shift with flipped helix

  4. helix perpendicular to ‘straight’

  5. id3 but respective x and y shifts swapped

  6. test angle of 45 degrees

  7. test angle of 60 degrees

  8. Out-of-plane tilt will affect helical rise in image plane:

  9. If straight y-shift is smaller than helical rise, no action need to taken

  10. If straight y-shift is larger than half helical rise will be reduced:

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> rec_parameters = s.make_named_tuple_for_reconstruction()
>>> r_info = rec_parameters(0, 0, 0, 90, 270, 0, 0, 0.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[  0., 110.,  90., 270.,  -0.,   5.,   0.,  22.],
       [  0., 160.,  90., 270.,  -0.,   4.,   0.,  22.],
       [  0., 210.,  90., 270.,  -0.,   3.,   0.,  22.],
       [  0., 260.,  90., 270.,  -0.,   2.,   0.,  22.],
       [  0., 310.,  90., 270.,  -0.,   1.,   0.,  22.],
       [  0.,   0.,  90., 270.,  -0.,  -0.,   0.,  22.],
       [  0.,  50.,  90., 270.,  -0.,  -1.,   0.,  22.],
       [  0., 100.,  90., 270.,  -0.,  -2.,   0.,  22.],
       [  0., 150.,  90., 270.,  -0.,  -3.,   0.,  22.],
       [  0., 200.,  90., 270.,  -0.,  -4.,   0.,  22.]]), 0.0)
>>> r_info = rec_parameters(0, 0, 0, 90, 270, 0.5, 3.0, 0.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[  0. , 260. ,  90. , 270. ,   0.5,   5. ,   0. ,  22. ],
       [  0. , 310. ,  90. , 270. ,   0.5,   4. ,   0. ,  22. ],
       [  0. ,   0. ,  90. , 270. ,   0.5,   3. ,   0. ,  22. ],
       [  0. ,  50. ,  90. , 270. ,   0.5,   2. ,   0. ,  22. ],
       [  0. , 100. ,  90. , 270. ,   0.5,   1. ,   0. ,  22. ],
       [  0. , 150. ,  90. , 270. ,   0.5,  -0. ,   0. ,  22. ],
       [  0. , 200. ,  90. , 270. ,   0.5,  -1. ,   0. ,  22. ],
       [  0. , 250. ,  90. , 270. ,   0.5,  -2. ,   0. ,  22. ],
       [  0. , 300. ,  90. , 270. ,   0.5,  -3. ,   0. ,  22. ],
       [  0. , 350. ,  90. , 270. ,   0.5,  -4. ,   0. ,  22. ]]), 0.0)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 2)
(array([[  0. , 100. ,  90. , 270. ,   0.5,   1. ,   0. ,  22. ],
       [  0. , 150. ,  90. , 270. ,   0.5,  -0. ,   0. ,  22. ]]), 0.0)
>>> r_info = rec_parameters(3, 3, 0, 90, 90, 2.5, -3.5, 180.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[  3. , 260. ,  90. ,  90. ,   2.5,  -5.5,   0. ,  22. ],
       [  3. , 310. ,  90. ,  90. ,   2.5,  -4.5,   0. ,  22. ],
       [  3. ,   0. ,  90. ,  90. ,   2.5,  -3.5,   0. ,  22. ],
       [  3. ,  50. ,  90. ,  90. ,   2.5,  -2.5,   0. ,  22. ],
       [  3. , 100. ,  90. ,  90. ,   2.5,  -1.5,   0. ,  22. ],
       [  3. , 150. ,  90. ,  90. ,   2.5,  -0.5,   0. ,  22. ],
       [  3. , 200. ,  90. ,  90. ,   2.5,   0.5,   0. ,  22. ],
       [  3. , 250. ,  90. ,  90. ,   2.5,   1.5,   0. ,  22. ],
       [  3. , 300. ,  90. ,  90. ,   2.5,   2.5,   0. ,  22. ],
       [  3. , 350. ,  90. ,  90. ,   2.5,   3.5,   0. ,  22. ]]), 180.0)
>>> r_info = rec_parameters(2, 2, 0, 90, 180, 2.5, -3.5, 270.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[  2. , 260. ,  90. , 180. ,   4.5,  -3.5,   0. ,  22. ],
       [  2. , 310. ,  90. , 180. ,   3.5,  -3.5,   0. ,  22. ],
       [  2. ,   0. ,  90. , 180. ,   2.5,  -3.5,   0. ,  22. ],
       [  2. ,  50. ,  90. , 180. ,   1.5,  -3.5,   0. ,  22. ],
       [  2. , 100. ,  90. , 180. ,   0.5,  -3.5,   0. ,  22. ],
       [  2. , 150. ,  90. , 180. ,  -0.5,  -3.5,   0. ,  22. ],
       [  2. , 200. ,  90. , 180. ,  -1.5,  -3.5,   0. ,  22. ],
       [  2. , 250. ,  90. , 180. ,  -2.5,  -3.5,   0. ,  22. ],
       [  2. , 300. ,  90. , 180. ,  -3.5,  -3.5,   0. ,  22. ],
       [  2. , 350. ,  90. , 180. ,  -4.5,  -3.5,   0. ,  22. ]]), 270.0)
>>> r_info = rec_parameters(4, 4, 0, 90, 180, -2.5, 3.5, 270.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[  4. , 320. ,  90. , 180. ,   5.5,   3.5,   0. ,  22. ],
       [  4. ,  10. ,  90. , 180. ,   4.5,   3.5,   0. ,  22. ],
       [  4. ,  60. ,  90. , 180. ,   3.5,   3.5,   0. ,  22. ],
       [  4. , 110. ,  90. , 180. ,   2.5,   3.5,   0. ,  22. ],
       [  4. , 160. ,  90. , 180. ,   1.5,   3.5,   0. ,  22. ],
       [  4. , 210. ,  90. , 180. ,   0.5,   3.5,   0. ,  22. ],
       [  4. , 260. ,  90. , 180. ,  -0.5,   3.5,   0. ,  22. ],
       [  4. , 310. ,  90. , 180. ,  -1.5,   3.5,   0. ,  22. ],
       [  4. ,   0. ,  90. , 180. ,  -2.5,   3.5,   0. ,  22. ],
       [  4. ,  50. ,  90. , 180. ,  -3.5,   3.5,   0. ,  22. ]]), 270.0)
>>> r_info = rec_parameters(5, 5, 0, 90, 45, 1.0, 1.0, 135.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[ 5.00000000e+00,  6.00000000e+01,  9.00000000e+01,
         4.50000000e+01, -3.24264069e+00, -3.24264069e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  1.10000000e+02,  9.00000000e+01,
         4.50000000e+01, -2.53553391e+00, -2.53553391e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  1.60000000e+02,  9.00000000e+01,
         4.50000000e+01, -1.82842712e+00, -1.82842712e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  2.10000000e+02,  9.00000000e+01,
         4.50000000e+01, -1.12132034e+00, -1.12132034e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  2.60000000e+02,  9.00000000e+01,
         4.50000000e+01, -4.14213562e-01, -4.14213562e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  3.10000000e+02,  9.00000000e+01,
         4.50000000e+01,  2.92893219e-01,  2.92893219e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  0.00000000e+00,  9.00000000e+01,
         4.50000000e+01,  1.00000000e+00,  1.00000000e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  5.00000000e+01,  9.00000000e+01,
         4.50000000e+01,  1.70710678e+00,  1.70710678e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  1.00000000e+02,  9.00000000e+01,
         4.50000000e+01,  2.41421356e+00,  2.41421356e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 5.00000000e+00,  1.50000000e+02,  9.00000000e+01,
         4.50000000e+01,  3.12132034e+00,  3.12132034e+00,
         0.00000000e+00,  2.20000000e+01]]), 135.0)
>>> r_info = rec_parameters(6, 3, 0, 90, 60, 1, 1, 150.0, 0, 22)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[ 6.00000000e+00,  6.00000000e+01,  9.00000000e+01,
         6.00000000e+01, -2.00000000e+00, -4.19615242e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.50000000e+00, -3.33012702e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.00000000e+00, -2.46410162e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -5.00000000e-01, -1.59807621e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -3.33066907e-16, -7.32050808e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  3.10000000e+02,  9.00000000e+01,
         6.00000000e+01,  5.00000000e-01,  1.33974596e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  0.00000000e+00,  9.00000000e+01,
         6.00000000e+01,  1.00000000e+00,  1.00000000e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  5.00000000e+01,  9.00000000e+01,
         6.00000000e+01,  1.50000000e+00,  1.86602540e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.00000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.00000000e+00,  2.73205081e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.50000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.50000000e+00,  3.59807621e+00,
         0.00000000e+00,  2.20000000e+01]]), 150.0)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50), 10., 10)
(array([[ 6.00000000e+00,  6.00000000e+01,  9.00000000e+01,
         6.00000000e+01, -2.00000000e+00, -4.19615242e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.50000000e+00, -3.33012702e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.00000000e+00, -2.46410162e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -5.00000000e-01, -1.59807621e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -3.33066907e-16, -7.32050808e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  3.10000000e+02,  9.00000000e+01,
         6.00000000e+01,  5.00000000e-01,  1.33974596e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  0.00000000e+00,  9.00000000e+01,
         6.00000000e+01,  1.00000000e+00,  1.00000000e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  5.00000000e+01,  9.00000000e+01,
         6.00000000e+01,  1.50000000e+00,  1.86602540e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.00000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.00000000e+00,  2.73205081e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.50000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.50000000e+00,  3.59807621e+00,
         0.00000000e+00,  2.20000000e+01]]), 150.0)
>>> s.compute_helical_symmetry_related_views(r_info, (10., 50.), 10., 10)
(array([[ 6.00000000e+00,  6.00000000e+01,  9.00000000e+01,
         6.00000000e+01, -2.00000000e+00, -4.19615242e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.50000000e+00, -3.33012702e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -1.00000000e+00, -2.46410162e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.10000000e+02,  9.00000000e+01,
         6.00000000e+01, -5.00000000e-01, -1.59807621e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  2.60000000e+02,  9.00000000e+01,
         6.00000000e+01, -3.33066907e-16, -7.32050808e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  3.10000000e+02,  9.00000000e+01,
         6.00000000e+01,  5.00000000e-01,  1.33974596e-01,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  0.00000000e+00,  9.00000000e+01,
         6.00000000e+01,  1.00000000e+00,  1.00000000e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  5.00000000e+01,  9.00000000e+01,
         6.00000000e+01,  1.50000000e+00,  1.86602540e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.00000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.00000000e+00,  2.73205081e+00,
         0.00000000e+00,  2.20000000e+01],
       [ 6.00000000e+00,  1.50000000e+02,  9.00000000e+01,
         6.00000000e+01,  2.50000000e+00,  3.59807621e+00,
         0.00000000e+00,  2.20000000e+01]]), 150.0)
setup_reconstructor(imgsize)[source]
setup_transform_with_reduced_alignment_parameters(each_phi, each_theta, each_psi, each_x, each_y)[source]
get_symmetry_transformations(point_symmetry)[source]
get_Euler_angles_after_transformation(each_phi, each_theta, each_psi, each_x, each_y, each_sym_transform)[source]
convert_alignment_parameters_to_symmetry_alignment_parameters(each_param)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> rec_parameters = s.make_named_tuple_for_reconstruction()
>>> r_info = rec_parameters(0, 0, 0, 90, 270, 0, 0, 0.0, 0, 22)
>>> a, b, c = s.compute_all_symmetry_related_views((1.408, 22.03), 1.2, 2, 'c2', r_info)
>>> a
array([[0.00000000e+00, 3.37969999e+02, 9.00000000e+01, 2.70000000e+02,
        0.00000000e+00, 1.17333329e+00, 0.00000000e+00, 2.20000000e+01],
       [0.00000000e+00, 1.57970001e+02, 9.00000000e+01, 2.70000000e+02,
        0.00000000e+00, 1.17333329e+00, 0.00000000e+00, 2.20000000e+01],
       [0.00000000e+00, 2.50447816e-06, 9.00000000e+01, 2.70000000e+02,
        0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 2.20000000e+01],
       [0.00000000e+00, 1.79999997e+02, 9.00000000e+01, 2.70000000e+02,
        0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 2.20000000e+01]])
project_from_volume_and_backproject(alignment_parameters, trimmed_image_size, xvol, pxvol)[source]
class segclassreconstruct.SegClassReconstruct3d(parset=None)[source]

Methods

adjust_bessel_order_if_out_of_plane_not_zero(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

adjust_reciprocal_layer_line_pitches_by_out_of_plane_angle(pitches)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_all_symmetry_related_views(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_distances_to_helical_axis(shift_x, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_inplane_rotation_from_Euler_angles(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_symmetry_related_views(…)

  1. positive y-shift for straight helix

compute_point_where_normal_and_parallel_line_intersect(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

create_single_layer_line(linex, linex_fine, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

determine_symmetry_view_count(…[, …])

>>> sg = SegClassReconstruct()

generate_layerline_bessel_pairs_from_rise_and_rotation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_symmetry_grid_file_name(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_list_of_bessel_order_maxima(order_count)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_quarter_half_3quarter_nyquist_average_from_amp_correlation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

make_smooth_cylinder_mask(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

montage_exp_vs_sim_power_spectrum(…)

>>> from utilities import model_gauss_noise

center_and_rotate_image_by_helix_projection

center_class_avg

check_parameter_integritry_and_start_setup

clear_previous_alignment_parameters_and_copy_class_to_local_directory

compute_amplitude_correlation_between_sim_and_exp_power_spectrum

compute_and_write_symmetry_related_views

compute_point_group_symmetry_related_views

compute_straight_phi_and_yshift

compute_transform_with_aligned_helix_segment

convert_alignment_parameters_to_symmetry_alignment_parameters

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts_old

determine_best_in_plane_rotation_angle

determine_mean_ccc_deviation_within_symmetry_related_views

determine_pixel_width_of_helix_for_display

determine_symmetry_view_count_for_average_helical_rise

determine_trimmed_image_size

filter_image_by_fourier_filter_while_padding

generate_series

get_Euler_angles_after_transformation

get_helical_error_string

get_standard_proj_parameters

get_symmetry_transformations

get_symmetry_transformations_from_helix_input

make_helical_error_tuple

make_rec_stack_info

montage_class_avg_vs_reprojection

montage_class_avg_vs_reprojection_periodogram

normalize_power_spectrum

pad_mask_and_compute_power

prepare_class_avg_for_montage

prepare_class_avg_periodogram_for_montage

prepare_ideal_power_spectrum_from_layer_lines

prepare_symmetry_computation

prepare_volume_locally

project_from_volume_and_backproject

project_locally

project_through_reference_using_parameters_and_log

set_header_with_helical_parameters

set_projection_transform_for_helix_azimuth_zero

setup_reconstructor

setup_transform_with_reduced_alignment_parameters

window_left_half_of_spectrum

write_out_side_by_side_display_of_images_and_power_spectra

determine_best_in_plane_rotation_angle(class_avg, inplane_rotations, helix_mask=None, helix_shift_x=0.0)[source]
center_and_rotate_image_by_helix_projection(helix_width_pixel, inplane_rotations, class_avg, segment_size, helix_height)[source]
center_class_avg(infile, centered_class_avg_file, helix_width_pixel, percent_reconstruction_size, out_of_plane_tilt_angle)[source]
generate_symmetry_grid_file_name(symmetry_pair, volume_name, rise_rot_or_pitch_unit_choice='rise/rotation')[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> SegClassReconstruct().generate_symmetry_grid_file_name([12,50], 'rec_vol.hdf', 'rise/rotation')
'rec_vol_rise12_rot50.hdf'
>>> SegClassReconstruct().generate_symmetry_grid_file_name([12,50], 'rec_vol.hdf', 'pitch/unit_number')
'rec_vol_pitch12_unitno50.hdf'
>>> SegClassReconstruct().generate_symmetry_grid_file_name([12.003,50.333356], 'rec_vol.hdf', 'rise/rotation')
'rec_vol_rise12003_rot50333356.hdf'
>>> SegClassReconstruct().generate_symmetry_grid_file_name([12,50], '/test/rec_vol.hdf', 'pitch/unit_number')
'/test/rec_vol_pitch12_unitno50.hdf'
determine_trimmed_image_size(infile, percent_reconstruction_size, helixwidth_pix, pixelsize)[source]
determine_symmetry_view_count_for_average_helical_rise(symmetry_sequence, segment_size_in_pixel, trimmed_image_size)[source]
determine_symmetry_view_count(segment_size_in_pixel, trimmed_image_size, each_symmetry_pair, pixelsize, minimum_image_count_3d=8)[source]
>>> sg = SegClassReconstruct()
>>> sg.determine_symmetry_view_count(530, 500, ((77.3, 34)), 1, 0)
1
>>> sg.determine_symmetry_view_count(575, 500, ((77.3, 34)), 1, 0)
1
>>> sg.determine_symmetry_view_count(100, 90, ((10, 34)), 10)
10
>>> sg.determine_symmetry_view_count(530, 500, ((0, 0)), 1, 0)
1
>>> sg.determine_symmetry_view_count(100, 90, ((20, 34)), 10, 8) 
ValueError: Number of computed symmetry-related views useful for reconstruction is smaller than 8 
(with segment_size of 90/100 pixels and helical rise: 20). No sensible 3D reconstruction possible.
 Either decrease 'Helical rise' < 12.5 Angstrom or 'percent of reconstruction size' < 84.0 % parameters.
  In addition, you can also decrease 'Minimum number of images for 3D reconstruction'.    
get_symmetry_transformations_from_helix_input(polar_helix, rotational_symmetry_start)[source]
check_parameter_integritry_and_start_setup()[source]
class segclassreconstruct.SegClassReconstruct(parset=None)[source]

Methods

adjust_bessel_order_if_out_of_plane_not_zero(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

adjust_reciprocal_layer_line_pitches_by_out_of_plane_angle(pitches)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_all_symmetry_related_views(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_distances_to_helical_axis(shift_x, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_inplane_rotation_from_Euler_angles(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_symmetry_related_views(…)

  1. positive y-shift for straight helix

compute_point_where_normal_and_parallel_line_intersect(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

create_single_layer_line(linex, linex_fine, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

determine_point_group_symmetry_from_input(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

determine_symmetry_view_count(…[, …])

>>> sg = SegClassReconstruct()

generate_layerline_bessel_pairs_from_rise_and_rotation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_symmetry_grid_file_name(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_correct_primary_and_secondary_variables_for_database(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_correct_primary_and_secondary_variables_from_database(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_list_of_bessel_order_maxima(order_count)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_quarter_half_3quarter_nyquist_average_from_amp_correlation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

make_smooth_cylinder_mask(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

montage_exp_vs_sim_power_spectrum(…)

>>> from utilities import model_gauss_noise

center_and_rotate_image_by_helix_projection

center_class_avg

check_parameter_integritry_and_start_setup

cleanup_at_end

clear_previous_alignment_parameters_and_copy_class_to_local_directory

compute_amplitude_correlation_between_sim_and_exp_power_spectrum

compute_and_write_symmetry_related_views

compute_point_group_symmetry_related_views

compute_straight_phi_and_yshift

compute_transform_with_aligned_helix_segment

convert_alignment_parameters_to_symmetry_alignment_parameters

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts_old

determine_best_in_plane_rotation_angle

determine_mean_ccc_deviation_within_symmetry_related_views

determine_pixel_width_of_helix_for_display

determine_symmetry_view_count_for_average_helical_rise

determine_trimmed_image_size

enter_grid_values_in_database

enter_starting_parameters_of_grid_search

filter_image_by_fourier_filter_while_padding

generate_isosurface_or_slice_views_from_volume_if_demanded

generate_series

get_Euler_angles_after_transformation

get_alignment_parameters_from_infile

get_helical_error_string

get_standard_proj_parameters

get_symmetry_file_name

get_symmetry_transformations

get_symmetry_transformations_from_helix_input

log_and_stack_alignment_parameters_into_numpy_array

make_helical_error_tuple

make_named_tuple_for_reconstruction

make_rec_stack_info

make_symmetry_vol_named_tuple

montage_class_avg_vs_reprojection

montage_class_avg_vs_reprojection_periodogram

normalize_power_spectrum

pad_mask_and_compute_power

perform_reconstructions_from_class_for_symmetry_combinations

prepare_class_avg_for_montage

prepare_class_avg_periodogram_for_montage

prepare_ideal_power_spectrum_from_layer_lines

prepare_segclassreconstruct

prepare_symmetry_computation

prepare_volume_locally

project_from_volume_and_backproject

project_locally

project_through_reference_using_parameters_and_log

reconstruct_volume_from_class_average

reconstruct_volumes_for_each_symmetry_pair

set_header_with_helical_parameters

set_isotropic_pixelsize_in_volume

set_projection_transform_for_helix_azimuth_zero

setup_reconstructor

setup_transform_with_reduced_alignment_parameters

window_left_half_of_spectrum

write_out_side_by_side_display_of_images_and_power_spectra

write_reconstruction_file_and_set_isotropic_pixelsize

make_named_tuple_for_reconstruction()[source]
get_alignment_parameters_from_infile(infile)[source]
log_and_stack_alignment_parameters_into_numpy_array(alignment_parameters, symmetry_parameters, symmetry_rec_loginfo)[source]
determine_point_group_symmetry_from_input(polar_helix, rotational_symmetry)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> SegClassReconstruct().determine_point_group_symmetry_from_input('polar', 2)
'c2'
>>> SegClassReconstruct().determine_point_group_symmetry_from_input('apolar', 4)
'd4'
reconstruct_volume_from_class_average(infile, vol_name, segment_size_in_pixel, trimmed_image_size, symmetry_views_count, each_rec_number, each_symmetry_pair, point_symmetry, montage_reprj, montage_power)[source]
get_symmetry_file_name(each_symmetry_pair, vol_name)[source]
set_isotropic_pixelsize_in_volume(pixelsize, volume)[source]
write_reconstruction_file_and_set_isotropic_pixelsize(each_symmetry_pair, symmetry_helix_volume, pixelsize, rec_vol, point_symmetry)[source]
generate_isosurface_or_slice_views_from_volume_if_demanded(isosurface_stack, slice_stack, each_rec_number, each_symmetry_pair, helix_volume, noise_data=False)[source]
prepare_segclassreconstruct()[source]
make_symmetry_vol_named_tuple()[source]
reconstruct_volumes_for_each_symmetry_pair(symmetry_sequence, total_symmetry_pair_id, infile, vol_name, montage_repr, montage_power)[source]
get_correct_primary_and_secondary_variables_for_database(rise_rot_or_pitch_unit_choice, ssecondary_variable='')[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> hel_rot_n_u_t = 'Helical rotation or number of units per turn'
>>> s.get_correct_primary_and_secondary_variables_for_database('rise/rotation', hel_rot_n_u_t)
('Helical rise in Angstrom', 'Helical rotation in degrees')
>>> s.get_correct_primary_and_secondary_variables_for_database('pitch/number_of_unit_per_turn')
('Helical pitch in Angstrom', 'Number of units per turn')
>>> s.get_correct_primary_and_secondary_variables_for_database('rise/rotation', None)
('Helical rise in Angstrom', '')
get_correct_primary_and_secondary_variables_from_database(primary_variable, secondary_variable)[source]
>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct
>>> s = SegClassReconstruct()
>>> s.get_correct_primary_and_secondary_variables_from_database('Helical rise in Angstrom', 'Helical rotation in degrees')
('rise/rotation', 'helical_rise_or_pitch', 'helical_rotation_or_number_of_units_per_turn')
>>> s.get_correct_primary_and_secondary_variables_from_database('Helical pitch in Angstrom', 'Number of units per turn')
('pitch/unit_number', 'helical_rise_or_pitch', 'helical_rotation_or_number_of_units_per_turn')
enter_grid_values_in_database(symmetry_sequence, symmetry_helix_volumes, montaged_reprojection_stack, montaged_power_stack)[source]
cleanup_at_end()[source]
perform_reconstructions_from_class_for_symmetry_combinations()[source]
segclassreconstruct.main()[source]
class segclassreconstruct_mpi.SegClassReconstructMpi(parset=None)[source]

Methods

adjust_bessel_order_if_out_of_plane_not_zero(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

adjust_reciprocal_layer_line_pitches_by_out_of_plane_angle(pitches)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_all_symmetry_related_views(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_distances_to_helical_axis(shift_x, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_inplane_rotation_from_Euler_angles(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_helical_symmetry_related_views(…)

  1. positive y-shift for straight helix

compute_point_where_normal_and_parallel_line_intersect(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

compute_sx_sy_from_shifts_normal_and_parallel_to_helix_axis_with_inplane_angle(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_grid_to_rise_rotation_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_pitch_unit_pair_to_rise_rotation_pairs(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_grid_to_pitch_unit_grid(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_or_pitch_unitnumber_series_to_grid_of_tuples(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

convert_rise_rotation_pair_to_pitch_unit_pair(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

create_single_layer_line(linex, linex_fine, …)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

determine_point_group_symmetry_from_input(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

determine_symmetry_view_count(…[, …])

>>> sg = SegClassReconstruct()

generate_layerline_bessel_pairs_from_rise_and_rotation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_rise_rotation_or_pitch_unitnumber_pairs_for_symmetry_grid(…)

  • Function to generate pairs of rise and rotation for symmetry grid search

generate_symmetry_grid_file_name(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

generate_unique_rise_rotation_or_pitch_unitnumber_arrays(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_correct_primary_and_secondary_variables_for_database(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_correct_primary_and_secondary_variables_from_database(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_list_of_bessel_order_maxima(order_count)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

get_quarter_half_3quarter_nyquist_average_from_amp_correlation(…)

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

make_smooth_cylinder_mask(…[, …])

>>> from spring.segment3d.segclassreconstruct import SegClassReconstruct

montage_exp_vs_sim_power_spectrum(…)

>>> from utilities import model_gauss_noise

center_and_rotate_image_by_helix_projection

center_class_avg

check_parameter_integritry_and_start_setup

cleanup_at_end

clear_previous_alignment_parameters_and_copy_class_to_local_directory

compute_amplitude_correlation_between_sim_and_exp_power_spectrum

compute_and_write_symmetry_related_views

compute_point_group_symmetry_related_views

compute_straight_phi_and_yshift

compute_transform_with_aligned_helix_segment

convert_alignment_parameters_to_symmetry_alignment_parameters

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts

correct_straight_symmetry_parameters_for_in_plane_rotation_and_shifts_old

determine_best_in_plane_rotation_angle

determine_mean_ccc_deviation_within_symmetry_related_views

determine_pixel_width_of_helix_for_display

determine_symmetry_view_count_for_average_helical_rise

determine_trimmed_image_size

enter_grid_values_in_database

enter_starting_parameters_of_grid_search

filter_image_by_fourier_filter_while_padding

generate_isosurface_or_slice_views_from_volume_if_demanded

generate_series

get_Euler_angles_after_transformation

get_alignment_parameters_from_infile

get_helical_error_string

get_standard_proj_parameters

get_symmetry_file_name

get_symmetry_transformations

get_symmetry_transformations_from_helix_input

log_and_stack_alignment_parameters_into_numpy_array

make_helical_error_tuple

make_named_tuple_for_reconstruction

make_rec_stack_info

make_symmetry_vol_named_tuple

montage_class_avg_vs_reprojection

montage_class_avg_vs_reprojection_periodogram

normalize_power_spectrum

pad_mask_and_compute_power

perform_reconstructions_from_class_for_symmetry_combinations

prepare_class_avg_for_montage

prepare_class_avg_periodogram_for_montage

prepare_ideal_power_spectrum_from_layer_lines

prepare_segclassreconstruct

prepare_segclassreconstruct_mpi

prepare_symmetry_computation

prepare_volume_locally

project_from_volume_and_backproject

project_locally

project_through_reference_using_parameters_and_log

reconstruct_volume_from_class_average

reconstruct_volumes_for_each_symmetry_pair

reconstruct_volumes_from_class_avg

set_header_with_helical_parameters

set_isotropic_pixelsize_in_volume

set_projection_transform_for_helix_azimuth_zero

setup_reconstructor

setup_segclassreconstruct_mpi

setup_transform_with_reduced_alignment_parameters

window_left_half_of_spectrum

write_out_side_by_side_display_of_images_and_power_spectra

write_reconstruction_file_and_set_isotropic_pixelsize

prepare_segclassreconstruct_mpi()[source]
setup_segclassreconstruct_mpi()[source]
reconstruct_volumes_from_class_avg(symmetry_sequence, total_symmetry_pair_id, entered_symmetry_seq)[source]
perform_reconstructions_from_class_for_symmetry_combinations()[source]
segclassreconstruct_mpi.main()[source]