set_stf
Set a view's display stretch (ScreenTransferFunction) without altering pixel data, either by copying another view or computing PixInsight auto-stretch values.
Instructions
Set the ScreenTransferFunction (display stretch) of a view without changing its pixels, and return it as rows [m, c0, c1, r0, r1] for R, G, B (K for mono) and luminance. Either copy the STF of from_view_id, or compute PixInsight's auto-stretch exactly as auto_stretch does (per channel sigma = 1.4826 × MAD; c0 = median + shadows_clipping × sigma; m = MTF(target_bg, median − c0); linked: one set of values for R, G and B from the mean clipping point and mean median). An STF is stored with the view and saved in XISF files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| linked | No | Colour images: true computes one set of values for R, G and B; false one per channel. Ignored for mono images | |
| view_id | Yes | View whose STF is set | |
| target_bg | No | Target background level, strictly between 0 and 1 | |
| from_view_id | No | Copy this view's STF instead of computing one; target_bg, shadows_clipping and linked are then not allowed | |
| shadows_clipping | No | Clipping point relative to the median, in units of sigma = 1.4826 × MAD |