Background Derivation and Image Flattening


This is a new method of background derivation and image flattening for high-resolution images obtained with space observatories. It is based on median filtering with sliding windows corresponding to a range of spatial scales from the observational beam size up to a maximum structure width X. The latter is a single free parameter of getimages that can be evaluated manually from the observed image. The median filtering algorithm provides a background image for structures of all widths below X. The same median filtering procedure applied to an image of standard deviations derived from a background-subtracted image results in a flattening image. Finally, a flattened image is computed by dividing the background-subtracted by the flattening image. Standard deviations in the flattened image are now uniform outside sources and filaments. Detecting structures in such radically simplified images results in much cleaner extractions that are more complete and reliable. As a bonus, getimages reduces various observational and map-making artifacts and equalizes noise levels between independent tiles of mosaicked images. The code (a Bash script) uses FORTRAN utilities from getsources (http://gouldbelt-herschel.cea.fr/getsources), therefore the latter must be installed.


Algorithms used in this software are described in:

Men'shchikov A. "Background derivation and image flattening: getimages" (2017) Astronomy & Astrophysics, vol. 607, A64. Download:  aa30925-17_Men'shchikov_2017.pdf


Inquiries about the code, bug reports, constructive criticism, help requests, etc., can be directed to Alexander Men'shchikov: alexander.menshchikov@cea.fr


To receive information on future updates of getimages, please send me a message to the above address.


The author makes no representations about the suitability of this software for any purpose. This software is provided as is without any expressed or implied warranty.

The names of the institutions with which the author is or has been affiliated shall not be used to publicise any data and (or) results generated by this software. All findings and their interpretation are the opinions of the user and do not necessarily reflect those of the author nor the institutions with which the author is or has been affiliated.


For information on how to install getimages, getsources, and getfilaments, and to quickly start using them, please refer to the files INSTALLATION.GUIDE, QUICK.START.GUIDE, and USERS.CHECKLIST included in the distribution archive (at http://gouldbelt-herschel.cea.fr/getsources). 



Definition of the maximum size Xλ for getimages. The formula Xλ ≈ Zλ / 2 described in Section 3.2 of the publication is meant for compact sources only (Zλ is the zero- or background-level width of a structure). Whenever an input image contains filaments, a twice larger value of Xλ is more appropriate, i.e., the definition for filaments must be written as Xλ ≈ Zλ. This is because a filament fills the median-filtering windows to a much larger degree than a compact source. Therefore, roughly twice larger windows are required to determine background under filaments (cf. Figure 1 and Table 1 of the publication).

Update of 2018-08-30 (recommended for all users). This updated version has a substantial difference with respect to the published description: getimages now defaults to a single pass of median filtering, adding a second background iteration at the largest scale. The original approach that iterates median-filtered images works well for detecting compact sources on backgrounds without filaments. In general, however, it would overestimate background under filaments and thus would not allow sufficiently full (deep) reconstruction of their structure. This could lead to an incomplete subtraction of filamentary when detecting sources (hence possibly leaving spurious sources on filaments), as well as to steeper filament profiles, due to the oversubtraction of (overestimated) background. The new version defaults to a single pass (iteration) of median filtering, which results in a more appropriate background for filaments. As a bonus, getimages is now more than 5 times faster.

Changes of default parameters for getsources. For source and filament extraction with the latest version of getimages, several parameters of getsources have been fine-tuned to get best results. It is recommended to use the following values of parameters in the configuration file +getsources.cfg:

flattening: n
sreliable: +7
stentative: +5
nsigmacutss: 5
nsigmacutfloor: 5
contranoise: +1.1

#9 - Last update : 06/09/2018
|Galerie multim├ędia|liens utiles|mentions legales
Retour en haut