Block
Stars/background
- What it does
- It separates the stars from the rest of the image, so that each can be stretched on its own.
- What it shows
- Two images, the starless image and the stars alone, which reach Post as one layer with its own star sliders.
- What can be set
- The block itself has no setting; in Post, Stars makes the stars brighter or fainter and Star size shrinks or grows them, and the defaults already tone them down a little.
The Stars/background block separates the stars from the rest of the image. A network works on the linear image and returns two images: the starless image and the stars alone. They add up to the original image, pixel for pixel. Post then stretches each on its own and puts the stars back. The Synthetic stars block, which comes after it, redraws the detected stars with one shape: the one measured in the image, or the instrument’s.
- Denoise
- Color
- Stars/background
- Post
- Report
1What goes in, what comes out
The block takes the linear image the chain has produced up to Color: the stack with its sky gradient removed, denoised, white balanced, its sky taken off. It writes the starless image, the stars alone and the map of the covered pixels, with the statistics Post needs to stretch both. A before and after preview shows the two on one stretch.
A monochrome image stays grey: the starless image is the mean of the three channels, repeated. The pixels without data are left as they were.
2The network
The network is NAFNet,[1] an image restoration network. The networks used for denoising, deconvolution and star separation ship with the program, and the code that trained them is in the repository. The block has no setting: the network is applied as it is.
It works on the linear image, each channel minus its background and divided by a noise unit. The noise unit is the noise of the half-stacks before denoising, carried through the colour matrix and averaged over the three colours; an image without half-stacks takes the spread of its own sky. The network sees a fixed asinh stretch of that image, which is undone exactly on the way out.
The image goes through the network in tiles of 1024 pixels with an overlap of 256, blended with a smooth window (an image smaller than a tile uses tiles of 256 with an overlap of 64). The channel attention of the network averages over a window of 256 pixels instead of over the whole tile, as the Test-time Local Converter does,[2] so that a larger tile sees what the network was trained on. On a card with little free memory, the tiles go through fewer at a time, then are cut smaller.
The network leaves a regular grid, at multiples of 1/16 cycle per pixel. Where it stands out in the spectrum of the starless image, it is notched out, and the number of peaks taken off is recorded. The network runs in seconds on a graphics card and a few minutes on a processor.
3The two images in Post
Each image is stretched on its own, then the stars go back on top.
- The starless image takes the automatic stretch of the Output with the statistics of the whole image, not its own: without the stars’ grain they would stretch it much harder, and recombined it would not look like the stack.
- The stars take black at 0, since their background is the starless image’s, and the white and the midtone of the whole image. The Stars setting moves the midtone.
Because the stars are apart, stretching them less is the star reduction: no reduction is needed on the recombined image. Three more settings act on the stars alone. Star size grows the stars by a round grey dilation or shrinks them by a round grey erosion, one pixel at a time alternating a cross and a square, through a mask of the stars when it shrinks, so that the grain between the stars of a dense field is not eroded into filaments. Small stars fades the stars narrower than a number of times the typical star of the image (their median width at half height); the support of the stars is opened by reconstruction,[3] so that the wider stars stay exactly as they were. Star color sets their saturation around the luminance.
The recombination is Screen, 1 − (1 − a)(1 − b); Linear dodge (add), a + b, clipped; or Lighten, the larger of the two.
4Synthetic stars
The Synthetic stars block comes after Stars/background. It reads the stars alone, detects the stars at 8 noise units above the sky, and draws them again, each with its own flux, colour and position, and one shape for all. It writes a stars-alone image in the layout of the Stars/background block, so Post uses it in the same way. Adding stars can only put light on the starless image, never take any from it. Two methods give the shape.
Image shape
The shape is the median of the isolated, unsaturated stars near the centre of the field (within 35 % of the distance to the corner), each centred and normalised, over at least 5 stars. The brightest stars (the top 0.2 %) and the saturated ones, with a peak above 60 % of the brightest, stay real, with their light and a very soft edge: their spikes are not within the reach of the shape. In Post, the drawn stars replace the real ones, and the mask of the layer says where the real ones stay, the centre for example.
Instrument PSF
Every star takes the theoretical shape of the instrument. It is computed from the aperture: the squared modulus of the Fourier transform of the pupil,[4] with the central obstruction and the spider, for each colour, averaged over five wavelengths of its band (590 to 680 nm for red, 500 to 570 for green, 420 to 500 for blue), then blurred by the seeing, a Moffat profile[5] of the Star width. The spikes come out of the computation, and their strength follows each star’s flux. The saturated stars take their light from the Gaia catalogue: the image’s zero point is fitted on the unsaturated stars matched to Gaia, and the colour ratios are those of the 30 unsaturated stars of the nearest BP−RP colour.
The shape only depends on the focal length and the pixel size through their ratio, the plate scale. It comes from the Astrometry block, or from the focal length and pixel size known for the target; the pixel size is taken as 3.76 µm when unknown. Without a scale the block stops and asks for the Astrometry block.
5Settings
| Setting | Value | Range | What it does |
|---|---|---|---|
| Stars | 0.6 | 0.2 – 5 | How strongly the stars are stretched: 1 is the stretch of the whole image; less makes them fainter and smaller, more brighter. |
| Star size | −1 px | −3 – 3 px | Below 0 the stars are shrunk by this radius (a grey erosion), above 0 grown (a grey dilation). |
| Small stars | 0 | 0 – 2 | The small stars taken away: those narrower than this many times the typical star of the image. 0 keeps all. |
| Star color | 1.2 | 0 – 3 | Colour saturation of the stars around their luminance, after their stretch. |
| Blend | Screen | Screen, Linear dodge (add), Lighten | How the stars go back on the starless image. |
| Setting | Value | Range | What it does |
|---|---|---|---|
| Method | Image shape | Image shape, Instrument PSF | Image shape: the stars take the shape measured at the centre of the field. Instrument PSF: every star takes the theoretical shape of the instrument. |
| Type | Newtonian | Newtonian, Refractor, Schmidt-Cassegrain, Photo lens | The kind of optics: it says what stands in the light’s way. |
| Diameter | 150 mm | over 10 – 2000 mm | The diameter of the aperture. |
| Obstruction | 33 % | 0 – 70 % | The diameter of the central obstruction, as a share of the aperture’s. Used by Newtonian and Schmidt-Cassegrain only. |
| Spider arms | 4 | 0 – 6 | The arms of the spider: 4 give a cross of spikes. Used by Newtonian only. |
| Spider width | 1.5 mm | 0.1 – 20 mm | The width of the spider’s arms: wider arms make brighter spikes. |
| Spider angle | 0° | −180 – 180° | The direction of the spikes on the image. |
| Star width | 2.5 px | 1 – 8 px | The width at half height of the stars drawn: the turbulence added to the diffraction. |
6Limits, and what was tried
- Halos cut by the tiles. With tiles of the training size, a large halo was cut along a tile boundary: the tile holding the core took it off, its neighbour, which only saw halo, left it. The tiles are now larger than the largest halos met, 280 pixels around M45 (issue 45).
- The network’s own grid. It leaves a regular pattern in the starless image, which is notched out where it stands out.
- One shape for all the stars. Synthetic stars gives every star the same shape, so a shape that changes across the field is not reproduced; with Image shape, it is the shape of the centre.
- The brightest and saturated stars stay real with Image shape. Their spikes and halos are not redrawn.
- Saturated stars and the catalogue. With Instrument PSF, the light of saturated stars comes from the Gaia catalogue; without it, they keep the flux measured in an aperture.
- No star found, no change. With no star to measure, the stars are left as they are and the block says so.
References
- Chen, L., Chu, X., Zhang, X. & Sun, J. 2022, Simple Baselines for Image Restoration (NAFNet), ECCV 2022. arXiv:2204.04676
- Chu, X., Chen, L., Chen, C. & Lu, X. 2022, Improving Image Restoration by Revisiting Global Information Aggregation (Test-time Local Converter), ECCV 2022. arXiv:2112.04491
- Vincent, L. 1993, Morphological grayscale reconstruction in image analysis: applications and efficient algorithms, IEEE Transactions on Image Processing 2, 176. doi:10.1109/83.217222
- Goodman, J. W. 2005, Introduction to Fourier Optics, 3rd ed., Roberts & Company (the image of a point source as the squared modulus of the Fourier transform of the pupil).
- Moffat, A. F. J. 1969, A Theoretical Investigation of Focal Stellar Images in the Photographic Emulsion and Application to Photographic Photometry, A&A 3, 455. ADS:1969A&A.....3..455M