stretch_stars
Stretch linear star images by subtracting the median pedestal and applying repeated midtones transfer to bring out faint details.
Instructions
Stretch a linear star image in place with a pedestal subtraction and a repeated midtones transfer function. When the image median is above 1e-5 it is subtracted as a pedestal and the rest rescaled, max(0, (x − median)/(1 − median)); then the midtones transfer function MTF(m, x) = (1 − m)·x / ((1 − 2m)·x + m) is applied iterations times with m = midtone. Results are truncated to [0,1]. The result reports the pedestal, the final median and maximum, and high_fraction: among pixels sampled every 16 pixels whose value (the channel maximum) exceeds 0.005 before the stretch, the fraction above 0.5.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"view_id": "<view_id>",
"midtone": "<midtone>",
"iterations": "<iterations>"
},
"name": "stretch_stars"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| midtone | Yes | MTF midtones balance m, strictly between 0 and 1 (m < 0.5 brightens) | |
| view_id | Yes | Star image view ID | |
| iterations | Yes | Number of times the MTF is applied (>= 1) |