
# This is an example "ISee! Pixel Calibration and Bad Pixel Correction" configuration file.
# All possible (as for ISee! v1.11.1) options/commands are listed and explaned.
# Lines starting with sharp character (#) are considered as comments and ignored by ISee!

# Written by Alexander Alekseychuk (alexander.alekseychuk@bam.de), 2008-11-15, 2014-02-02



# List reference images in order of ascending exposure (average grey value).
# The number after image filename is optional and specifies target grey value of this reference. 
# If ommited, ISee! will calculate and use the image' global median for the target grey value.

black.tif 	    0
0.02mA.tif	  200
0.05mA.tif	  500
0.10mA.tif	 1000
0.19mA.tif	 1900
0.38mA.tif	 3800
0.75mA.tif	 7500
#1.50mA.tif	15000



# Perform calibration so that the black-image will have grey value of zero after calibration.
# In other words: image will be corrected for the offset.
# Then the first image in the list above will be considered as a reference black-image.

$adjust_black



# Default interpolation between reference images is linear, i.e. 1st order.  
# This option enables 2nd order interpolation.  Seldom necessary, 
# unkomment only if you really need this. 

#$use_2d_order



# Detection of bad pixels by analysis of their gain.
#
# The first number (argument) is global sensitivity.  It is the allowed deviation of gain
# of each single pixel from the global median gain, expressed in standard deviations.
#
# The second number is local sensitivity and it is the allowed gain deviation from the
# median gain in 21x21 local area (local area size is according to E2597).  If set to zero  
# or a negative number - no local analysis is performed (_significantly_ faster).

#$detect_bad_pixels 5.0 3.0 
$detect_bad_pixels 5.0 -1 



# Detection of bad pixels by means of calibration (grey value adjustment) of a reference image 
# and detection of pixels which cannot be calibrated sifficiently good.  
#
# Remenber to comment out the corresponding images in the list of reference images (above).
#
# The second (numerical) parameter is the allowed deviation of grey value in calibrated image
# from the median grey value in 9x9 local area (local area size is according to E2597),
# expressed in _percents_.

#$detect_bad_pixels 0.10mA.tif
#$detect_bad_pixels 0.38mA.tif 1.5



# In case if bad pixel detection resulted in a excessive number of detections, this option 
# allows to set a warning signal.  The argument is the percentage of bad pixels in relation 
# to the number of all pixels (image size).

$bad_pixels_high_sens_warn 10



# Once succesively detected bad pixels have to be saved in a file, bad pixel map, 
# in order to be reused after that since the bad pixel detection procedure is time consuming

#$save_bad_pixels_map bad_pixels.tif



# And this command allows to load the bad pixel map saved before.

#$bad_pixels_map bad_pixels.tif



# Commands ISee! to ignore possible interferences between bad pixels and their immediate neighbours.
# Leave it commented out, if you have no good reason to do the opposite.

#$ignore_pixel_leakage


# drift correction of dark image by difference of first reference image - dark_frame_refresh
# if median of both images are differnt by more than 50% (|a-b| > a+b/4), a warning will be shown
# available for Isee versions above 1.10.2

#$dark_frame_refresh <actual dark image>

# 
# eof
