hiclean implements Alan Delamere's version of HiRISE image radiometric calibration
as coded in his IDL program called clean.pro. Mike's general approach is to
use the calibration data acquired for each image and compute statistics from it used to
characterize instrument conditions at the time the image is acquired. This data includes
the reverse clock, mask, buffer and dark current data that is stored in Isis objects within
all HiRISE Isis cubes. These objects are sometimes referred to as Binary Large OBjects,
Excerpts from Alan's description of his algorithm:
Cimage_mask,image,info
Step 1. Average all the usable masked pixels in each column including buffer and
dark for the 18 binned lines for bin 1, 9 lines for bin 2 and 4 lines for bin 4
. Floating point array of 1052 columns for bin 1, 540 columns for bin 2 and 284
columns for bin 4.
Step 2. Subtract this line from every line in the image.
Cimage_dark, image, info
The dark region has had subtracted from it the dark current generated in the mas
k area by the above procedure. It should be a nominal zero value except for drif
t and temperature change during imaging
Step 1. Average the last twelve columns of each line and produce a floating poin
t array of n lines long.
Step 2. Apply an 11 point smoothing to this dark array. [I have tried a number o
f different smoothing approaches including using median and averaging of differe
nt lengths. For the recent dark images the 11 point smoothing produced the minim
um observable degradation.]
Step 3. Subtract the smoothed value from each line in the array.
The actual code used is given below.
What are the residual errors from this method?
1. The masked area pixels are closer to the hot amplifier than the image pi
xels. The temperature of the CCD will rise during imaging so insufficient dark c
urrent may not be removed.
2. There is an unexplained negative value in the binned area prior to the d
ark area. This is the biggest error. For bin 2 it is about 15-30 DN.
3. Other?
Essential algorithm extracted from code below
ave_lines,image,21,20+maskbinend,masked ;All columns in masked
for I = 0L,nlines-1 do a(0,i)=image(*,i)-masked ;all columns have masked
subtracted
ave_cols,image,nc-12,nc-1,dark
dark = smooth(dark,11)
for i = 0L,nlines-1 do a(12:(nc-17),i) = image(12:(nc-17),i)-dark(i)*bin
;Note bin not bin^2
for i = 0L,nlines-1 do a(0:12,i) = image(0:12,i)-dark(i)
for i = 0L,nlines-1 do a(nc-16:nc-1,i) = image(nc-16:nc-1,i)-dark(i)
In addition to those changes, some consideration has been given to
situations where bad missing (null) data exists in the mask and dark
calibration data. Bad data could occur in these areas when gaps
occur in the dowlink of the file from the spacecraft or other anomolies.
Also, LookUp Tables (LUTs) can cause data saturation if they are
not carefully considered prior to use.
In cases of missing data in the mask region, the minimum and maximum
of the data after averaging each column is computed. For low saturated
and null special pixels, the minimum mask average value is used. For high
saturation special pixels, the maximum is used.
For the dark pixel calibration data, an 11 pixel wide filter is applied after
averaging each line in this region. This replaces any missing data with
the average of the 11 pixel filter. If data is wider than 11 pixels in this
data, nulling of image data will result.
Under any condition valid data is nulled due to insufficent calibration data
in either region, hiclean terminates with and error. The resulting output
files is retained, however - just in case it is useable.
Kris Becker | 2005-12-19 |
Original Version
|
Kris Becker | 2006-02-19 |
Discovered an off-by-one index issue when computing drift
correction. It amounted to approximately 2 DN difference.
|
Kris Becker | 2006-03-14 |
Changed to use the median statistic for computations involving
calibration. The average is still used to gather quantitative
data on the radiometric calibration process.
|
Elizabeth Miller | 2006-06-21 |
Modified the cleaning sequence and added the propagation of
the cleaned blobs
|
Kris Becker | 2006-08-04 |
There was a bug in how the line-by-line cleaning was being performed.
Basically, drift correction for all lines were done using dark and buffer
statistics from the first line. Also, the 100 line filter was not being used
in the drift correction. These problems have been fix. This fix has also
nearly halved the processing time.
Image statistics are now added to the Application log file instead of
standard output.
|
Kris Becker | 2006-10-26 |
This version is a nearly complete rewrite based upon a simplified
version of an Alan Delamere algorithm.
It also targets bloody IR10_1 and avoids using the last 2000 lines
or so of calibration data, propagating the last occuring dark current
drift.
Furthermore, it will terminate with an error if any valid data is NULLed
due to bad calibration, which can occur in gaps or bad LUTing.
|
Kris Becker | 2006-11-06 |
Not enough lines in IR10_1 were being ignored in the dark current drift
corection. Changed 2000 to 3100.
|
Kris Becker | 2006-11-22 |
Separately count nulls induced through mask and dark correction and
report them to user and add to labels. Also throws a Math error when
either of these counts are not zero. This can be detected when the
exit status is 9. The ouput TO image is retained for further use when
this condition is raised so decisions can be made as to its usefulness.
|
Steven Lambright | 2008-05-12 |
Removed references to CubeInfo
|