Index: [thread] [date] [subject] [author]
  From: Borries Demeler <demeler@bioc09.uthscsa.edu>
  To  : rasmb@bbri.harvard.edu
  Date: Wed, 2 Jun 1999 10:33:34 -0500 (CDT)

Re: radial step intervals in the XL scanning abs optics

> In other words, the ACTUAL mean value was 2.72 micrometres, with a standard 
> deviation of 1.47 micrometres, and individual values varying between 1 and 6 
> micrometres !!!  Oddly enough, the MEDIAN value is almost precisely 2 
> micrometres.
> 
>  I should say we have our XL-A regularly serviced, and the slit scanning system was 
> specifically checked (and its radial calibration) not long ago.
> 
> What is the general experience here of XL users ?  Is this just one of those things 
> one has to put up with ?

Arthur,
that is normal behavior. According to the way it was explained to me it
is impossible to accurately position the slit every 0.001 cm, so the best
one can do is to accurately measure where the slit was moved to by the
stepping motor, and that is the number that gets reported. Tom, others?
Please correct me if that's wrong.

You *do* have some control over the average step size, by changing
the radial step size in the data acquisition program. At the highest
possible resolution setting of 0.001 cm, we see an average of 0.0014 -
0.0016 cm spacings.

It's OK to remap the scans for most analysis methods, although the 
statistics may show up with a smaller sigma afterwards. An algorithm
to do that is attached below.

Regards, -Borries

/***************************************************************************\
* Here is the algorithm that is used in UltraScan. It allows you to        * 
* "fill in the holes" for a given delta-R to produce uniformly spaced      *
* radial intervals in each scan (slightly modified from original version): *
\***************************************************************************/

// remap radial scans: 

register i;         // loop counter over points
int points;         // total points in adjusted scan
register scan;      // loop counter over scans 
int total_scans;    // total number of scans
int *count;         // int vector for # of datapoints in each original scan
float range_right;  // radial limit on the right
float range_left;   // radial limit on the left
float delta_r;      // radial step size, user selectable, default = 0.001 cm
float new_rad;      // temporary radius position
float **radius;     // original radius value
float **absorbance; // original absorbance value
float new_point;    // new absorbance value
float m;            // slope of linear fit
float b;            // intercept of linear fit
int init_data();

int exit_state = init_data(); // initialize data, allocate memory for arrays 
                              // and read scan files
                              // init_data() is user supplied

if (exit_state)  // any errors in init_data?
{
   points = 1 + (int) ((float range_right - float range_left)/float delta_r);
   for (scan=0; scan<total_scans; scan++)
   {
      for (i=0; i<points; i++)
      {
         new_rad = range_left + i * delta_r;
         // only compare the first 3 significant digits
         // Sometimes there are increments smaller than 0.001, skip'em:
         while ((int) (radius[scan][count[scan]] * 1000) 
                < (int) (new_rad * 1000))
         {
            count[scan] ++;
         }
            if ((int) (radius[scan][count[scan]] * 1000) 
                == (int) (new_rad * 1000))
            {
               // output original absorbance value
               // replace by appropriate file descriptor:
               cout << (float) (absorbance[scan][count[scan]]); 
               count[scan] ++;
            }
            else
            {
               // if we are at the beginning of the scan, and the 
               // first datapoints is past "new_rad", fill in with 
               // the first data point's value:
               if (count[scan] == 0)
               {
                  new_point = absorbance[scan][0];
                  // if we are in the middle of the scan, linearly 
                  // interpolate missing datapoints (new_point = m * rad + b)
                  // make sure that we are not outside bounds
                  if ((count[scan] < points[scan] - 1) && (count[scan] > 0))
                  m = (absorbance[scan][count[scan]] - 
                       absorbance[scan][count[scan]-1]) /
                      (radius[scan][count[scan]] - 
                       radius[scan][count[scan]-1]);
                  b = absorbance[scan][count[scan]] - 
                      m * radius[scan][count[scan]];
                  new_point = m * new_rad + b;
               }
               if (count[scan] == points[scan] - 1)
               {
                  // we are at the end of the scan:
                  new_point = absorbance[scan][points[scan]-1]; 
               }
               // output aligned absorbance
               // replace by appropriate file descriptor:
               cout << new_point; 
            }
         }
      }
   }
}
// radial values are reproduced with range_left/right and delta_r.

Index: [thread] [date] [subject] [author]