Color pipeline#
Stretch greyscale FITS data, tint each layer, and sum channels the classic way. Narrative: Intensity scaling, Color compositing.
Stretch & rescale#
Rescale image data to the [0,1] range with the specified stretch function and manual interval. |
|
Compute display limits using the IRAF zscale algorithm (astropy.visualization.ZScaleInterval). |
|
Create a matplotlib |
|
Replacement function for skimage.exposure.adjust_gamma, so that NaNs don't throw errors |
|
Name → astropy stretch class for unsigned |
|
Built-in immutable sequence. |
|
Built-in mutable sequence. |
|
Usage is identical to scipy.stats.percentileofscore(array_in,score), this just corrects for NaNs |
|
Dependency-free ANSI progress bar written to stdout. |
The built-in draw_progress_bar() is a zero-dependency
ANSI stdout bar (used by reproject_cube() when
print_progress=True). For richer progress in your own loops, use
tqdm directly — see the function docstring
for a side-by-side example. Multicolorfits does not depend on or wrap
tqdm.
Colorize#
Stretch a 2D intensity array and expand it to a greyscale RGB cube in [0, 1]. |
|
Add color of the given hue to an RGB greyscale image. |
|
Tint a greyscale RGB cube by multiplying channels with a solid hex color. |
|
Apply isotropic Gaussian smoothing to a 2D or multichannel image. |
|
Converts a hexadecimal string to RGB tuple |
|
Converts RGB tuple to a hexadecimal string |
|
Convert a hexadecimal string to HSV tuple |
|
Return the complementary hex color (bitwise inverse on the RGB cube). |
|
Convert c to a hex color. |
Combine (classic RGB)#
Combines input colorized RGB images [:,:,3] into one intensity-rescaled RGB image |
|
Plot a multicolor RGB image with WCS axes and save it to disk. |
|
Side-by-side comparison of a conventional RGB stack and a multicolor composite; saves the figure to disk. |
|
Write a multicolor RGB cube to a FITS file with the shared WCS header. |