StellarPix
← Back to Learn
ProcessingPublic tutorial · No membership required10 min read

Remove Residual Hot and Cold Pixels with CosmeticCorrection

Inspect calibrated exposures for remaining pixel defects, tune a conservative CosmeticCorrection trial, and protect real stars. Learn the monochrome and CFA paths and how a saved process instance fits into WBPP.

Sources reviewed October 25, 2026

A targeted cleanup after calibration

Darks and other calibration frames correct repeatable sensor effects, but a calibrated exposure can still contain unusually bright or dark defective pixels. CosmeticCorrection replaces identified defects using neighboring information. It is a targeted repair, not a general noise-reduction tool.

For this exercise, inspect individual calibrated light exposures before registration and stacking. For a color camera, work before debayering and enable CFA handling; for monochrome data, keep CFA off. The linear pixels remain unstretched even when STF makes them visible.

Skip the operation if inspection shows no useful cleanup is needed. Aggressive detection can damage small stars or compact subject detail. Do not try to remove every bright point or make the image look smooth at extreme magnification.

1. Inspect the right processing stage

Keep raw lights and calibration files untouched. From a preliminary calibration run, choose representative calibrated lights, including a typical frame and one with suspected residual defects. Do not use an integrated master or a debayered RGB image as the template for this pre-debayer exercise.

Use STF and inspect at 1:1, then zoom further to investigate individual pixels. Compare several exposures in their sensor coordinates. A defect that stays at one detector position while a dithered star field moves is a useful clue; without dithering, position alone may not distinguish it from a star.

Check actual pixel values and nearby profiles. A lone outlier can be a defect, but an undersampled star can also occupy very few pixels. Inspect faint stars, crowded regions, and compact nebular knots before deciding a detection setting is safe.

If large areas, amp glow, rings, or extensive clipping remain, review calibration first. CosmeticCorrection is not a substitute for matching darks, suitable flats, or sound acquisition.

2. Choose the input and detection method

Find CosmeticCorrection through All Processes and reset a reused instance. The tool supports several defect-identification approaches; use one clear baseline rather than enabling every method.

The exercise below uses Auto detect. Leave master-dark detection and manual defect lists disabled initially. Inspect the installed help before adopting those methods, especially for bad rows or columns. A verified map is different from guessing coordinates in an already registered image.

ChoicePurposeBeginner check
CFA enabledBayer-aware processing of calibrated, still-mosaiced color-camera lightsA grayscale-looking sensor mosaic can still be color-camera data
CFA disabledMonochrome input for this workflowDo not enable CFA merely because channels will later form a color image
Auto detectionIdentify local hot/cold outliers with adjustable thresholdsTest real stars and defects together
Master-dark or defect-list methodsIdentify known detector defectsRequire a suitable detector map or verified coordinates; not an extra dark subtraction

3. Tune a conservative preview

Use a representative calibrated light as the preview source and keep a duplicate for before/after checks. Interface labels and preview controls can vary; consult the installed process help.

  1. Set CFA to match the actual input state. Enable Auto detect and hot-pixel detection for the first trial, leaving cold-pixel detection off until it has been tested separately.
  2. Open the real-time preview on a representative region containing suspected defects and real stars. Start with the installed baseline threshold and inspect the effect. Do not copy a universal sigma value from another camera.
  3. Adjust the hot-pixel sigma threshold gradually. Lower thresholds generally flag more candidates. Stop before small stars, star cores, or compact subject features begin to change. Use available detection displays and counts as diagnostic clues, not a target percentage to maximize.
  4. If cold defects remain, enable and tune cold-pixel detection separately while holding the hot settings fixed. Inspect dark structure and local shadows so real features are not mistaken for defects.
  5. Review several regions and more than one exposure. Keep the least aggressive settings that address the visible defects. Reject the trial if cleanup depends on removing valid sky features.

4. Check one written output

Add one calibrated light to the process’s target-file list, choose a separate output directory and clear postfix, and keep overwriting disabled. Execute the batch with Apply Global and inspect the reported output. Do not confuse a favorable preview with a verified saved file.

Compare input and output at matched STF and zoom. Confirm that identified defects improve while faint stars, profiles, and target details remain intact. Check the entire frame, not just the region used to tune the thresholds.

For CFA input, judge the mosaic-stage cleanup first. A small downstream debayer test can reveal whether color speckles improve without creating new artifacts. Do not permanently stretch the trial merely to make the corrected file look finished.

Save a process instance using the New Instance triangle once the test is convincing. Name it clearly, such as CC_camera_mode_tested, and record camera configuration, CFA state, detection methods, and thresholds. Test a different detector or readout mode separately.

5. Use the tested setup in WBPP

For a full raw-data WBPP run, use WBPP’s CosmeticCorrection configuration to enable the step and select the saved process instance as its template where supported. Follow the current tooltips for template selection and per-group application; older screenshots may put this panel elsewhere.

The intended order is calibration → CosmeticCorrection → debayer for CFA data → registration → integration. For monochrome data, omit debayer. WBPP receives the original raw lights and performs these configured stages; do not feed the manually corrected test output into that raw-calibration recipe.

Run a small representative pilot and inspect the log and intermediate outputs to confirm the intended correction was used on the appropriate groups. A saved instance existing in the workspace does not prove WBPP selected it.

Choose either the WBPP-managed path or a deliberately configured manual continuation from corrected calibrated lights. Do not automatically apply both. Never overwrite the raw sources to avoid thinking about which stage a file belongs to.

Troubleshooting and completion checks

Real stars become smaller or disappear: return to the calibrated baseline, raise detection thresholds or disable the responsible method, and inspect undersampled profiles. A higher correction count is not evidence of success.

Color speckles persist: verify that the input was calibrated, still CFA when corrected, and processed with appropriate CFA handling. Review debayer settings and calibration too; not every colored feature is a hot pixel.

Cold holes or clusters remain: inspect the detector evidence and calibration history before increasing strength. Larger defects may need a verified defect list or separate investigation rather than an aggressive global auto-detection setting.

The stack still contains streaks: examine calibrated and registered individual lights, dithering, and integration rejection. CosmeticCorrection is not a satellite-trail or general registration-repair process.

WBPP results differ from the preview: check template selection, applicable groups, camera configuration, input stage, and log. Recheck several exposures instead of assuming one region represents the full dataset.

Keep originals, the calibrated test input, corrected trial, saved instance, and comparison notes. Confirm the full run used the intended settings, then continue to registration and integration. This is an original practice sequence; linked worked examples use older interfaces, and installed documentation governs current controls.