Usually, I find starts in an image, look in the stars window and order decending by FWHM x, and then multiply the value with image resolution.
It would be very helpfull, if Astroart could show the average FWHM for non saturated weak, but not too weak, stars.
I have seen from a fellow amateur astronomer, that CCD Inspector has a neat function for doing just this.
First, I tried to make a script, that ran through fit files and simply printed the Astroart script function Image.FWHM.
Code: Select all
wx,wy = Image.FWHM
aaFWHM = sqr(wx*wx + wy*wy)
print "Astroart FWHM for the image = " ; aaFWHM * imageRes ; " arcsec/pixel"
Question 1)
Is it possible to deduce the image resolution in arcsec per pixel from the Astroart script functions?
Question 2)
I then made a script, that finds stars in the image, and calculates the average FWHM from the stars found.
The script gets lower values than the Image.FWHM returns, how can that be?
While experimenting with the script, I also noticed, that the stars peak value is not 2^16-1 = 65535 as expected for a 16 bit fit file, but somewhere in the region of 65500.
I modified the script to look at stars only below a given treshold and then I get some values, that I find more realistic.
The script I made is here, and an example output is shown below that.
Script output:
Code: Select all
Folder = C:\Main\astro\2021\0213\ngc2300\
File mask = *?1?_L.fit
Image resolution = 1.2 arcsec/pixel
Calculating average FWHM for stars with peak value less than 32000 from the 1000 brightest stars found
NGC2300_017_L.fit ; UTC = 2021 02 14 00 33 15 ; N stars = 731 stars; avgFWHM = 6.5 arcsec; Astroart FWHM = 15.6
NGC2300_018_L.fit ; UTC = 2021 02 14 00 35 26 ; N stars = 716 stars; avgFWHM = 6.1 arcsec; Astroart FWHM = 15.36
NGC2300_019_L.fit ; UTC = 2021 02 14 00 37 36 ; N stars = 689 stars; avgFWHM = 5.6 arcsec; Astroart FWHM = 15.72
NGC2300_113_L.fit ; UTC = 2021 02 14 04 19 52 ; N stars = 730 stars; avgFWHM = 6.2 arcsec; Astroart FWHM = 14.76
NGC2300_114_L.fit ; UTC = 2021 02 14 04 22 00 ; N stars = 724 stars; avgFWHM = 6.2 arcsec; Astroart FWHM = 15.24
NGC2300_115_L.fit ; UTC = 2021 02 14 04 24 07 ; N stars = 682 stars; avgFWHM = 5.4 arcsec; Astroart FWHM = 15
NGC2300_116_L.fit ; UTC = 2021 02 14 04 26 15 ; N stars = 700 stars; avgFWHM = 5.8 arcsec; Astroart FWHM = 15
Code: Select all
'Image resolution, seconds per pixel
imageRes = 1.2
NStarsToFind = 1000
MAXPeakValue = 32000
folderName = "C:\Users\Bruger\Rudi Dropbox\Main\astro\2021\0213\ngc2300\"
fileMask = "*?1?_L.fit"
print "Folder = " ; folderName
print "File mask = " ; fileMask
print "Image resolution = " ; imageRes ; " arcsec/pixel"
print "Calculating average FWHM for stars with peak value less than " ; MAXPeakValue ; " from the " ; NStarsToFind ; " brightest stars found"
print ""
foundFiles = FindFiles(folderName, fileMask)
NFiles = Count(foundFiles)
for f = 1 to NFiles
FindFWHMOfStars(imageRes, NStarsToFind, MAXPeakValue, folderName, foundFiles{f})
next f
function FindFWHMOfStars(imageRes, NStarsToFind, MAXPeakValue, folderName, fileName)
' open file and find stars, they are ordered decending by ADU
Image.Open(folderName + fileName)
NFound = Image.Stars.Find(NStarsToFind)
wx,wy = Image.FWHM
aaFWHM = Round(sqr(wx*wx + wy*wy),1) * imageRes
sumFWHM = 0
sumADU = 0
N = 0
for i = 1 to NFound
'get the pixel value at centre, to ignore stars that are close to saturation
starCenterValue = Image.GetPixel(Image.Stars.X(i),Image.Stars.Y(i))
if (starCenterValue < MAXPeakValue) then
fwX = Image.Stars.FwhmX(i)
fwY = Image.Stars.FwhmY(i)
fw = sqr(fwX * fwX + fwY * fwY)
sumFWHM = fw + sumFWHM
N = N + 1
endif
next i
avgFWHM = Round(sumFWHM / N * imageRes,1)
avgADU = Round(sumADU / N,0)
print fileName ; "; UTC = " ; Date(Image.JD) ; " " ; Time(Image.JD) ; "; N stars = " ; n ; " stars; avgFWHM = " ; avgFWHM ; " arcsec; Astroart FWHM = " ; aaFWHM
Image.Close
end function