NeuXtalViz.presenters package#
Submodules#
NeuXtalVizPresenter: Presenter class for connecting the view and model in NeuXtalViz.
This module defines the NeuXtalVizPresenter class, which acts as the mediator between the user interface (view) and the underlying data/model logic. It handles user actions, updates the view based on model state, and manages status/progress reporting for the main visualization window.
Classes#
- NeuXtalVizPresenter
Presenter for the main visualization window, connecting view events to model logic and updating the UI accordingly.
- class NeuXtalVizPresenter(view, model)[source]#
Bases:
object
Presenter for the main visualization window in NeuXtalViz.
Connects user interface events to model logic, updates the view based on model state, and manages status and progress reporting.
Methods
Enable or disable reciprocal lattice display in the view.
Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
Indicate invalid parameters to the user and reset progress.
Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
Set the view to the b-axis direction (reciprocal lattice).
Set the view to a manually specified axis direction.
Set the view's up direction to a manually specified axis.
- update_complete(status='Complete!')[source]#
Indicate completion to the user and reset progress.
- Parameters:
- statusstr, optional
Completion message (default is “Complete!”).
- update_processing(status='Processing...', progress=1)[source]#
Indicate processing state to the user and update progress.
- Parameters:
- statusstr, optional
Processing message (default is “Processing…”).
- progressint, optional
Progress step or value (default is 1).
- update_progress(progress)[source]#
Update progress step in the view.
- Parameters:
- progressint
Progress step or value.
- class CrystalStructure(view, model)[source]#
Bases:
NeuXtalVizPresenter
Methods
change_lattice
()Enable or disable reciprocal lattice display in the view.
save_screenshot
()Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
update_invalid
()Indicate invalid parameters to the user and reset progress.
update_oriented_lattice
()Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
view_ab_star
()Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
view_bc_star
()Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
view_ca_star
()Set the view to the b-axis direction (reciprocal lattice).
view_manual
()Set the view to a manually specified axis direction.
view_up_manual
()Set the view's up direction to a manually specified axis.
calculate_F2
calculate_F2_complete
calculate_F2_process
calculate_hkl
calculate_hkl_complete
calculate_hkl_process
generate_groups
generate_settings
highlight_row
load_CIF
save_INS
select_isotope
set_atom_table
update_atoms
update_parameters
update_selection
- class Experiment(view, model)[source]#
Bases:
NeuXtalVizPresenter
Methods
change_lattice
()Enable or disable reciprocal lattice display in the view.
save_screenshot
()Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
update_invalid
()Indicate invalid parameters to the user and reset progress.
update_oriented_lattice
()Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
view_ab_star
()Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
view_bc_star
()Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
view_ca_star
()Set the view to the b-axis direction (reciprocal lattice).
view_manual
()Set the view to a manually specified axis direction.
view_up_manual
()Set the view's up direction to a manually specified axis.
add_orientation
add_orientation_complete
add_orientation_process
add_settings
add_settings_complete
add_settings_process
calculate_double
calculate_double_complete
calculate_double_process
calculate_single
calculate_single_alt
calculate_single_complete
calculate_single_hkl
calculate_single_process
create_instrument
delete_angles
delete_angles_complete
delete_angles_process
load_UB
load_detector
load_experiment
load_goniometer
load_mask
lookup_angle
mesh_scan
mesh_scan_complete
mesh_scan_process
optimize_coverage
optimize_coverage_complete
optimize_coverage_process
save_CSV
save_experiment
switch_centering
switch_crystal
switch_group
switch_instrument
update_goniometer
update_peaks
update_plan
update_wavelength
visualize
- class PeriodicTable(view, model)[source]#
Bases:
object
Methods
connect_atom_model_view
show_atom_dialog
update_selection
- class Sample(view, model)[source]#
Bases:
NeuXtalVizPresenter
Methods
change_lattice
()Enable or disable reciprocal lattice display in the view.
save_screenshot
()Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
update_invalid
()Indicate invalid parameters to the user and reset progress.
update_oriented_lattice
()Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
view_ab_star
()Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
view_bc_star
()Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
view_ca_star
()Set the view to the b-axis direction (reciprocal lattice).
view_manual
()Set the view to a manually specified axis direction.
view_up_manual
()Set the view's up direction to a manually specified axis.
add_sample
highlight_row
load_UB
set_goniometer_table
update_parameters
- class UB(view, model)[source]#
Bases:
NeuXtalVizPresenter
Methods
change_lattice
()Enable or disable reciprocal lattice display in the view.
save_screenshot
()Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
update_invalid
()Indicate invalid parameters to the user and reset progress.
update_oriented_lattice
()Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
view_ab_star
()Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
view_bc_star
()Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
view_ca_star
()Set the view to the b-axis direction (reciprocal lattice).
view_manual
()Set the view to a manually specified axis direction.
view_up_manual
()Set the view's up direction to a manually specified axis.
add_peak
calculate_hkl
calculate_peaks
cluster
cluster_complete
cluster_process
convert_Q
convert_Q_complete
convert_Q_process
convert_to_hkl
convert_to_hkl_complete
convert_to_hkl_process
filter_peaks
filter_peaks_complete
filter_peaks_process
find_conventional
find_conventional_complete
find_conventional_process
find_niggli
find_niggli_complete
find_niggli_process
find_peaks
find_peaks_complete
find_peaks_process
get_clim_method
get_modulation_info
get_normal
hand_index_fractional
hand_index_integer
highlight_cell
highlight_peak
index_peaks
index_peaks_complete
index_peaks_process
integrate_peaks
integrate_peaks_complete
integrate_peaks_process
lattice_transform
load_Q
load_UB
load_detector_calibration
load_goniometer_calibration
load_peaks
load_tube_calibration
predict_peaks
predict_peaks_complete
predict_peaks_process
refine_UB
refine_UB_complete
refine_UB_process
reslice
save_Q
save_UB
save_peaks
select_cell
select_cell_complete
select_cell_process
set_UB
show_cells
show_cells_complete
show_cells_process
switch_instrument
symmetry_transform
transform_UB
transform_UB_complete
transform_UB_process
update_check_hkl
update_find_distance
update_find_spacing
update_instrument_view
update_instrument_view_complete
update_instrument_view_process
update_lattice_info
update_roi
update_scan
update_wavelength
visualize
- class VolumeSlicer(view, model)[source]#
Bases:
NeuXtalVizPresenter
Methods
change_lattice
()Enable or disable reciprocal lattice display in the view.
save_screenshot
()Save a screenshot of the current view to a file.
update_complete
([status])Indicate completion to the user and reset progress.
update_invalid
()Indicate invalid parameters to the user and reset progress.
update_oriented_lattice
()Update the oriented lattice parameter display in the view.
update_processing
([status, progress])Indicate processing state to the user and update progress.
update_progress
(progress)Update progress step in the view.
update_status
(status)Update status information in the view.
view_ab
()Set the view to the c* direction (real lattice).
view_ab_star
()Set the view to the c-axis direction (reciprocal lattice).
view_bc
()Set the view to the a* direction (real lattice).
view_bc_star
()Set the view to the a-axis direction (reciprocal lattice).
view_ca
()Set the view to the b* direction (real lattice).
view_ca_star
()Set the view to the b-axis direction (reciprocal lattice).
view_manual
()Set the view to a manually specified axis direction.
view_up_manual
()Set the view's up direction to a manually specified axis.
cut_data
cut_data_complete
cut_data_process
get_axis
get_clim_method
get_normal
get_vlim_method
load_NXS
load_NXS_complete
load_NXS_process
redraw_data
redraw_data_complete
redraw_data_process
save_cut
save_slice
slice_data
slice_data_complete
slice_data_process
update_cut
update_cut_value
update_cvals
update_lims
update_slice
update_slice_value