Documented functions with links to source¶
Program to classify excised in-plane rotated segments using SPARX’s k-means clustering
-
class
segmentclass.
SegmentClassPar
[source]¶ Class to initiate default dictionary with input parameters including help and range values and status dictionary
Methods
add_mask_dimension_to_features
define_parameters_and_their_properties
define_program_states
set_class_avg_out_stack
set_class_count
set_class_var_out_stack
set_eigenimg_out_stack
set_frc_based_filter_option
set_iteration_count
set_keep_intermediate_files_option
set_reference_option
set_refinement_option
set_spring_db_prep_rec
-
class
segmentclass.
SegmentClassPreparation
(parset=None)[source]¶ Class that holds functions for examining segments from micrographs
__init__ Function to interpret multi-input parameters
Methods
apply_binfactor_if_required
define_helix_or_particle_dimensions
determine_minimal_segment_size
perform_binning_and_trimming_of_input_stack_if_required
perform_binning_and_trimming_of_reference_if_required
prepare_mask
prepare_mask_ori
setup_mask
setup_segmentalign_filter
-
class
segmentclass.
SegmentClassExternalPrograms
[source]¶ Methods
>>> from spring.segment2d.segmentclass import SegmentClass
spring_align2d
(infilestack, reference_stack)Function to launch helical 2D alignment program segmentalign
sx_kmeans
(alistack, maskfile, class_count[, …])Function to launch SPARX’s k-means analysis
sx_kmeans_groups
([alistack, maskfile, noclasses])Function to launch SPARX’s k-means groups analysis (sx_kmeans_groups.py)
add_mask_dimensions_to_align2d_features
get_dir_name_for_classification
run_segmentalign2d_in_separate_process
sx_kmeans_wrap
-
spring_align2d
(infilestack, reference_stack, reference_option=True, local_refinement=False)[source]¶ Function to launch helical 2D alignment program segmentalign
Input: infilestack, reference stack
Output: aligned stack
Usage: alistack = spring_align2d(infilestack, reference_stack)
-
divide_sx_kmeans_in_reasonable_chunks
(img_count, class_count, chunk_size=2000)[source]¶ >>> from spring.segment2d.segmentclass import SegmentClass >>> SegmentClass().divide_sx_kmeans_in_reasonable_chunks(10, 3, 6) ([[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [3]) >>> SegmentClass().divide_sx_kmeans_in_reasonable_chunks(10, 4, 6) ([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]], [2, 2]) >>> SegmentClass().divide_sx_kmeans_in_reasonable_chunks(20, 6, 5) ([[0, 1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18, 19]], [2, 2, 2])
-
class
segmentclass.
SegmentClassStatistics
[source]¶ Methods
compute_eigen_images
(stack, eigenstack, …)Perform PCA on stack file and Get eigen images
compute_average_variance_and_eigenimages_on_orignal_stack
create_database_with_stack_id_entries
enter_class_assignment_in_database
finish_classification
get_alignment_info_from_stack
log_member_statistics_from_classes
make_align_named_tuple
-
compute_eigen_images
(stack, eigenstack, mask, avg)[source]¶ Perform PCA on stack file and Get eigen images
-
-
class
segmentclass.
SegmentClass
(parset=None)[source]¶ Methods
compute_eigen_images
(stack, eigenstack, …)Perform PCA on stack file and Get eigen images
divide_sx_kmeans_in_reasonable_chunks
(…[, …])>>> from spring.segment2d.segmentclass import SegmentClass
spring_align2d
(infilestack, reference_stack)Function to launch helical 2D alignment program segmentalign
sx_kmeans
(alistack, maskfile, class_count[, …])Function to launch SPARX’s k-means analysis
sx_kmeans_groups
([alistack, maskfile, noclasses])Function to launch SPARX’s k-means groups analysis (sx_kmeans_groups.py)
add_mask_dimensions_to_align2d_features
apply_binfactor_if_required
classify
compute_average_variance_and_eigenimages_on_orignal_stack
create_database_with_stack_id_entries
define_helix_or_particle_dimensions
determine_minimal_segment_size
enter_class_assignment_in_database
finish_classification
get_alignment_info_from_stack
get_dir_name_for_classification
log_member_statistics_from_classes
make_align_named_tuple
perform_binning_and_trimming_of_input_stack_if_required
perform_binning_and_trimming_of_reference_if_required
prepare_mask
prepare_mask_ori
run_segmentalign2d_in_separate_process
setup_mask
setup_segmentalign_filter
sx_kmeans_wrap