Hi all,
I am pleased to announce the release of Weighted Batch Preprocessing version 2.9.0 which introduces a highly requested feature: the Frame Selection Step. This new capability allows you to analyze, visualize, and select the best frames before integration using objective metrics such as FWHM, eccentricity, PSF Signal Weight, and more, with the ability to define custom formulas for personalized selection criteria.
Table of Contents
1. The New Frame Selection Step
Activation and Basic Configuration
The Frame Selection feature is accessible from the LIGHTS page in the WBPP interface.
To enable it:
Interactive Mode
When Interactive mode is enabled:
When Interactive mode is disabled:
2. The Frame Selection Dialog
The Frame Selection dialog is organized into two main sections:
Layout Overview
3. The Groups Table
The Groups table displays all available light frame groups, organized by filter, exposure, or other grouping criteria.
Group: Group identifier (filter name, exposure, etc.)
Frames: Total number of frames in the group
Rejected: Number of frames rejected by filters
Disabled: Number of manually disabled frames
Selecting a group loads its frames into the Frames table and updates all charts accordingly. Each group maintains its own independent filter configuration.
4. The Frames Table
The Frames table shows all frames in the currently selected group with their measured metrics.
#: Sequential frame number
Status: Visual icon indicating state (accepted/rejected/disabled)
File name: Frame filename (tooltip shows full path)
FWHM: Full Width at Half Maximum in pixels
Eccentricity: Star shape metric (0 = perfectly round)
PSFSW: PSF Signal Weight (normalized 0-1 per group)
Median: Median pixel value
Stars: Number of detected stars
Custom: Result of custom formula (if defined)
Visual Styling
5. Metric Charts
The lower section displays six interactive charts, one for each filter metric.
Chart Elements
Each chart displays:
6. Available Metrics
WBPP 2.9.0 provides six metrics for frame evaluation:
Note: SNR (Signal-to-Noise Ratio) is computed during measurements and is available for use in custom formulas only. It cannot be used as a standalone filter criterion.
7. The Filter System
Each group maintains its own independent filter configuration. When you select a group in the Groups table, the filter panel displays and edits the rejection criteria for that specific group. This allows you to apply different quality thresholds to different filters or imaging conditions—for example, stricter FWHM limits for luminance data versus narrowband channels.
Configuring a Filter
Each metric filter includes:
Rejection Logic
Import a value from the Selected Frame
A powerful workflow feature: Select a frame of acceptable quality in the table, then click the Import button on any filter. The selected frame's value for that metric becomes the new threshold.
This allows you to use a "reference frame" approach: find a frame that represents your minimum acceptable quality, then import its values as thresholds.
8. Custom Formulas
Custom formulas allow you to create composite metrics by combining multiple measurements.
Available Variables
All variable names are **case-insensitive**:
9. Image Preview
Double-clicking any frame in the table opens the Image Preview dialog for visual inspection.
Features
10. Pipeline Integration
Frame Selection integrates into the WBPP pipeline after measurements:
**Important**: Measurements must be enabled for Frame Selection to work. The script automatically enables measurements when Frame Selection is activated.
11. Logging and Diagnostics
Frame Selection produces detailed console output:
The Process Logger also records:
12. Other Improvements and Bug Fixes
Automation Mode Enhancements
13. Conclusions
The Frame Selection Step represents a significant advancement for WBPP: for users who previously relied on SubframeSelector or external scripts for frame selection, this integrated feature significantly simplifies the workflow while maintaining a similar level of control. Everything is now contained within a single, cohesive interface that fits naturally into the WBPP pipeline.
I am pleased to announce the release of Weighted Batch Preprocessing version 2.9.0 which introduces a highly requested feature: the Frame Selection Step. This new capability allows you to analyze, visualize, and select the best frames before integration using objective metrics such as FWHM, eccentricity, PSF Signal Weight, and more, with the ability to define custom formulas for personalized selection criteria.
Table of Contents
- The New Frame Selection Step
- The Frame Selection Dialog
- The Groups Table
- The Frames Table
- Metric Charts
- The 6 Filter Metrics
- The Filter System
- Custom Formulas
- Image Preview
- Pipeline Integration
- Logging and Diagnostics
- Other Improvements and Bug Fixes
- Conclusions
1. The New Frame Selection Step
Activation and Basic Configuration
The Frame Selection feature is accessible from the LIGHTS page in the WBPP interface.
To enable it:
- Check the Frame Selection checkbox
- Choose the operating mode with the Interactive checkbox
- Click Settings to configure default rejection criteria
Interactive Mode
When Interactive mode is enabled:
- A dedicated dialog opens after the measurement phase
- All frames are displayed with their measured metrics
- You can adjust thresholds in real-time and see immediate results
- Built-in image preview for visual inspection
- Manual frame disabling for edge cases
When Interactive mode is disabled:
- The script automatically applies the criteria configured in Settings
- No user interaction required
- Perfect for automated pipelines or overnight batch processing
- Uses the default filter configuration you've previously set up
2. The Frame Selection Dialog
The Frame Selection dialog is organized into two main sections:
Layout Overview
- Upper section (~45% height): Groups/frames tables on the left, filter panel on the right
- Lower section (~55% height): 2×3 grid of metric charts
3. The Groups Table
The Groups table displays all available light frame groups, organized by filter, exposure, or other grouping criteria.
Group: Group identifier (filter name, exposure, etc.)
Frames: Total number of frames in the group
Rejected: Number of frames rejected by filters
Disabled: Number of manually disabled frames
Selecting a group loads its frames into the Frames table and updates all charts accordingly. Each group maintains its own independent filter configuration.
4. The Frames Table
The Frames table shows all frames in the currently selected group with their measured metrics.
#: Sequential frame number
Status: Visual icon indicating state (accepted/rejected/disabled)
File name: Frame filename (tooltip shows full path)
FWHM: Full Width at Half Maximum in pixels
Eccentricity: Star shape metric (0 = perfectly round)
PSFSW: PSF Signal Weight (normalized 0-1 per group)
Median: Median pixel value
Stars: Number of detected stars
Custom: Result of custom formula (if defined)
Visual Styling
- Rejected frames: Red text color
- Disabled frames: Gray italic text
- Sort indicator: ▼ symbol on the sorted column header
5. Metric Charts
The lower section displays six interactive charts, one for each filter metric.
Chart Elements
Each chart displays:
- Vertical bars: One bar per frame
- Blue: Accepted frame
- Red: Rejected frame
- Orange highlight: Currently selected frame
- Threshold line (dashed orange): Filter threshold with shaded rejection zone
- Mean line (green): Average value of accepted frames only
- Click on bar: Selects the corresponding frame in the table
- Sort button: Sorts all frames by this metric
6. Available Metrics
WBPP 2.9.0 provides six metrics for frame evaluation:
| Metric | Description |
|---|---|
| FWHM | Full Width at Half Maximum |
| Eccentricity | Star elongation |
| PSF Signal Weight | PSF signal metric (normalized 0-1 per group) |
| Median | Median pixel value |
| Stars | Number of detected stars |
| Custom | User-defined formula |
Note: SNR (Signal-to-Noise Ratio) is computed during measurements and is available for use in custom formulas only. It cannot be used as a standalone filter criterion.
7. The Filter System
Each group maintains its own independent filter configuration. When you select a group in the Groups table, the filter panel displays and edits the rejection criteria for that specific group. This allows you to apply different quality thresholds to different filters or imaging conditions—for example, stricter FWHM limits for luminance data versus narrowband channels.
Configuring a Filter
Each metric filter includes:
- Enable checkbox: Activates/deactivates the filter
- Comparison mode: `<` (less than) or `>` (greater than)
- Threshold value: Numeric cutoff value
- Import button: Copies the value from the selected frame
Rejection Logic
- < mode: Frame is REJECTED if value >= threshold
- > mode: Frame is REJECTED if value <= threshold
Import a value from the Selected Frame
A powerful workflow feature: Select a frame of acceptable quality in the table, then click the Import button on any filter. The selected frame's value for that metric becomes the new threshold.
This allows you to use a "reference frame" approach: find a frame that represents your minimum acceptable quality, then import its values as thresholds.
8. Custom Formulas
Custom formulas allow you to create composite metrics by combining multiple measurements.
Available Variables
All variable names are **case-insensitive**:
- `FWHM` - Full Width at Half Maximum
- `Eccentricity` - Star elongation
- `SNR` - Signal-to-Noise Ratio
- `PSFSignalWeight` - PSF signal weight estimator of image quality
- `Median` - Median pixel value
- `Stars` - Number of detected stars
- Arithmetic: `+ - * / %`
- Powers: `Math.pow(x, n)`, `Math.sqrt(x)`
- Logarithms: `Math.log(x)`, `Math.log10(x)`
- Trigonometry: `Math.sin(x)`, `Math.cos(x)`, etc.
- Min/Max**: `Math.min(a, b)`, `Math.max(a, b)`
- Formulas are validated automatically as you type
- Visual feedback: ✓ green indicator (valid) or ✗ red indicator (invalid)
- If invalid, the Custom chart displays a placeholder message
Example of wrong syntax in the formula | Example of correct syntax in the formula |
9. Image Preview
Double-clicking any frame in the table opens the Image Preview dialog for visual inspection.
Features
- Zoom In/Out: Increase/decrease magnification
- Zoom 1:1: Pixel-perfect view
- Fit to Window: Scale image to fit viewport
- STF Toggle: Switch between stretched and linear view
- Reset: Return to STF + fit to window
- Mouse drag: Pan across large images
- Scroll wheel: Zoom centered on cursor position
- Cursor feedback: Open/closed hand indicates pan mode
10. Pipeline Integration
Frame Selection integrates into the WBPP pipeline after measurements:
11. Logging and Diagnostics
Frame Selection produces detailed console output:
Code:
═══════════════════════════════════════════════════════════
* Interactive frame selection
═══════════════════════════════════════════════════════════
Processing group: L (45 frames)
Rejected: M31_L_001.xisf
Rejected: M31_L_023.xisf
Processing group: R (42 frames)
Rejected: M31_R_012.xisf
Processing group: G (42 frames)
Processing group: B (41 frames)
* End of frame selection
Total frames: 170
Rejected: 3
═══════════════════════════════════════════════════════════
The Process Logger also records:
- Total frames processed per group
- Individual rejected frame names
- Success/warning messages
- Final rejection statistics
12. Other Improvements and Bug Fixes
Automation Mode Enhancements
- Automation Help Shortcut: Press Ctrl+A to display comprehensive automation help directly within the WBPP interface, making it easier to discover and use automation parameters
- Label adjustments throughout the interface for improved clarity and consistency
- Custom filter name propagation**: Fixed propagation of custom filter names to generated master files
13. Conclusions
The Frame Selection Step represents a significant advancement for WBPP: for users who previously relied on SubframeSelector or external scripts for frame selection, this integrated feature significantly simplifies the workflow while maintaining a similar level of control. Everything is now contained within a single, cohesive interface that fits naturally into the WBPP pipeline.