pypeit.dashboard.view.main_window module
The main window for the PypeIt Dashboard.
The window mirrors the setup_gui QMainWindow-based layout: a shared
header banner (R6) at the top and a tab bar with the Status and
Calibrations tabs below. It is driven by a
DashboardModel: the header is populated from
model.header_info and the Status tab (Stage 2) renders the model.
Generated by JXP and Claude.
- class pypeit.dashboard.view.main_window.DashboardMainWindow(model, parent=None)[source]
Bases:
QMainWindowThe PypeIt Dashboard main window.
Generated by JXP and Claude.
- Parameters:
model (
DashboardModel) – The reduction-state model; supplies the header metadata and drives the Status view.parent (
QWidget, optional) – The parent widget (normallyNonefor a top-level window).
- _on_lock_changed(locked)[source]
React to the run lock engaging/releasing (X1, R14): gate the (Re)Build control, show “Monitoring…” on the Build channel while active, and do a final refresh + idle when the run ends.
Generated by JXP and Claude.
- Parameters:
locked (
bool) – Whether a run is now active.- Returns:
None.
- _on_run_finished(code)[source]
Refresh once a (Re)Build run the Dashboard launched completes (C15).
A non-zero
codemeans the run failed (e.g. an error crashed the reduction): record it and flag the Build channel as failed so the user sees it, rather than the run silently returning to “Idle” (bug report 000). The on-disk state is re-read regardless, so the failed step now shows red (its status is persisted asfailby the pipeline).Generated by JXP and Claude.
- Parameters:
code (
int) – The run’s exit code (0 = success).- Returns:
None.
- _on_science_frame_activated(frame, det)[source]
Switch to the Science tab and select a frame (Round-1 #1), in response to a click on the Status-view science navigator.
Generated by JXP and Claude.
- Parameters:
frame (
str) – The exposure basename.det – Detector (int) or mosaic.
- Returns:
None.
- pypeit.dashboard.view.main_window._fallback_header_info(model)[source]
Build a minimal
HeaderInfowhen the model has none (e.g. the.pypeitfile was not found), so the banner still renders while the Status view shows the edge-state message (R11).Generated by JXP and Claude.
- Parameters:
model (
DashboardModel) – The model whose header metadata is missing.- Returns:
A placeholder header.
- Return type:
HeaderInfo