I’ve been an amateur astronomer for the past 15 years or so, and only recently have I gotten into astrophotography. (Exhibit A, a 3-panel IRG mosaic of several deep-sky objects in the Small Sagittarius Star Cloud)
It seems like the standard approach to image processing is to buy Pixinsight and use the huge ecosystem of tools and plugins available for it, but I prefer to take a different approach and use as many open source tools as possible - after all, anyone can visit the Mikulski archives and process raw Hubble or JWST data. I also personally avoid using black-box tools in my processing (anything involving machine learning/neural networks).
What packages do you think would be useful in astrophotography, and where do gaps exist? Here’s what comes to mind for me.
Image processing
DeconvOptim.jl: Performs fast Richardson-Lucy deconvolution. Oriented towards microscopy, but I don’t think that’s a problem.
CloudCovFix.jl: a package that can infill the background from images which have had stars removed. I learned about this one at JuliaCon 2025.
BlockRegistration.jl: I will be testing this package for registering lunar and planetary images that are affected by atmospheric seeing.
A package for image stretches? Astrophotographers commonly use generalized hyperbolic stretches or asinh in their processing.
Denoising? I’m interested in incorporating data from calibration frames when performing denoising. I’ve come to realize that some sources of noise in my image sensor cannot be modeled as purely uncorrelated.
It looks like there isn’t a package for the drizzle algorithm, which may be of interest to all sorts of people. I’m not familiar enough with it to write a quick implementation myself, but I may work on it in the future.
Oh cool, thanks for starting this thread! I’d also be curious to see what open source tools folks use, or are looking for, in astrophotography
Not sure if related, but I vaguely recall Ujjwal using some sort of drizzle algorithm in the context of their EpochFolding.jl package. Totally not my field though, sorry if this is just a red herring!
On a separate note, I’ve been sporadically working on a Julia version of astroalign to align astronomical images without needing to do an expensive plate solve first. If this sounds like a useful tool, then I would definitely love some help from folks more experienced with image processing, especially with getting a RANSAC implementation going to make our alignments more robust. Here’s a brief demo notebook for anyone that might be interested
From my cursory examination, I don’t think the drizzling used here is the same as the drizzle algorithm, but at the same time it might be a useful package for people who want to monitor variable stars.
Let me quickly summarize my workflow for image processing. I usually use SIRIL for processing, but I’ve had occasions where I’ve wanted a bit more freedom to work with my data.
Image calibration: this can be done really easily using FITSIO.jl given bias frames (or subtracting the bias level), darks if needed, and flats. Those frames themselves need to be stacked, but that’s pretty straightforward. Hot pixel removal should also be done at this stage.
Registration and alignment: Plate solving my datasets is pretty cheap, honestly. I use the platesolve data to perform an undistortion correction to the frames for building mosaics (I have a very limited FOV, about 24 arcminutes, with my setup). Drizzle is going to be superior to interpolation, especially when you have data from a color camera (in that context it’s often called Bayer drizzle, and it really improves the characteristics of the noise, making it easier to remove without color artifacts you may get from debayering).
Integration: A straight average is not going to be suitable when you have artifacts from cosmic rays and other transient events, so usually a clipped mean is used (winsorized sigma clipping is what I default to). Weighting averages by other parameters (number of detected stars, star roundness, background noise) also helps, and I’m particularly interested in using some more noise data from my sensor to weight individual pixels by their intrinsic noise contribution. There is also a new method for integrating data, ImageMM, which the community is really interested in.
Spectrophotometric color calibration: Using filter transmission data and the quantum efficiency of the sensor, getting a color calibrated image with a choice of white reference. I find this a bit problematic because I take a lot of images with infrared data for IRG images (and currently do not have transmission data for my IR pass filter).
Deconvolution: A damped Richardson-Lucy method is the best choice for deep sky astronomical images. The Wiener filter or the split Bregman method are faster for lunar or planetary images. Aside from the actual deconvolution steps, one of the most important parts of the process is generating the point spread function, which may be estimated from the stars in the image or calculated from the characteristics of the telescope or lens used.
Denoising: SIRIL provides NL-Bayes denoising with some secondary methods for better results (Anscombe VST for photon-starved images, DA3D and SOS operators for better results). Lots of astrophotographers use machine learned or AI denoising, such as DeepSNR or NoiseXterminator. I would personally prefer denoising tools that operated before or during the stacking operation, since stacking reduces the quantity of data you can work with! I have also implemented total generalized varation denoising recently, which does a lot better than total variation denoising for many kinds of images (but especially astroimages).
Stretching: There are lots of different ways to accomplish this, but I use the popular generalized hyperbolic stretch, which has a bit of a complicated functional form, but does a really good job of preventing stars from blowing up in an image (especially since the stretches are highly composable). One of the trickier parts is ensuring that colors are not oversaturated or undersaturated at the end of the stretches - there are different techniques for preserving chromaticity, and even for stretching chromaticity separately.
My personal way of processing is pretty simplistic and does not include steps like star removal. I also avoid any black box tools (machine learned/AI).
Aside from packages that implement each of these steps, I’d also love to be able to interface Julia code with SIRIL or other astrophotography suites. SIRIL itself only has a Python interface.
This was immediately helpful simply because the list of included packages. A lot of astrophotographers use wavelets, especially those focusing on lunar and planetary.