measure_tonal_presence
Quantify subject and background tones in a PixInsight view by measuring separation, core brightness, faint structure visibility, and subject fraction from luminance-weighted samples.
Instructions
Measure subject and background tones. Every 8th pixel is subject when its luminance is above the background (luminance of the channel medians) + 5 x (median |luminance - background| on a 32 px grid) and at least 2 of its 4 neighbours 3 px away are too; every other sample is background. separation = subject median / background median; core_brightness = mean of the brightest 5% of subject samples; core_to_disk = core_brightness / subject median; faint_structure_visibility = (subject P10 - background P90) / background P90; subject_fraction = subject samples / all samples; roi_mode is compound_roi when a second luminance-weighted cluster, outside 0.15 x width of the centroid and holding over 15% of the weight, lies more than 0.25 x width away, else single. Denominators are held to at least 0.001. Returns JSON: separation, subject_median, background_median, core_brightness, faint_structure_visibility, core_to_disk, subject_fraction, roi_mode, subject_pixel_count. luminance is 0.2126R + 0.7152G + 0.0722B.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view_id | Yes | View to measure |