close all
clear all

addpath(genpath('/Users/Mau/Documents/MATLABhelp_new/'));

path_data='/Users/Mau/Documents/MBARIprojects/MR/TurbulenceData/TankTests/20211005/';
cd(path_data)

fname='DAT_013';

% extract_setupstr(fname,'setup_new.cfg'); % setup_new.cfg is empty?
patch_setupstr(fname,'./from_Evan/setupMBARI_CPF.cfg'); % to Embed the configuration string in the file


% [P records]=show_P(fname);
% plot(record,P);


%% 
load('/Users/Mau/Documents/MBARIprojects/MR/TurbulenceData/TankTests/20211004/from_Evan/ql_info.mat'); % load ql_info structure from Evan to reproduce his plots.

%
Pn=2;
q=quick_look(fname, 2 , 9, ql_info, 'profile_num', Pn);

%% save Figures

fig=figure(1);
print_setup(60,30)
print(fig,['Pressure_vs_Time_p',num2str(Pn),'.jpg'],'-djpeg');

%%
fig=figure(2);
print_setup(30,40)
print(fig,['Incl_and_PlatformVelocity_p',num2str(Pn),'.jpg'],'-djpeg');

%%
fig=figure(3);
print_setup(30,50)
print(fig,['vibrations_p',num2str(Pn),'.jpg'],'-djpeg');

%%
fig=figure(4);
print_setup(40,30)
print(fig,['all_channels_p',num2str(Pn),'.jpg'],'-djpeg');

%%
fig=figure(5);
print_setup(50,30)
print(fig,['Spectra_full_profile_p',num2str(Pn),'.jpg'],'-djpeg');

%%
fig=figure(6);
print_setup(30,50)
print(fig,['epsilon_p',num2str(Pn),'.jpg'],'-djpeg');


%% Other quick ways to visualize data

show_ch(fname,'P')

show_ch(fname,'Ax')