Skip to content

flat_combine_easyspec

Combine flat frames into a master flat via easyspec.cleaning.master.

Category Master frames
Backend easyspec - wraps the EasySpec reduction library (optional extra reduction)
Version 1.0.1
Reads -
Writes extras.master_flat

Parameters

Parameter Default Required Description
flat_dir None - Directory containing the flat FITS files.
flat_paths None - List of flat FITS file paths.
method 'median' - Stacking method: median, mean, or mode.
header_hdu_entry 0 - HDU extension where the FITS header lives.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("flat_combine_easyspec", ctx, {
    "flat_dir": None,
    "flat_paths": None,
    "method": "median",
    "header_hdu_entry": 0
})
spectro run flat_combine_easyspec --input spectrum.fits \
  --param flat_dir=none \
  --param flat_paths=none \
  --param method=median \
  --param header_hdu_entry=0
{
  "tool": "flat_combine_easyspec",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "flat_dir": null,
      "flat_paths": null,
      "method": "median",
      "header_hdu_entry": 0
    }
  }
}

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

References

  • easyspec — Lobão et al. (https://pypi.org/project/easyspec/).
  • easyspec.cleaning.cleaning.master.
  • bias_combine - Combine a stack of bias frames into one master bias.
  • bias_combine_easyspec - Combine bias frames into a master bias via easyspec.cleaning.master.
  • dark_combine - Combine a stack of dark frames into a master dark.
  • dark_combine_easyspec - Combine dark frames into a master dark via easyspec.cleaning.master.
  • flat_combine - Combine a stack of flat frames into a master flat (raw, not normalised).