Documented functions with links to source¶
Program to optimize michelixtrace by varying michelixtrace parameters systematically on a grid
-
class
michelixtracegrid.
MicHelixTraceGridPar
[source]¶ Class to initiate default dictionary with input parameters including help and range values and status dictionary
Methods
set_compute_recall_precision
(feature_set)define_input_and_output_michelixtrace
define_michelixtrace_parameters
define_parameters_and_their_properties
define_program_states
get_parameters_to_be_varied
set_a_threshold
set_absolute_threshold
set_absolute_threshold_option
set_box_file_step
set_ground_truth_coord_file
set_helix_length
set_helix_reference
set_invert_option
set_order_fit
set_parameter_search_option
set_pruning_cutoff
-
class
michelixtracegrid.
MicHelixTraceGridSetup
(parset=None)[source]¶ Methods
>>> from spring.micprgs.michelixtracegrid import MicHelixTraceGrid
bwmorph_thin
(image[, n_iter])Perform morphological thinning of a binary image
define_thresholds_and_minimum_helix_lengths
(…)>>> from spring.micprgs.michelixtrace import MicHelixTrace
determine_xy_center_grid
(tile_size, overlap, …)>>> from spring.micprgs.michelixtrace import MicHelixTrace
gold_particles_mask
(mic_1d[, thr])- param mic_1d
Ravelled (1D) micrograph
model_circle
(radius_y, radius_x, ydim, xdim)>>> from spring.micprgs.michelixtrace import MicHelixTrace
model_square
(length_y, length_x, ydim, xdim)>>> from spring.micprgs.michelixtrace import MicHelixTrace
orient_reference_power_with_overlapping_powers
(…)Updated Util.multiref_polar_ali_2d(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim) 2020-12-04 1.
set_up_branch_point_response
()>>> from spring.micprgs.michelixtrace import MicHelixTrace
smooth_mask_helix
(pixelsize, reference)- return
boxfunction with smooth edges for masking the reference helix
build_cc_image_of_helices
compute_length_of_fit
compute_persistence_length
compute_precision_and_recall_of_traces_with_respect_ground_truth
compute_step_size
correct_coordinates_and_visualize_traces
define_all_michelixtrace_parameters
enter_helixinfo_into_springdb
find_translations_by_cc
fit_and_create_coordinates_according_to_order
generate_and_plot_parameter_search_summary
generate_michelixtrace_parameters_while_removing_grid_parameters
generate_stack_of_overlapping_images_powers
get_branch_point_response
get_interactively_traced_helices_to_compare
get_lookup_table_for_bwmorph_thin
get_mask
get_rid_of_branchpoints_and_crossings
mask_micrograph_edges
perform_absolute_thresholding_of_ccmap
perform_connected_component_analysis
perform_thresholding_of_ccmap
prepare_compute_rho_theta_cc_based_on_overlapping_tiles
prepare_power_from_reference
preprocess_micrograph
prune_helices_and_plot_persistence_length_summary
setup_grid_parameters
setup_parameters_for_each_grid_point
trace_helices
trace_helices_in_micrographs
treshold_and_clean_up_binary_map
update_plot_info_and_helix_info_for_each_micrograph
write_boxfiles_from_helix_info
write_helixinfo
write_out_determined_tracing_criteria_in_database
-
add_grid_point_to_parameter_dictionary
(first_param, second_param, each_grid_point, parameters)[source]¶ >>> from spring.micprgs.michelixtracegrid import MicHelixTraceGrid >>> min_hl = 'min_helix_length' >>> params = MicHelixTraceGridPar().parameters >>> s = MicHelixTraceGrid() >>> s.add_grid_point_to_parameter_dictionary('alpha_threshold', min_hl, [-111, 1.111], params) OrderedDict([('Micrographs', 'cs_scan034.tif'), ('Diagnostic plot pattern', 'michelixtracegrid_diag.pdf'), ('First parameter', 'alpha_threshold'), ('Second parameter', 'min_helix_length'), ('Lower and upper limit first parameter', (1.4, 1.9)), ('Lower and upper limit second parameter', (22.0, 24.0)), ('First and second parameter increment', (0.1, 0.3)), ('Subgrid option', False), ('Part and number of subgrids', (1, 3)), ('Grid continue option', False), ('Grid database', 'grid.db'), ('Helix reference', 'helix_reference.hdf'), ('Invert option', False), ('Estimated helix width in Angstrom', 200), ('Pixel size in Angstrom', 1.163), ('Binning option', True), ('Binning factor', 4), ('Tile size power spectrum in Angstrom', 500), ('Tile overlap in percent', 80), ('Alpha threshold cc-map', -111), ('Absolute threshold option cc-map', False), ('Absolute threshold cc-map', 0.2), ('Order fit', 2), ('Minimum and maximum helix length', (1.111, 1500)), ('Pruning cutoff bending', 2.0), ('Box file coordinate step', 70.0), ('Compute performance score', False), ('Parameter search option', False), ('Manually traced helix file', 'mic.box'), ('MPI option', True), ('Number of CPUs', 2), ('Temporary directory', '/tmp')])
-
class
michelixtracegrid.
MicHelixTraceGrid
(parset=None)[source]¶ Methods
add_grid_point_to_parameter_dictionary
(…)>>> from spring.micprgs.michelixtracegrid import MicHelixTraceGrid
bwmorph_thin
(image[, n_iter])Perform morphological thinning of a binary image
define_thresholds_and_minimum_helix_lengths
(…)>>> from spring.micprgs.michelixtrace import MicHelixTrace
determine_xy_center_grid
(tile_size, overlap, …)>>> from spring.micprgs.michelixtrace import MicHelixTrace
common?
>>> from spring.micprgs.michelixtracegrid import MicHelixTraceGrid
gold_particles_mask
(mic_1d[, thr])- param mic_1d
Ravelled (1D) micrograph
model_circle
(radius_y, radius_x, ydim, xdim)>>> from spring.micprgs.michelixtrace import MicHelixTrace
model_square
(length_y, length_x, ydim, xdim)>>> from spring.micprgs.michelixtrace import MicHelixTrace
orient_reference_power_with_overlapping_powers
(…)Updated Util.multiref_polar_ali_2d(currimg, [polarrefs], [txrng], [tyrng], ringstep, mode, alignrings, halfdim, halfdim) 2020-12-04 1.
set_up_branch_point_response
()>>> from spring.micprgs.michelixtrace import MicHelixTrace
smooth_mask_helix
(pixelsize, reference)- return
boxfunction with smooth edges for masking the reference helix
build_cc_image_of_helices
compute_length_of_fit
compute_persistence_length
compute_precision_and_recall_of_traces_with_respect_ground_truth
compute_step_size
correct_coordinates_and_visualize_traces
define_all_michelixtrace_parameters
enter_helixinfo_into_springdb
enter_parameters_in_grid_database
find_translations_by_cc
fit_and_create_coordinates_according_to_order
generate_and_plot_parameter_search_summary
generate_michelixtrace_parameters_while_removing_grid_parameters
generate_stack_of_overlapping_images_powers
get_branch_point_response
get_interactively_traced_helices_to_compare
get_lookup_table_for_bwmorph_thin
get_mask
get_rid_of_branchpoints_and_crossings
get_variables_ranges_and_increments
launch_michelixtrace_jobs
make_database_entries
mask_micrograph_edges
perform_absolute_thresholding_of_ccmap
perform_connected_component_analysis
perform_thresholding_of_ccmap
prepare_compute_rho_theta_cc_based_on_overlapping_tiles
prepare_grid_database
prepare_power_from_reference
preprocess_micrograph
prune_helices_and_plot_persistence_length_summary
retrieve_performance_score_from_run
setup_grid_parameters
setup_grid_sequence
setup_parameters_for_each_grid_point
trace_helices
trace_helices_in_micrographs
treshold_and_clean_up_binary_map
update_plot_info_and_helix_info_for_each_micrograph
write_boxfiles_from_helix_info
write_helixinfo
write_out_determined_tracing_criteria_in_database
-
generate_cmdline_for_each_grid_point
(parameter_file)[source]¶ >>> from spring.micprgs.michelixtracegrid import MicHelixTraceGrid >>> s = MicHelixTraceGrid() >>> s.generate_cmdline_for_each_grid_point('alpha_threshold_1e-10_min_helix_length_500.par') 'michelixtrace --d alpha_threshold_1e-10_min_helix_length_500 --f alpha_threshold_1e-10_min_helix_length_500.par'
-
enter_parameters_in_grid_database
(primary_variable, secondary_variable, run_name, each_grid_point, grid_name, comp_measures)[source]¶
-
enter_variables_into_grid_database
(primary_variable, secondary_variable, primary_range, secondary_range, primary_inc, second_inc, rise_rot_or_pitch_unit_choice=None)[source]¶ common?