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

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.

change_lattice()[source]#

Enable or disable reciprocal lattice display in the view.

save_screenshot()[source]#

Save a screenshot of the current view to a file.

update_complete(status='Complete!')[source]#

Indicate completion to the user and reset progress.

Parameters:
statusstr, optional

Completion message (default is “Complete!”).

update_invalid()[source]#

Indicate invalid parameters to the user and reset progress.

update_oriented_lattice()[source]#

Update the oriented lattice parameter display in the view.

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.

update_status(status)[source]#

Update status information in the view.

Parameters:
statusstr

Status message to display.

view_ab()[source]#

Set the view to the c* direction (real lattice).

view_ab_star()[source]#

Set the view to the c-axis direction (reciprocal lattice).

view_bc()[source]#

Set the view to the a* direction (real lattice).

view_bc_star()[source]#

Set the view to the a-axis direction (reciprocal lattice).

view_ca()[source]#

Set the view to the b* direction (real lattice).

view_ca_star()[source]#

Set the view to the b-axis direction (reciprocal lattice).

view_manual()[source]#

Set the view to a manually specified axis direction.

view_up_manual()[source]#

Set the view’s up direction to a manually specified axis.

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

calculate_F2()[source]#
calculate_F2_complete(result)[source]#
calculate_F2_process(progress)[source]#
calculate_hkl()[source]#
calculate_hkl_complete(result)[source]#
calculate_hkl_process(progress)[source]#
generate_groups()[source]#
generate_settings()[source]#
highlight_row()[source]#
load_CIF()[source]#
save_INS()[source]#
select_isotope()[source]#
set_atom_table()[source]#
update_atoms()[source]#
update_parameters()[source]#
update_selection(data)[source]#
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

add_orientation()[source]#
add_orientation_complete(result)[source]#
add_orientation_process(progress)[source]#
add_settings()[source]#
add_settings_complete(result)[source]#
add_settings_process(progress)[source]#
calculate_double()[source]#
calculate_double_complete(result)[source]#
calculate_double_process(progress)[source]#
calculate_single()[source]#
calculate_single_alt()[source]#
calculate_single_complete(result)[source]#
calculate_single_hkl()[source]#
calculate_single_process(progress)[source]#
create_instrument()[source]#
delete_angles()[source]#
delete_angles_complete(rows)[source]#
delete_angles_process(progress)[source]#
load_UB()[source]#
load_detector()[source]#
load_experiment()[source]#
load_goniometer()[source]#
load_mask()[source]#
lookup_angle()[source]#
mesh_scan()[source]#
mesh_scan_complete(result)[source]#
mesh_scan_process(progress)[source]#
optimize_coverage()[source]#
optimize_coverage_complete(result)[source]#
optimize_coverage_process(progress)[source]#
save_CSV()[source]#
save_experiment()[source]#
switch_centering()[source]#
switch_crystal()[source]#
switch_group()[source]#
switch_instrument()[source]#
update_goniometer()[source]#
update_peaks()[source]#
update_plan()[source]#
update_wavelength()[source]#
visualize()[source]#
class Atom(view, model)[source]#

Bases: object

Methods

set_info

set_isotope

set_info()[source]#
set_isotope()[source]#
class PeriodicTable(view, model)[source]#

Bases: object

Methods

connect_atom_model_view

show_atom_dialog

update_selection

connect_atom_model_view(atom)[source]#
show_atom_dialog(atom)[source]#
update_selection(data)[source]#
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

add_sample()[source]#
highlight_row()[source]#
load_UB()[source]#
set_goniometer_table()[source]#
update_parameters()[source]#
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

add_peak()[source]#
calculate_hkl()[source]#
calculate_peaks()[source]#
cluster()[source]#
cluster_complete(result)[source]#
cluster_process(progress)[source]#
convert_Q()[source]#
convert_Q_complete(result)[source]#
convert_Q_process(progress)[source]#
convert_to_hkl()[source]#
convert_to_hkl_complete(result)[source]#
convert_to_hkl_process(progress)[source]#
filter_peaks()[source]#
filter_peaks_complete(result)[source]#
filter_peaks_process(progress)[source]#
find_conventional()[source]#
find_conventional_complete(result)[source]#
find_conventional_process(progress)[source]#
find_niggli()[source]#
find_niggli_complete(result)[source]#
find_niggli_process(progress)[source]#
find_peaks()[source]#
find_peaks_complete(result)[source]#
find_peaks_process(progress)[source]#
get_clim_method()[source]#
get_modulation_info()[source]#
get_normal()[source]#
hand_index_fractional()[source]#
hand_index_integer()[source]#
highlight_cell()[source]#
highlight_peak()[source]#
index_peaks()[source]#
index_peaks_complete(result)[source]#
index_peaks_process(progress)[source]#
integrate_peaks()[source]#
integrate_peaks_complete(result)[source]#
integrate_peaks_process(progress)[source]#
lattice_transform()[source]#
load_Q()[source]#
load_UB()[source]#
load_detector_calibration()[source]#
load_goniometer_calibration()[source]#
load_peaks()[source]#
load_tube_calibration()[source]#
predict_peaks()[source]#
predict_peaks_complete(result)[source]#
predict_peaks_process(progress)[source]#
refine_UB()[source]#
refine_UB_complete(result)[source]#
refine_UB_process(progress)[source]#
reslice()[source]#
save_Q()[source]#
save_UB()[source]#
save_peaks()[source]#
select_cell()[source]#
select_cell_complete(result)[source]#
select_cell_process(progress)[source]#
set_UB()[source]#
show_cells()[source]#
show_cells_complete(result)[source]#
show_cells_process(progress)[source]#
switch_instrument()[source]#
symmetry_transform()[source]#
transform_UB()[source]#
transform_UB_complete(result)[source]#
transform_UB_process(progress)[source]#
update_check_hkl()[source]#
update_find_distance()[source]#
update_find_spacing()[source]#
update_instrument_view()[source]#
update_instrument_view_complete(result)[source]#
update_instrument_view_process(progress)[source]#
update_lattice_info()[source]#
update_roi()[source]#
update_scan()[source]#
update_wavelength()[source]#
visualize()[source]#
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

cut_data()[source]#
cut_data_complete(result)[source]#
cut_data_process(progress)[source]#
get_axis()[source]#
get_clim_method()[source]#
get_normal()[source]#
get_vlim_method()[source]#
load_NXS()[source]#
load_NXS_complete(result)[source]#
load_NXS_process(progress)[source]#
redraw_data()[source]#
redraw_data_complete(result)[source]#
redraw_data_process(progress)[source]#
save_cut()[source]#
save_slice()[source]#
slice_data()[source]#
slice_data_complete(result)[source]#
slice_data_process(progress)[source]#
update_cut()[source]#
update_cut_value()[source]#
update_cvals()[source]#
update_lims()[source]#
update_slice()[source]#
update_slice_value()[source]#