Skip to content

correct_tilt_affine

Re-align the slit with the detector columns by a vertical shear.

Category Preprocessing (2-D image)
Backend scipy - implemented here on top of scipy primitives
Version 1.0.0
Reads ctx.image (an ImageFrame)
Writes image

scipy.ndimage.affine_transform with shear matrix [[1, -tan θ], [0, 1]], order=1 bilinear, zero-fill outside. The offset re-centres the shear on the image so the centre column remains in place. Pair with correct_slant_affine and correct_smile_polynomial in a long-slit preset.

Parameters

Parameter Default Required Description
tilt_deg 0.0 - Tilt angle of the slit vs. detector columns (degrees).

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("correct_tilt_affine", ctx, {
    "tilt_deg": 0.0
})

The CLI loads a single 1-D spectrum with --input; this algorithm needs ctx.image (an ImageFrame). Run it from Python or as a step of a pipeline preset.

{
  "tool": "correct_tilt_affine",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "tilt_deg": 0.0
    }
  }
}

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

References

  • Howell 2006, Handbook of CCD Astronomy 2nd ed. §5.2 (Cambridge UP).
  • Tody 1986, Proc. SPIE 627, 733 — IRAF transform heritage.