A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Others » Astro Pictures
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

ASTRO: Command line SNR tool



 
 
Thread Tools Display Modes
  #1  
Old April 14th 07, 04:57 PM posted to alt.binaries.pictures.astro
Richard Crisp[_1_]
external usenet poster
 
Posts: 985
Default ASTRO: Command line SNR tool

I made a simple tool to create snr images. The tool is based on compiled
versions of two of the FITSTOOLS components free on the NASA website. I am
not a programmer though, so the interface is clunky but the tool works.

here's a link to a page on my website where you can download it (6.5MB
including two test image files)

http://www.narrowbandimaging.com/snr...ol_xp_page.htm

read the README!!!!

----
The tool is invoked from a DOS window on a command line

stest_q input.fit gain background_adu read_noise snr.fit

input.fit is the input file (calibrated!)
gain is the camera gain: electrons/adu
background_adu is the average value of a star free and nebulosity free part
of the background of the image you wish to measure (measure this ahead of
time!)
read_noise is the read noise of the camera in electrons

snr.fit is the output file you wish to create

start with the input file in 32bit floating point to avoid numeric
truncation

I also included two sample files for testing purposes, one is called
file1.fit and the other is file2.fit

the read noise for this camera was 11.3electrons (measured) and the gain was
1.5 electrons/adu (measured)

the fit file that is created as the output directly reads as signal to noise
ratio. So if the numerical value of a pixel is 8, then the SNR is 8 at that
pixel.

the tool calculates the signal as the delta between the image and the
background on a pixel by pixel basis (using a global vaolue for the
background). that's the numerator.
the denominator, which is the noise, is this quantity sqrt(image +
background^2 + read_noise^2)

Since the noise of the image is the square root when the term is added in
quadrature with the other noise terms, the square root squared winds up as
the image data itself under the radical just in case there was any
confusion.

here's the source for the bat file

del %5
fitscopy.exe "%1[pix X/%2 - %3/%2]" num.fit
fitscopy.exe "%1[pix SQRT((X/%2)+(%3/%2)^2 +%4^2)]" denom.fit
imarith.exe num.fit denom.fit d %5
del num.fit
del denom.fit

---it is a useful way to assess the impact of changing something in the
system, from cleaning optics to operating temperature of the camera to
exposure time experiments to the number of darks/flats etc.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[fitsbits] Rice compression from the command line Mark Calabretta FITS 0 July 19th 06 05:05 AM
[fitsbits] Rice compression from the command line Mark Calabretta FITS 0 July 19th 06 01:58 AM
[fitsbits] Rice compression from the command line William Pence FITS 0 July 12th 06 11:35 PM
[fitsbits] Rice compression from the command line Rob Seaman FITS 0 July 12th 06 08:23 PM
Command Line? JML SETI 0 January 12th 05 03:25 AM


All times are GMT +1. The time now is 03:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 SpaceBanter.com.
The comments are property of their posters.