multicolorfits.PanelState#
- class multicolorfits.PanelState(filepath='', data=None, header=None, stretch='linear', vmin=0.0, vmax=1.0, percent_min=0.0, percent_max=100.0, data_min=0.0, data_max=1.0, color='#FFFFFF', label='', smooth=False, smooth_sigma=3.0, in_use=False, reprojected=False)[source]#
State for one image layer (one GUI panel).
- Parameters:
- data, header
Image data and WCS/header after optional squeeze / reproject.
- Type:
array / McfHeader
- stretch, vmin, vmax
Display stretch and absolute limits for
rescale_image().- Type:
str / float
- percent_min, percent_max
Percentile limits (updated when the user adjusts percentile controls).
- Type:
- color, label
Layer color (hex) and optional legend label.
- Type:
- smooth, smooth_sigma
Optional Gaussian smoothing before colorize.
- Type:
bool / float
- __init__(filepath='', data=None, header=None, stretch='linear', vmin=0.0, vmax=1.0, percent_min=0.0, percent_max=100.0, data_min=0.0, data_max=1.0, color='#FFFFFF', label='', smooth=False, smooth_sigma=3.0, in_use=False, reprojected=False)#
Methods
__init__([filepath, data, header, stretch, ...])apply_header_string(hdrstring)Replace the panel header from newline-separated card text.
apply_zscale()Set limits with the IRAF zscale algorithm.
clear()Reset the panel to its unloaded state.
header_string()The panel header serialized as newline-separated cards.
load_fits(filepath)Load a FITS image into this panel.
render_color_rgb([gamma, inverse, dtype, ...])Produce the colorized RGB array for this panel (the quantity that combine_multicolor consumes).
render_display([gamma, inverse, dtype, max_size])Display-ready [0..1] RGB preview of this single panel (gamma-corrected; inverted single images are white-background).
reset_minmax()Reset limits to the full data min/max.
set_data(data[, header, filepath])Assign image data (and optional header) from arrays.
set_limits([vmin, vmax])Set absolute scaling limits, updating the matching percentiles.
set_percentiles([pmin, pmax])Set scaling limits from data percentiles.
set_reprojected(data, header)Replace this panel's data and header with a reprojected version (from an align operation), preserving the user's display settings (stretch, color, smoothing, and absolute vmin/vmax scaling limits).
to_dict()Attributes
colordatadata_maxdata_minheaderlabelpercent_maxpercent_minsmoothsmooth_sigmastretchvmaxvmin