normalisation_config_widget
anomaly_match_ui.widgets.normalisation_config_widget
¶
Normalisation configuration widget for FITS image processing.
Provides UI controls for normalisation method, per-channel parameters, channel-combination matrix, image resolution, and interpolation order.
NormalisationConfigWidget(n_channels=3, image_size=None, extensions=None)
¶
Widget for configuring fitsbolt normalisation settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_channels
|
int
|
Initial number of output channels. |
3
|
image_size
|
list[int] | None
|
Initial image size |
None
|
extensions
|
list[str] | None
|
Initial list of FITS extension names for the channel-combination matrix column headers. |
None
|
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
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 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
extensions
property
¶
Input-channel names currently shown as matrix column headers.
set_disabled(disabled)
¶
Enable or disable all interactive controls.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
disabled
|
bool
|
|
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
register_on_change(callback)
¶
Register a callback invoked when any setting changes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback
|
Callable[[], None]
|
Zero-argument callable fired on any widget value change. |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
show_cutout_zoom(visible=True)
¶
Show or hide the cutout zoom control (only relevant for Cutana).
show_resolution(visible=True)
¶
Show or hide the output-resolution field.
The detail view decodes at a fixed high resolution for viewing, so the field has no meaning there — hide it rather than let the user pick a model-input size while inspecting a single cutout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visible
|
bool
|
|
True
|
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
apply_cutana_bands(filter_names)
¶
Auto-configure channel settings from detected Cutana filter names.
Sets extensions, shows the cutout zoom slider, and adjusts the
output channel count to match the number of bands. Use for the
first-time auto-configuration when the user picks a new Cutana
source — it is destructive and will overwrite any customised
n_output_channels. Call :meth:sync_cutana_bands instead
when the widget already reflects a user's choice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_names
|
list[str]
|
Filter names detected from the catalogue
(e.g. |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
apply_input_channels(names)
¶
Set the input channels and reset to one output channel per input.
Destructive, like :meth:apply_cutana_bands: the matrix becomes the
identity for names. Used when a new source has different channels
from the ones the widget shows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
names
|
list[str]
|
Input-channel names, one per source channel. |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
sync_cutana_bands(filter_names)
¶
Sync extension column headers to the Cutana filter names.
Unlike :meth:apply_cutana_bands this preserves the current
n_output_channels — use when re-entering a screen after the
user has already customised the channel count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_names
|
list[str]
|
Filter names detected from the catalogue. |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
set_extensions(extensions)
¶
Update the FITS extension names and rebuild the matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
extensions
|
list[str]
|
List of extension names for column headers. |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
get_normalisation_config()
¶
Extract current widget state as a config dict.
Returns:
| Type | Description |
|---|---|
dict
|
Dict with keys matching |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
update_from_config(norm_cfg)
¶
Restore widget state from a normalisation config dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
norm_cfg
|
dict
|
Dict with |
required |
Source code in anomaly_match_ui/widgets/normalisation_config_widget.py
validate()
¶
Check current widget values against parameter bounds.
Delegates to :func:~anomaly_match.utils.normalisation_parameters.validate_normalisation
so the same rules apply whether config comes from the UI or code.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of validation error messages, empty if all valid. |