|This MATLAB script allows the LISST-100 or LISST-100X user to compute the part of the forward scattering coefficient, bf, covered by the angle ranges of the LISST-100X. See the application note ‘Angles for LISST-100X VSF measurement in WATER’ for details about the angles covered by a type B and a type C LISST.
To use the script below, copy the lines between the —– and save it as get_bf.m in your MATLAB editor. You will also need the getscat.m script.
% Function to estimate bf directly
% Created 10/06/03 YCA
% Mod to include path and feedback resistor type 02/20/04 YCA
% Based on paper by YCA in L&O: The optical volume scattering function: temporal and vertical variability inthe water column off the New Jersey Coast. Limnology and Oceanography 50: 1787–1794.
% datafile: Your LISST-100/-100X .DAT datafile
% zscfile: Your LISST-100/-100X zscat file, usually with .ASC extension (if obtained with the LISST-SOP software)
% dcal_file: Your LISST-100X RingArea_xxxx.ASC file, where xxxx is serial number
% HK3Scale: mW laser power entering water per digital count in factory zscat variable 36; Look it up in LISST.INI for your serial #.
% HK4Scale,HK4Off: pressure scales and offsets for calibration of pressure sensor. Look it up in LISST.INI for your serial #.
% path_cm: path length in cm, usually 5 for a LISST-100/-100X
% X: set X = 1 for a LISST-100X, any other value for a LISST-100
% OAM edits 12/09/08 to correct error for dividing by zscat laser reference when computing P0.
% OAM edits 4/4/11 to minor unnecessary pre-allocations etc.
[scat,tau,zsc,data,cscat]=getscat(datafile,zscfile,X,ringareafile);%use getscat to obtain the scattering and tau
dcal=load(ringareafile);%load ringarea file
if(r==40 && c==1);%if there’s only one measurement
laserPowerEnteringWater = data(:,36).*HK3Scale;%this is now laser power entering water, in units of mW
press = data(:,37)*HK4Scale+HK4Off; %compute the depth in calibrated units of m using factory supplied constants from LISST.INI file
mins = fix(data(:,40)/100); secs=data(:,40)-100*mins; days=fix(data(:,39)/100); hours=data(:,39)-100*days; %compute time
time = days+hours/24+mins/(24*60)+secs/(24*60*60); %create decimal date/time
% Compute forward scattering coefficient up to max range covered by LISST.
bf(i)=3.2e-4*sum(cscat(i,:)); % division by tau already done in computing scat; at this stage b has units of mW/m. Constant of 3.2e-4 is from combining detector gains with resistivity and silicon sensitivity
bf(i)=(bf(i)/laserPowerEnteringWater(i))*5/path;% units are 1/m after dividing by P0. It is assumed that the path length is 5 cm, so adjust wiht proper ratio if this is not the case.
c=-20*log(tau).*5/path;%compute beam attenuation, again adjusting for cases where the path is different from 5 cm.
%3.2e-4 assumes 5V/4095 counts – for LISST-100X it is different so correct
%(if necessary) as follows
if X==1;%In case of LISST-100X
volts = 2.5;
else%in case of LISST-100
volts = 5;
bf=bf*volts/5;% Correct if necessary
a=c-bf;%In principle this is now absorption