Reject subs with bright backgrounds.

Image processing, astrometry, photometry, etc.
Post Reply
jauunton
Posts: 9
Joined: 17 May 2021, 04:35

Reject subs with bright backgrounds.

Post by jauunton » 20 Jul 2021, 23:51

I live in an inner city with very bright skies (Bortle 8) and just for added challenge with bright street lights close to my home. I can image though - using either a CLS-CCD or Duo NB filter with some quite pleasing results using a ZWO ASI294MC Pro camera. Recently I have been experimenting with short exposure high gain subs to maximise my chances of a decent set of subs and remove the need for guiding. This works but I do end up with a large number of subs - eg 100-200.

Not all of these are good, of course, it seems even when I think it is clear it is not. The issue seems to be that high/thin clouds drifting through the fov and fog many subs - not enough to stop guiding but enough to ruin the sub. In less bright conditions this might result in a soft/blurred sub - in my conditions it causes horrid gradients as well due to the reflected city lights.

Is there a way to reject these bad subs automatically? It would seem to be simple to measure the background brightness and then allow rejection of subs exceeding a threshold or say - just use the best 50%.

fabdev
Posts: 268
Joined: 03 Dec 2018, 21:43

Re: Reject subs with bright backgrounds.

Post by fabdev » 21 Jul 2021, 16:24

This is currently under development, for the moment it can be done with a script, here is an example:

Code: Select all

dir = "D:\temp2\"
sigma = 2.0

files = FindFiles(dir, "*.fit")
n = Count(files)
if n < 2 then
   print "no files found"
   end
end if
print n; "files"
dim bkgs(n)
for i = 1 to n
  filename = files{i}
  Image.Open(dir + filename)
  bkgs(i) = Image.BackGround
  print filename, bkgs(i)
  image.Close
next i

sum = 0
sum2 = 0
for i = 1 to n
  sum = sum + bkgs(i)
  sum2 = sum2 + bkgs(i)*bkgs(i)
next i
avg = sum / n
sdv = Sqr(sum2/n - avg*avg)
print "Average and Variation ="; Round(avg); Round(sdv)

print
print "Bad files"
for i = 1 to n
  bkg = bkgs(i)
  if bkg > avg + sdv*sigma then
     print files{i}, bkg
  end if
next i
The script is composed by 3 sections: In the first all files are opened and the background is analyzed; then the Average and Standard deviation is calculated, then bad files are printed so that you may exclude them from preprocessing (or just delete).

At the beginning of the script write the name of the folder, and the sigma for rejecting: higher values will reject less files.

jauunton
Posts: 9
Joined: 17 May 2021, 04:35

Re: Reject subs with bright backgrounds.

Post by jauunton » 22 Jul 2021, 04:30

Thanks Fabio support above and beyond!

einari
Posts: 29
Joined: 28 Jan 2019, 10:46

Re: Reject subs with bright backgrounds.

Post by einari » 24 Jul 2021, 07:00

Fabio has good solution.
For now I have used free ASTAP software for selection

https://www.hnsky.org/astap.htm#uncheck_outliers

Post Reply