Skip to content

flat_normalize_easyspec

Flat-field correct a science frame via cleaning.flatten.

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 - Science FITS to flat-field; falls back to ctx.image.
master_flat_path None - Master-flat FITS; falls back to ctx.extras['master_flat'].
auto_normalise True - If true, divide the master flat by its median first.

Use it

from spectro_kernel import run_algorithm

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

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

References

  • easyspec.cleaning.cleaning.flatten.