Decon Module Use (v1.6, 1.7)

Notes from users, documentation addendums.
Post Reply
Guy
Posts: 158
Joined: Thu Feb 19, 2015 8:35 am

Decon Module Use (v1.6, 1.7)

Post by Guy »

Here are some notes relating to using this module. It is not the only way to use the module and experimentation is encouraged.
They relate to StarTools version 1.6.392beta and later.
Please let me know if anyone sees any errors or has any additional advice they think helpful.
I will update this post as needed.
To see a full alphabetical list of module topics click here

Decon Module (v1.6)
Purpose:
  • The Decon module tries to reverse the effects that atmospheric turbulence and, optionally, the optical train, has on the data. It allows recovery of detail in seeing-limited data sets that were affected by atmospheric turbulence and diffraction.
Description:
For a good description see Deconvolution: Detail Recovery from Seeing-Limited and Diffraction-limited Data
The Decon module is noise-aware and is able to generate its own de-ringing mask. De-ringing will still try to coalesce singularities.
The Decon module incorporates a regularization algorithm that automatically finds the optimum balance between noise and detail and allows you to control this trade-off.

Useful Sources
There are a number of useful links in StarTools Links and Tutorials.
The processing video 'StarTools simple image processing workflow tutorial with real-world, imperfect data' shows the use of the Decon module. This shows v1.4 but is still relevant for this module.

When to use:
  • The Decon module should be used after the final global stretch (Develop or AutoDev) and local stretch (Contrast, Sharp and HDR) modules:
    • Decon will be able to achieve better results the closer you get to a final image - since it has better infrormation from tracking.
    • The HDR module (and to some extent the new Sharp module) can exacerbate any residual ringing.
    • The mask that the Decon module creates is no longer re-used in the Sharp module to stop it causing stars to bloat further.
    • If there is no oversampling, or if there is a lot of noise, the benefit of this module will be limited.
    • Use only once.
    Example Workflow (v1.6):AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev (or Develop)-{Contrast/HDR/Sharp/Decon/Flux/Life}-Color-{Entropy/Filter}-Denoise (or Denoise 2)-{Layer/Shrink/Heal/Repair/Synth}
    (v1.7) AutoDev-{Lens}-Bin-Crop-Wipe-AutoDev (or FilmDev)-{Contrast/HDR/Sharp/Decon/Flux}-Color-{Shrink/Filter/Entropy/SuperStr}-Track/NR-{Layer/Heal/Repair/Synth/Stereo 3D}

    Key: {...} optional modules

    Method:
    This is a way of using the module which should give good results in most cases:
    1. Select 'Generate mask automatically' to create an inverse star mask - or use AutoMask preset to create one - this masks out overexposed stars which cause ringing.
    2. Select a preview area rectangle in the image to see the effect of changes - this speeds up analysis. Choose a bright, detailed and noise-free area.
    3. Select 'Primary PSF' model you want to use.
    4. Select a 'Secondary PSF' if needed - to compensate for optical train as well - or leave Off.
      • Select Sample Star when prompted
    5. Leave 'Tracking Propagation' to 'Post-decon (Fast)' initially.
    6. Select 'Image Type' - 'Deep Space' or 'Lunar/Planetary'.
    7. Leave 'Regularisation' at default unless you have reason to change it.
    8. Adjust the 'Primary Radius' setting - until just before the smaller stars start showing signs of ringing.
    9. Set 'Enhanced Deringing' to 0% for Lunar/Planetary/Solar targets.
    10. Zoom in and out so you can see the effect in the detail and as a whole.
    11. Change the 'Iterations' setting to see if increasing it gets better results.
    12. Set 'Tracking Propagation' to 'During Regularization (Quality)' to see if it improves the results.
    13. Toggle top "Pre Tweak/Post Tweak" button to see effect of last adjustment if needed.
    14. Normally other default values work well - e.g. for Regularisation - but you can experiment if you want.
    15. When done, select 'All' to apply this to the whole image - this may take some time.
    16. Press 'Keep'.
    What result to look for:
    • Elements should appear more focussed as the blurring effect of atmospheric turbulence is compensated for.
    • Edges should look more distinct and without the exaggerated coalescing caused by increasing the radius a lot.
    • If there are ringing artefacts around the stars it indicates the Primary Radius parameter is too high.
    • An increase in noise blotches in the background in the 'After' image indicates the Regularisation setting is too low.
    • An increase in blurring in the foreground in the 'After' image indicates the Regularisation setting is too high.
    Ways of getting better results:
    • The Decon module works best when there is little noise - Bin your oversampled data to improve the SNR if needed - but consider leaving some degree of oversampling to allow deconvolution to bring out finer detail. See the Bin module notes for a discussion of the issues relating to Bin vs. deconvolution.
    • Data that is not oversampled is not a candidate for deconvolution if the aim is to reverse seeing-related issues.
    After Use:
    • Optionally use the Flux or Life Modules.
    • Use the Color module.
    Special Techniques:
    Using only a Secondary PSF - e.g. for images taken outside the Earth's atmosphere:
    • Set the Primary PSF to 'Circle of Confusion'
    • Specify a very large Primary PSF Radius.
    • Set Secondary PSF as required.
    Description of Controls:

    Mask:
    For general instructions on using masks see Mask
    • In this case the mask is used to mask out the over-exposed stars, hot pixels, dead pixels and other non-linear data so that they can be treated separately to avoid ringing effects.
    • It is important we only deconvolve original and linear data and not any distortions. Otherwise significant artefacts will be created.
    • If no mask is set you are asked if you want to create star mask - 'Auto-generate mask', 'Auto-generate conservative mask', 'Generate mask manually' or 'Keep mask as-is'
    • For most situations select 'Auto-generate mask' if the subject is a DSO.
    • Select 'Auto-generate conservative mask' if you have clean data and your system has a linear response across the dynamic range including highlights.
    • If not prompted because a Mask is already set - use the AutoMask preset to create a mask automatically - or to create one manually:
      • Press 'Mask' top button
      • Press 'Auto' top button
      • Press 'FatStars' top button then 'Do'
      • Press 'Invert' top button
      • Press Shrink a number of times - this increases the masked area to make sure these bloated stars and any light that may have bled into surrounding pixels has been eliminated.
      • 'Keep'
    Primary PSF:
    Defines which model of atmospheric turbulence blurring is used in the reversal process:
    • Gaussian (Fast) - Model used in Decon previous to Startools 1.6
    • Circle of Confusion - models basic focusing assuming no atmosphere (e.g. in space).
    • Moffatt Beta=4.765 (Trujillo) - Uses a Moffat distribution with Beta factor 4.765. Recommended by Trujillo et al (2001)
    • Moffatt Beta=3.0 (Saglia, FALT) - Uses a Moffat distribution with Beta=3.0. As implemented in the FALT software at ESO.
    • Moffatt Beta=2.5 (IRAF) - Uses a Moffat distribution with Beta=3.0. As implemented in the IRAF software by USNOAO.
    • Default is Gaussian (Fast).
    Secondary PSF:
    This parameter allows the Decon module to calculate a total PSF for both the atmosphere and the optical train using a sample star as a reference.
    In this way Decon tries to compensate for blurring by the atmosphere and also in the optical path.
    Once you enable this option you will be prompted to choose a sample star.
    Sample Stars: Good candidates for sample stars have the following characteristics:
    • Are set in an even background.
    • Are neither over-exposed or dim.
    • Ideally their profile covers most of the linear dynamic range of the image.
    • Ideally they are located towards the centre of the image.
    The options for a Secondary PSF are:
    • Off (Primary Only)
    • Star Sample Small x Primary - Sample Star just fits 15x15 pixel area.
    • Star Sample Medium x Primary - Sample Star just fits 21x21 pixel area.
    • Star Sample Large x Primary - Sample Star just fits 27x27 pixel area.
    • Dynamic Star Sample Small x Primary - Sample Star just fits 15x15 pixel area.
    • Dynamic Star Sample Medium x Primary - Sample Star just fits 21x21 pixel area.
    • Dynamic Star Sample Large x Primary - Sample Star just fits 27x27 pixel area.
    • Default is Off (Primary Only).
    Sample Star Size: Select the size option so that all the pixels that belong to the sample star should just fit into the area - with not much background.
    Dynamic Stars: You can make the sample star iteratively convolve with the image. This is called a Dynamic Star.
    It can produce better results depending on the quality of the sample star chosen. It also takes longer to process.
    To use this approach you must:
    • Choose one of the 'Dynamic Star' options.
    • If you are using a preview, make sure the sample star is well within the preview area.
    Tracking Propagation:
    Deconvolution works on linear data but the results can be shown on stretched and processed data because StarTools keeps track of the signal evolution.
    Tracking Propagation specifies how the Decon module propagates the result backwards and forwards through the signal evolution history.
    The way, and how often, this backward and forward propagation takes place is controlled by this parameter.
    • Post-decon (Fast) - only propagates the final result. Approximates the intermediate results.
    • During Regularization (Quality) - propagates the result of each iteration. Slower but more precise. May get more from the dataset - especially with Regularization lower than 1.0.
    • Default is 'Post-decon (Fast)'.
    Bright Response:
    Specifies if there is non-linearity in the response when the pixel is near full-well capacity.
    The deconvolution algorithm can make allowances for this.
    • This non-linearity is represented using the formula: Non-linearity = 100% * (BrightnessOfPixel^BrightResponse)
    • Default (Full) means there is no non-linearity (BrightResponse is infinite). If this is not the case then choose a value that best reprsents your system.
    • For example: A value of 10 means a nonlinearity of 11% at 80% brightness, 3% at 70% brightness.
    • The minimum value (1.0) means the non-linearity gradually ramps up from 0% to 100% as pixel brightness increases.
    • Default is Full (11.0). Range is 1.0 to 10.9 then Full (Infinite).
    Primary Radius:
    The size of the blur that Decon will try and remove:
    • This value can be increased until ringing starts to occur on small non-overexposed stars - then back off a little.
    • Related to the seeing - Seeing-induced blur is normally 3-4.5 arc-seconds. The camera/lens combination gives a resolution between 1 and 5 arcsec/pixel depending on the equipment combination.
    • Adjust the Radius until just before the smaller stars start showing signs of ringing.
    • If a Secondary PSF is defined, its radius will be derived from this radius.
    • Default is 1.5 pixels. Range is 1.0 to 20.0.
    Image Type:
    There are different Deconvolution modes for Deep Space and Lunar/Planetary targets.
    • Deep Space - Deconvolution makes no special provision for extra dynamic range.
    • Lunar/Planetary - This mode frees up dynamic range for any deconvolved highlights.
    • Default is 'Deep Space'.
    Regularization:
    Sets the balance between detail, noise and smoothness:
    • Default is 1.00 (optimal noise and detail). Range is 0.00 to 5.00
    • Adjust as needed. Increase above 1.00 to reduce noise at the expense of detail, up to a maximum of 5.00
    • Reduce below 1.00 to get extra detail at the expense of noise. Very high quality data may benefit from slightly lowering this value below 1.0.
    • The way the noise becomes visible below 1.00 is altered psychovisually so as to be less noticeable.
    • If reducing below 1.0, try 'Tracking Propagation' set to 'During Regularization (Quality)'.
    Enhanced Deringing:
    Defines the aggressiveness of the de-ringing filter:
    • Higher values will undo more artifacts - but may also undo some of the darker detail enhancements from Decon.
    • Reducing risks introducing more artifacts - which may cause worse effects in other modules.
    • Lunar, Planetary and Solar images need a less aggressive deringing strategy and so this can be set to Off (0%)
    • Default is 50%, Range is Off (0) to 100%.
    Iterations:
    Sets the number of iterations the deconvolution algorithm goes through.
    • Default is 6, Range is 1 to 51.
    • Increase this value incrementally if further improvement can be seen - there will be a point beyond which you will not get a better result.
    Mask Fuzz:
    If a mask is used, Mask Fuzz controls the blending of the transition between masked and non-masked parts of the image.
    • Only has effect when Mask is active (DSO subjects) - see Mask Behaviour above.
    • Smooths the transition around the bright stars.
    • Default 4.0 pixels. Range is 1.0 to 40.0 pixels.
    • Experiment to find most natural look.
    Background Notes

    Deconvolution and Oversampling
    Deconvolution is used to undo the blurring effect of an unstable atmosphere and an imperfect optical train, however this can amplify noise and introduce artefacts including ringing. It works best on data which is oversampled and has a high signal to noise ratio.
    However, data that is on the cusp of being oversampled, where faint stars are spread over 3 pixels, may still benefit from a small amount of deconvolution. Every optical system, no matter how expensive, spreads a point light over multiple pixels to a degree (see Airy disk). Decon can reverse this spreading as well - just take it easy - it is very easy to overdo this.
    For further details regarding oversampling, binning and deconvolution see the Bin module background notes.

    Deconvolution and singularities
    Singularities in the data are those areas where there is a discontinuity in the valid data - where the valid data is missing - such as in the saturated white cores of stars. These areas normally cause bad ringing artefacts.
    StarTools uses a novel de-ringing algorithm which ensures stars are protected from the Gibbs phenomenon (also known as 'panda eye effect'), while actually being able to still coalesce singularities, such as over-exposed white cores of stars, into point lights.

    Lunar/Planetary/Solar
    The Decon module behaves slightly differently with Lunar, Planetary and Solar images when it comes to reconstructing highlights.
    With these images, if a reconstructed highlight requires more dynamic range it is allocated it. The reconstructed highlights are not allowed to over-expose. The dynamic range of the complete image is adjusted to accommodate the new highlights.
    With DSOs, a reconstructed highlight is not given any more dynamic range and is allowed to over-expose.
    Also, these images do not require an aggressive deringing strategy so 'Enhanced Deringing' can be set to 0%.

    See also StarTools help on Lunar, Planetary and Solar

    Tracking
    Tracking in StarTools allows the Decon module to do thigs that are normally impossible!
    • Deconvolution only works on linear data - but the Decon Module is used after the data has been stretched.
    • In the Decon module we look at the result of a stretched and processed image and apply deconvolution on the linear data and watch its effect on the processed image.
    Models of the atmosphere
    The way a point source has its light scattered around its actual location is called a Point Spread Function (PSF)
    Deconvolution does its best to model this PSF and then reverses it to get back to the original.
    Over the years models have been developed for the PSF of atmospheric blurring.
    Five of these models are available to select from in the Decon Module.
    • Gaussian (Fast)
      • Uses Gaussian distribution to model atmospheric blurring
      • Model used previous to Startools 1.6
      • Processing is Fast
    • Circle of Confusion
      • Models the way a lens focuses the light of a point source assuming no atmosphere
      • Suitable for images taken outside the Earth's atmosphere.
    • Moffatt Beta=4.765 (Trujillo)
      • Uses Moffat distribution to model atmospheric blurring
      • Uses a Beta factor 4.765.
      • Recommended by Trujillo et al (2001) as best fit for prevailing atmospheric turbulence theory
    • Moffatt Beta=3.0 (Saglia, FALT)
      • Uses Moffat distribution to model atmospheric blurring
      • Uses a Beta factor of 3.0.
      • This is a rough average of the values tested by Saglia et al (1993)
      • It corresponds with findings of Bendinelli et al (1988)
      • As a result of studying the Mayall II cluster - Implemented as the default in the FALT software at ESO.
      As implemented in the FALT software at ESO.
    • Moffatt Beta=2.5 (IRAF)
      • Uses Moffat distribution to model atmospheric blurring
      • Uses a Beta factor of 2.5.
      • As implemented in the IRAF software by US National Optical Astronomy Observatory.
Post Reply