Skip to content

subtract_dark_easyspec

Subtract a master dark from a science frame via cleaning.sub_dark.

Category Preprocessing (2-D image)
Backend easyspec - wraps the EasySpec reduction library (optional extra reduction)
Version 1.0.1
Reads -
Writes image

Parameters

Parameter Default Required Description
target_path None - Debiased science FITS; falls back to ctx.image.
master_dark_path None - Master-dark FITS; falls back to ctx.extras['master_dark'].
pad_with_zeros True - Clip negative pixels to zero after subtraction.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("subtract_dark_easyspec", ctx, {
    "target_path": None,
    "master_dark_path": None,
    "pad_with_zeros": True
})
spectro run subtract_dark_easyspec --input spectrum.fits \
  --param target_path=none \
  --param master_dark_path=none \
  --param pad_with_zeros=true
{
  "tool": "subtract_dark_easyspec",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "target_path": null,
      "master_dark_path": null,
      "pad_with_zeros": true
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • easyspec.cleaning.cleaning.sub_dark.