The LISST-ST is programmed to store data from many successive settling experiments. Each settling experiment, by default, lasts one full day, though the length of the experiment can be modified. Data for a single settling experiment
consist of: a header of length 12 or 80 bytes, and a set of n_tsteps scans (default n_tsteps = 83). Each scan consists of 40 variables, each of 2 bytes. In short, a single experiment consists of:
- A header (12 or 80 bytes)
- 83 scans of 40 variables, each 2-byte long (or other than 83, if modified by user).
MATLAB processing consists of the following steps:
- Reading the entire datafile as a one-dimensional array using the tt2mat function.
- Separating the array into many arrays, each corresponding to a single settling experiment
- Identifying the header for each experiment, and rearranging the remaining part of the array into a 2-d array of size n_tsteps x 40.
- Loading a background file
- Computing optical transmission history
- Computing the scattering by removing the background; edit bad data points.
- Correcting the scattering for detector calibration
- Inverting the corrected scattering for volume concentration in 8 size-bins (see Application Note L008 for why only 8 size classes are used).
- Loading a file containing the data sampling times, t_samp.asc
- From the history of concentration of each of 8 size classes, using a best-fit ideal form, finding a settling time Ts. This uses the function findsv.m
- Saving the median sizes and corresponding settling velocity.
- Processing the next settling experiment.
In the example on the back, the datafile name needs to be defined, as also the names of the background file, and the ring area file.
The following functions and files must be in your path (we recommend placing these in your work folder within MATLAB):
tt2mat.m |
reads a binary datafile |
nlia.dll |
inverts corrected scattering to get size-distribution |
lowresc.m |
inversion of scattering |
findsv.m |
computes settling velocity |
m8x8v_b.mat |
matrix for type-B instrument |
m8x8v_c.mat |
matrix for type-C instrument |
t_samp.asc |
sampling times, ascii file |
As the processing proceeds, 4 graphs are displayed for each settling experiment. The first is the history of optical transmission. This graph should indicate a continuous increase in optical transmission, ending near 1. If the transmission record does not reach near unity, the experiment probably did not go long enough. The second graph is the history of corrected scattering itself.
Here, you will see the rapid decline of scattering at inner rings with time, but a slower decline at the outer rings of the detector. The third graph has 8 subplots. Each subplot shows the history of a size class, beginning with the smallest size at top left, going across to the right and then below. On each
history, a fitted idealized form is shown that was used to find the settling time. Often, when large particles are absent or in very small numbers, the history of concentration for these will be noisy. Use this information to accept or discard the estimate. Finally, a log-plot of settling velocity is displayed against diameter of particles.
A typical run is shown below (we show number of time steps reduced from default 83 to 72 in the example; text following the % sign are explanatory comments):
filename=’pacific.dat’; |
|
n_tsteps=72; |
% number of time steps in the settling experiment |
iheader=40; |
% bytes in header; 12, or 80; use 6 or 40 here; see .TTB program. |
stdata=tt2mat(filename,iheader+40*n_tsteps); |
% load the data file |
[r,c]=size(stdata); |
% get size of datafile |
nexpt=r; |
% number of settling experiments performed |
load X1044zsca.asc |
% load zscat file |
zsc=X1044zsca; |
% convenience, just rename the variable to zsc |
(or, if a binary file, use) |
|
zsc=mean(tt2mat(‘x2403zs.dat’,40)); |
|
[r,c]=size(zsc); |
|
if(r==1 & c==40) |
|
zsc=zsc’; |
|
end |
|
r=zsc(33)/zsc(36); |
% ratio of clean-water laser power to laser reference |
dcal=load ringarea.asc |
%load ringarea file |
load t_samp.asc |
% file containing sampling times |
|
% process data, one settling experiment at a time; |
for i_expt=1:nexpt |
|
d=stdata(i_expt,:); |
|
header=d(1:iheader),d(1:iheader)=[]; |
|
d=(reshape(d,40,n_tsteps))’; |
% convert data to proper format n_tsteps x 40 |
[r1,c]=size(d); |
|
tau=d(:,33)./r./d(:,36); |
|
semilogx(t_samp(1:n_tsteps)/100,tau) |
|
title([‘Optical Transmission History for Expt. # ‘,num2str(i_expt)]),pause(2) |
|
|
|
for j=1:r1 |
|
scat(j,:)=d(j,1:32)/tau(j)-zsc(1:32)’; |
% subtract zscat from each scan |
cscat(j,:)=scat(j,:).*dcal; |
% apply detector calibration ; |
cscat(j,:)=cscat(j,:)*d(j,36)/zsc(36); |
% correction for laser output drift |
vd8(j,:)=lowresc(cscat(j,:),3); |
% compute size-distribution; UNCALIBRATED |
end |
|
plot(cscat’),title([‘Corrected Scattering, Expt. no. ‘,num2str(i_expt)]),pause(2) |
|
|
|
sv(i_expt,:)=findsv(vd8,n_tsteps,3); |
% compute settling velocity; figures show history, fits |
title(‘Concentration histories’),pause(3),clf |
|
end |
|
|
|
load dias8c.asc |
% load diameters, dias8b.asc for type-B |
loglog(dias8c,sv,’*’) |
|
title(‘Settling velocity Spectrum’), xlabel(‘Size, microns’),ylabel(‘Settling Velocity,cm/s’) |
|
save resultsxxx.asc –ascii sv dias8c |
% save settling velocity and diameters in ascii file |
|
|
For further information, please email us! |