pypeit.dashboard.view.status_view module
The Status (Initialization) view of the PypeIt Dashboard (Stage 2).
This is the landing, state-first view (design R3, R7–R13, R15–R18). It
renders a Stage 1 DashboardModel and stays
thin: all data comes from the model, all colors/glyphs from
pypeit.dashboard.palette. Top to bottom it shows a global summary
strip, a scope toolbar (calibration-group + detector drop-downs, a stale
badge, a Refresh button), a configuration-overview navigator grid, the scoped
calibration status table, and a (placeholder) Science-frames section.
Generated by JXP and Claude.
Bases:
QFrameOne clickable science-navigator cell for the Status view (Stage 6 Round-1 #1): a four-segment mini strip (
process/findobj/skysub/extract, each colored+glyphed by the palette) above a compact frame caption. Clicking it emitsclickedwith the(frame, det)so the window can switch to the Science tab.Generated by JXP and Claude.
- Parameters:
frame (
str) – The exposure basename.det – Detector (int) or mosaic (tuple/list).
det_name (
str) – Human detector name (e.g.DET01).objtype (
str) –'science'or'standard'.statuses (
dict) –{step: status}for the four macro-steps.theme (
str) –'light'or'dark'.parent (
QWidget, optional) – The parent widget.
Emitted as
clicked(frame, det)when the cell is clicked.
Emit
clickedwith(frame, det)on any mouse press.Generated by JXP and Claude.
- Parameters:
event (
QMouseEvent) – The mouse event.- Returns:
None.
- class pypeit.dashboard.view.status_view.StatusView(model, activity=None, parent=None)[source]
Bases:
QWidgetThe Status tab: the state-first overview of a reduction (Stage 2).
Generated by JXP and Claude.
- Parameters:
model (
DashboardModel) – The reduction-state model to render.parent (
QWidget, optional) – The parent widget.
- _build()[source]
Build the view for the current model (edge message or full view).
Generated by JXP and Claude.
- Returns:
None.
- _build_edge_message()[source]
Render a clear, centered message for an empty/edge state (R11).
Generated by JXP and Claude.
- Returns:
None.
Build the configuration-overview navigator grid (R17): one cell per
(group, detector), colored by the worst step status, clickable to scope.Generated by JXP and Claude.
- Returns:
None.
Build the science navigator grid (Round-1 #1, S6-Q13): a wrapped grid of
ScienceNavCell, science frames first then standards, in a capped scroll area so many frames stay compact.Generated by JXP and Claude.
- Parameters:
sci (
pandas.DataFrame) – The science table (science_table()).- Returns:
None.
- _build_science_placeholder()[source]
Build the Science-frames section of the Status view: a one-line count plus a science navigator grid mirroring the calibration navigator (Round-1 #1, S6-Q13) — one clickable four-segment cell per
(frame, det), science first then standards, scrollable.Generated by JXP and Claude.
- Returns:
None.
- _build_scope_toolbar()[source]
Build the scope toolbar: group + detector drop-downs (R16), a stale badge (R13), and a Refresh button (R12).
Generated by JXP and Claude.
- Returns:
None.
- _build_summary()[source]
Build the always-visible global summary strip (R7).
Generated by JXP and Claude.
- Returns:
None.
- _build_table_section()[source]
Build the scoped calibration status table (R3, R8, R9, R10).
Generated by JXP and Claude.
- Returns:
None.
- _cell_category(group, det)[source]
The worst palette category among a cell’s steps (R17).
Generated by JXP and Claude.
- _detect_theme()[source]
Detect light vs dark from the widget’s palette (so the palette’s dark color set is used under a dark Qt theme).
Generated by JXP and Claude.
- Returns:
'dark'or'light'.- Return type:
Build one clickable, status-colored navigator cell (R17).
Generated by JXP and Claude.
- Parameters:
group (
int) – Calibration group ID.det – Detector (int) or mosaic (tuple).
- Returns:
The cell button.
- Return type:
QPushButton
- _on_det_changed(_index)[source]
Handle a detector change: re-render the table.
Generated by JXP and Claude.
- Parameters:
_index (
int) – The new combo index (unused).- Returns:
None.
- _on_group_changed(_index)[source]
Handle a calibration-group change: reload detectors, re-render.
Generated by JXP and Claude.
- Parameters:
_index (
int) – The new combo index (unused).- Returns:
None.
- _on_refresh()[source]
Re-acquire the state via a fresh model and re-render (R12).
Generated by JXP and Claude.
- Returns:
None.
- _reload_det_combo(select=None)[source]
Repopulate the detector drop-down for the current group.
Generated by JXP and Claude.
- Parameters:
select – Detector to select after repopulating, if present.
- Returns:
None.
- _render_table()[source]
Render the scoped status table from the current drop-down selection.
Generated by JXP and Claude.
- Returns:
None.
- _scoped_table(group, det)[source]
Return the status table restricted to one
(group, det), ordered by the path-aware step order.Generated by JXP and Claude.
- Parameters:
group (
int) – Calibration group ID.det – Detector (int) or mosaic (tuple).
- Returns:
The scoped, step-ordered rows.
- Return type:
pandas.DataFrame
- _set_scope(pair)[source]
Set the scoped
(group, det), syncing the drop-downs and table.Generated by JXP and Claude.
- Parameters:
pair (
tuple) – The(group, det)to scope to.- Returns:
None.
- _set_table_row(r, row)[source]
Populate one table row (Step | Required | Status | Output) with the palette color + glyph (R9, R10).
Generated by JXP and Claude.
- Parameters:
r (
int) – The row index.row – A namedtuple row from the scoped status table.
- Returns:
None.
- scienceFrameActivated
Emitted as
scienceFrameActivated(frame, det)when the user clicks a science-navigator cell (Round-1 #1); the window switches to the Science tab and selects that frame.
- set_model(model)[source]
Swap in a new model and re-render (used by Refresh).
Generated by JXP and Claude.
- Parameters:
model (
DashboardModel) – The new model.- Returns:
None.