forked from gabrielapilo/ArgoRealTimeSource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbcal_extract.m
executable file
·55 lines (50 loc) · 1.87 KB
/
bcal_extract.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% bcal_extract
%
% This is designed to extract a single set of calibration coeffs for
% backscatter calculations because there are so many versions with
% different wavelengths even on a single flato (the record at this point
% is 4).
%
% usage: bcoeff=bcal_extract(bc,wv)
% where bc is the cal coeff set for a single float
% and wv is the wavelength of the required sensor
% note the current wavelengths are:
% 700 (the main one found on both the FLTNU and FLBB2 sensors)
% 532 (found on the FLBB2 sensors)
% All Eco sensors are denoted as 'xxx.2' so their cal coeffs can be
% identified:
% 470.2 (found on the eco puck sensors)
% 700.2 (found on the eco sensors and duplicating teh wavelength of
% another sensor on the same flaot so this will be the SECOND version in
% all data files.
% 532.2 (similarly, an eco sensor that duplicates an FLBB sensor so
% needs to be distinguishable)
function bcoef = bcal_extract(bc,wv)
if wv==700 % primary 700nm sensors on FLBB and FLBB2 instruments
b.FLBBdc=bc.FLBB700dc;
b.FLBBscale=bc.FLBB700scale;
b.BBPangle=bc.BBP700angle;
b.BBPChi=bc.BBP700Chi;
elseif wv==532 %secondary sensor on FLBB2 instruments
b.FLBBdc=bc.FLBB532dc;
b.FLBBscale=bc.FLBB532scale;
b.BBPangle=bc.BBP532angle;
b.BBPChi=bc.BBP532Chi;
elseif wv==470.2 %secondary sensor on FLBB2 instruments
b.FLBBdc=bc.EcoFLBB470dc;
b.FLBBscale=bc.EcoFLBB470scale;
b.BBPangle=bc.EcoFLBB470angle;
b.BBPChi=bc.EcoFLBB470Chi;
elseif wv==700.2 %secondary sensor on FLBB2 instruments
b.FLBBdc=bc.EcoFLBB700dc;
b.FLBBscale=bc.EcoFLBB700scale;
b.BBPangle=bc.EcoFLBB700angle;
b.BBPChi=bc.EcoFLBB700Chi;
elseif wv==532.2 %secondary sensor on FLBB2 instruments
b.FLBBdc=bc.EcoFLBB532dc;
b.FLBBscale=bc.EcoFLBB532scale;
b.BBPangle=bc.EcoFLBB532angle;
b.BBPChi=bc.EcoFLBB532Chi;
end
bcoef = b;
return