Wolf-Rayet 124
Processing of monochrome JWST observations into a color image
Wolf-Rayet 124 is a star with a bright, hot, dusty nebula surrounding it. The star is is expelling gas and dust into space, sculpting it with intense winds resulting in intricate patterns expanding outward as the star ages. Data are publicly available from MAST: Barbara A. Mikulski Archive for Space Telescopes.

It starts with raw* data that have been automatically processed somewhat by the pipeline at STScI. Each frame represents a different bandpass collected by the telescope. Most are wideband, but some are medium, and one is narrowband. The problems are numerous. Black holes where bright stars saturated the sensor, noisy banding, background mismatching, processing artifacts from where cosmic rays were automatically dropped out, misalignment of frames, varying resolution, and of course the puzzle of how to put together the different filters. The diffraction spike entering the image from the lower left also poses a compositional problem.

* truly raw JWST data are virtually impossible for a human to work with manually, amounting to gigabytes of individual frames that must be integrated before producing a single usable frame.

Begin by removing the fine lines of noise using the G'MIC banding denoise filter. Note that some artifacts are introduced. This is not desirable, but the image quality gain is worth the sacrifice.

Larger scale banding can also be removed with G'MIC by scaling the image down by 25%, creating a difference image using the same banding denoise filter, scaling the difference image back up 400%, and then subtracting it from the original image. Again, more artifacts are introduced. Somewhat accidentally, the diffraction spikes also become less noticeable. Given their heavy presence in the image, this is desirable.

Other cosmetic issues can be handled with traditional Photoshop tools. It doesn't have to be perfect. All of this has to be done again and again with each individual filter, of which there were six this time. In the end, they all blend together and small imperfections have little consequence.

After the cosmetic issues have mostly been taken care of, it's time to consider how to assemble the available filters into a single RGB image. This is the fun part. After tinkering with it for a while, I ended up with these color assignments. Generally, longer wavelengths should be assigned to redder colors, while shorter wavelengths are assigned to bluer colors. This is is a natural "chromatic order" that will typically yield a good image, although things can get tricky when working with infrared wavelengths.

I like to finish cosmetic work on the individual frames before generating the color image. That way, I don't get "locked in" to a particular state of the image and have to go back and redo work if I change my mind later. However, it is some things are easier to do after everything is combined.

This corner of the image came out of the pipeline especially poorly in the three high resolution filters. To amend this, rather than reprocessing the raw data manually, I opted to blend this part of the image with data from only the two lower resolution filters.

It's on the edge, and the resolution mismatching and loss of color information is not apparent without close inspection. The final image benefits from the wider field of view by not cutting this edge off.

Finally, I had to figure out how to remove that enormous, obtrusive diffraction spike emanating from a bright star off the frame. I used a combination of content-aware fill, manual healing brush work, curves with manually painted masks to darken some places, and a lot of patience. I just kept working at it until it looked acceptable. Looking at the blink animation I can see a few stars I accidentally deleted... aw, man! The toddler divides my attention a lot these days.
And with that, the image is 98% done or so. A few little tweaks here and there, and then it is rotated 180° to more closely align with astronomical north, because it's easier to keep one's bearings when things are oriented consistently.

External links:
Wolf-Rayet 124
Published:

Wolf-Rayet 124

Published: