samstars.data.scaling¶
samstars.data.scaling
¶
Scaling-stat helpers for samstars inputs and aux channels.
build_scale_stats_from_proposal_records(*, proposal_records, out, percentiles=(2.0, 98.0), chm_key='chm', nodata_values=(-9999.0, -32768.0))
¶
Build StarDist CHM scale stats from proposal records.
Source code in samstars/data/scaling.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
load_scale_stats(path)
¶
Load scale stats.
Source code in samstars/data/scaling.py
23 24 25 | |
scale_to_01(arr, lo, hi)
¶
Scale to 01.
Source code in samstars/data/scaling.py
48 49 50 51 52 53 54 55 56 | |
scale_to_u8_per_channel(img_hwc, lo_hi)
¶
Scale to u8 per channel.
Source code in samstars/data/scaling.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |