cosedaUI.mainwindow_sections package¶
Submodules¶
cosedaUI.mainwindow_sections.cluster module¶
cosedaUI.mainwindow_sections.imports module¶
cosedaUI.mainwindow_sections.indexing module¶
- class cosedaUI.mainwindow_sections.indexing.IndexingMixin[source]¶
Bases:
object- on_indexing_run_stream_changed(stream_path)[source]¶
Called by the Index & Integrate window whenever the selected run changes. Updates the available stream path and resets cached overlays.
- Parameters:
stream_path (str | None)
- on_toggle_indexing_results(checked)[source]¶
Handle enabling/disabling the indexing overlay.
- Parameters:
checked (bool)
cosedaUI.mainwindow_sections.viewer module¶
- class cosedaUI.mainwindow_sections.viewer.ViewerMixin[source]¶
Bases:
object- change_frame(value)[source]¶
Slot to handle changes in the frame_slider’s value.
- Parameters:
value (int) – The new value from the slider representing the frame index.
- ensure_atlas_for_current_file()[source]¶
Create the default saved atlas when all inputs exist and no atlas is saved.
- resizeEvent(event)[source]¶
On window resize, immediately refresh the image to fit the new width and adjust the container height to maintain the original aspect ratio.
- set_vdf_overlay(center, width, enabled=True)[source]¶
Set the virtual dark-field overlay shown on the main diffraction preview.
- update_map_thumbnail()[source]¶
Show a saved atlas (entry/atlas/<zdim>) as a thumbnail in the Map preview box.
Renders with the current colormap and fits it within the workflow column so it never widens that column. Keeps the Atlas group available when the file has enough data to open the atlas viewer, even before a saved atlas exists.
cosedaUI.mainwindow_sections.workflow module¶
- class cosedaUI.mainwindow_sections.workflow.WorkflowMixin[source]¶
Bases:
object- open_export_window()[source]¶
Open the Export window which lists available CrystFEL HKL files and converts them to SHELX HKLF4, and can also write RES/P4P from CrystFEL cell files.
cosedaUI.mainwindow_sections.workspace module¶
- class cosedaUI.mainwindow_sections.workspace.WorkspaceMixin[source]¶
Bases:
object- add_generated_ini_paths(paths, show_warnings=True)¶
Add importer-generated INI files to the workspace.
Returns a dict with added/skipped/invalid path lists so import dialogs can report concise status without duplicating workspace mutation logic.
- add_ini_files()¶
Open a dialog to add INI files to the workspace list.
- add_ini_paths(paths)¶
Add provided INI file paths to the workspace list (no file dialog).
- apply_peakfinder_settings(settings)[source]¶
Slot function to apply peak finder settings emitted from PeakFinderSettingsWindow.
- calculate_radial_profiles()[source]¶
Compute radial intensity profiles for this file or all workspace files.
- ensure_index_dataset(hdf5_path)[source]¶
Ensure that an ‘index’ dataset exists in the ‘entry/data’ group. If not, and if the length of the ‘images’ dataset matches one of the stage position datasets, create the ‘index’ dataset as a sequence [0, 1, …, num_frames-1].
- Parameters:
hdf5_path (str) – The path to the HDF5 file.
- load_last_directory()¶
Restore last directory and last workspace (file or INI list) from config.
- load_last_workspace_state()¶
Restore workspace state from configuration (named file or INI list).
- new_workspace()¶
Clear the current workspace list and reset state.
- on_indexintegrate_requested_select_ini(ini_path)[source]¶
Slot: the Index & Integrate window asked us to select a given INI path. We set the QListWidget selection accordingly; this triggers on_ini_select().
- Parameters:
ini_path (str)
- open_workspace()¶
Load a saved workspace file (.cosedawsp) and populate the INI list.
- reload_current_file()[source]¶
Reload the currently loaded INI/HDF5 while keeping the current frame.
- remove_ini_files()¶
Remove selected INI files from the workspace list.
- save_workspace()¶
Save the current workspace INI paths to a .cosedawsp file.
- save_workspace_state()¶
Save workspace paths (or workspace file) to the config file.
Module contents¶
Mixins that split the main window logic into smaller sections.
- class cosedaUI.mainwindow_sections.ClusterMixin[source]¶
Bases:
object
- class cosedaUI.mainwindow_sections.IndexingMixin[source]¶
Bases:
object- on_indexing_run_stream_changed(stream_path)[source]¶
Called by the Index & Integrate window whenever the selected run changes. Updates the available stream path and resets cached overlays.
- Parameters:
stream_path (str | None)
- on_toggle_indexing_results(checked)[source]¶
Handle enabling/disabling the indexing overlay.
- Parameters:
checked (bool)
- class cosedaUI.mainwindow_sections.ViewerMixin[source]¶
Bases:
object- change_frame(value)[source]¶
Slot to handle changes in the frame_slider’s value.
- Parameters:
value (int) – The new value from the slider representing the frame index.
- ensure_atlas_for_current_file()[source]¶
Create the default saved atlas when all inputs exist and no atlas is saved.
- resizeEvent(event)[source]¶
On window resize, immediately refresh the image to fit the new width and adjust the container height to maintain the original aspect ratio.
- set_vdf_overlay(center, width, enabled=True)[source]¶
Set the virtual dark-field overlay shown on the main diffraction preview.
- update_map_thumbnail()[source]¶
Show a saved atlas (entry/atlas/<zdim>) as a thumbnail in the Map preview box.
Renders with the current colormap and fits it within the workflow column so it never widens that column. Keeps the Atlas group available when the file has enough data to open the atlas viewer, even before a saved atlas exists.
- class cosedaUI.mainwindow_sections.WorkflowMixin[source]¶
Bases:
object- open_export_window()[source]¶
Open the Export window which lists available CrystFEL HKL files and converts them to SHELX HKLF4, and can also write RES/P4P from CrystFEL cell files.
- class cosedaUI.mainwindow_sections.WorkspaceMixin[source]¶
Bases:
object- add_generated_ini_paths(paths, show_warnings=True)¶
Add importer-generated INI files to the workspace.
Returns a dict with added/skipped/invalid path lists so import dialogs can report concise status without duplicating workspace mutation logic.
- add_ini_files()¶
Open a dialog to add INI files to the workspace list.
- add_ini_paths(paths)¶
Add provided INI file paths to the workspace list (no file dialog).
- apply_peakfinder_settings(settings)[source]¶
Slot function to apply peak finder settings emitted from PeakFinderSettingsWindow.
- calculate_radial_profiles()[source]¶
Compute radial intensity profiles for this file or all workspace files.
- ensure_index_dataset(hdf5_path)[source]¶
Ensure that an ‘index’ dataset exists in the ‘entry/data’ group. If not, and if the length of the ‘images’ dataset matches one of the stage position datasets, create the ‘index’ dataset as a sequence [0, 1, …, num_frames-1].
- Parameters:
hdf5_path (str) – The path to the HDF5 file.
- load_last_directory()¶
Restore last directory and last workspace (file or INI list) from config.
- load_last_workspace_state()¶
Restore workspace state from configuration (named file or INI list).
- new_workspace()¶
Clear the current workspace list and reset state.
- on_indexintegrate_requested_select_ini(ini_path)[source]¶
Slot: the Index & Integrate window asked us to select a given INI path. We set the QListWidget selection accordingly; this triggers on_ini_select().
- Parameters:
ini_path (str)
- open_workspace()¶
Load a saved workspace file (.cosedawsp) and populate the INI list.
- reload_current_file()[source]¶
Reload the currently loaded INI/HDF5 while keeping the current frame.
- remove_ini_files()¶
Remove selected INI files from the workspace list.
- save_workspace()¶
Save the current workspace INI paths to a .cosedawsp file.
- save_workspace_state()¶
Save workspace paths (or workspace file) to the config file.