Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CTD_Chipod/mfiles/CalibrateChipodCTD.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
loglog(f,p2,f,p,'linewidth',2);
axis tight
grid on
legend('digital','analog','location','best')
try
legend('digital','analog','location','best','AutoUpdate','off')
catch
legend('digital','analog','location','best');
end
xlabel('Frequency [hz]')
title(['Spectra of dT/dt - \tau =' num2str(chidat.cal.coef.T1P)])
ylabel('\Phi_{T_z} [^oC^2/s^{-2}]')
Expand Down Expand Up @@ -114,7 +118,11 @@
loglog(f,p2,f,p,'linewidth',2);
axis tight
grid on
legend('digital','analog','location','best')
try
legend('digital','analog','location','best','AutoUpdate','off')
catch
legend('digital','analog','location','best');
end
xlabel('Frequency [hz]')
title(['T2- Spectra of dT/dt - \tau =' num2str(chidat.cal.coef.T1P)])
ylabel('\Phi_{T_z} [^oC^2/s^{-2}]')
Expand Down
10 changes: 6 additions & 4 deletions CTD_Chipod/mfiles/MakeCasts_CTDchipod_function.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@ function MakeCasts_CTDchipod_function(the_project,mixpath)
savedir_cal = fullfile(chi_proc_path_specific,'cal') ;
ChkMkDir(savedir_cal)

% Plot the raw CTD data
ax = PlotRawCTD(CTD_24hz) ;
print(fullfile(chi_fig_path_specific,[whSN '_Cast_' castStr '_Fig0_RawCTD']),'-dpng')

if ~exist(fullfile(chi_fig_path_specific,[whSN '_Cast_' castStr '_Fig0_RawCTD.png']),'file')
% Plot the raw CTD data
ax = PlotRawCTD(CTD_24hz) ;
print(fullfile(chi_fig_path_specific,[whSN '_Cast_' castStr '_Fig0_RawCTD']),'-dpng')
end

try

%~~ Load chipod data
Expand Down
15 changes: 12 additions & 3 deletions CTD_Chipod/mfiles/PlotChipodDataRaw_General.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ function PlotChipodDataRaw_General(the_project,mixpath)

clear data head chidat
close all


if saveplot==1
figdir = fullfile(fig_path,'chipodraw',whSN);
figname = [chi_file_list(whfile).name(1:end-4)] ;
if exist(fullfile(figdir,[figname,'.png']),'file')
disp([figname,' has already been plotted; skipping...'])
continue;
end
end

%~~~ load chipod data
try
% 'big' chipod
Expand Down Expand Up @@ -175,9 +184,9 @@ function PlotChipodDataRaw_General(the_project,mixpath)
end

if saveplot==1
figdir = fullfile(fig_path,'chipodraw',whSN);
% figdir = fullfile(fig_path,'chipodraw',whSN);
ChkMkDir(figdir)
figname = [chi_file_list(whfile).name(1:end-4)] ;
% figname = [chi_file_list(whfile).name(1:end-4)] ;
print( fullfile(figdir,figname),'-dpng')
end

Expand Down
8 changes: 8 additions & 0 deletions CTD_Chipod/mfiles/Plot_TP_profiles_EachCast_CTDchipod.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ function Plot_TP_profiles_EachCast_CTDchipod(the_project)
waitbar(icast/Ncasts,hb)
castname=CTDlist(icast).name(1:end-4)

if saveplot==1
figdir=fullfile(BaseDir_data,'Figures','TPprofiles_AllSN');
if exist(fullfile(figdir,['TP_profs_' castname '.png']),'file')
disp('Figure already plotted')
continue;
end
end

% Set up figure
figure(1);clf
agutwocolumn(1)
Expand Down
4 changes: 2 additions & 2 deletions CTD_Chipod/mfiles/do_chi_calc_ctd_chipod.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function do_chi_calc_ctd_chipod(the_project,mixpath,varargin)
ylabel('P [db]')
xlabel('# good data windows')
title([whSN ' cast ' castStr ' - ' C.castdir 'cast'],'interpreter','none')
print('-dpng',fullfile(chi_fig_path_specific,[whSN '_' castStr '_Fig' num2str(whfig) '_' C.castdir 'cast_chi_' whsens '_avgPhist']))
print('-dpng',fullfile(chi_fig_path_specific,[whSN '_Cast_' castStr '_Fig' num2str(whfig) '_' C.castdir 'cast_chi_' whsens '_avgPhist']))
whfig=whfig+1;
end

Expand Down Expand Up @@ -321,7 +321,7 @@ function do_chi_calc_ctd_chipod(the_project,mixpath,varargin)
title([whSN],'interpreter','none')
axes(ax(3))
title(['Sensor ' whsens])
print('-dpng',fullfile(chi_fig_path_specific,[whSN '_' castStr '_Fig' num2str(whfig) '_' C.castdir 'cast_chi_' whsens '_avg_chi_KT_dTdz']))
print('-dpng',fullfile(chi_fig_path_specific,[whSN '_Cast_' castStr '_Fig' num2str(whfig) '_' C.castdir 'cast_chi_' whsens '_avg_chi_KT_dTdz']))
whfig=whfig+1;
%~~~

Expand Down
17 changes: 17 additions & 0 deletions CTD_Chipod/mfiles/ezpc.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,21 @@
x=varargin{1};y=varargin{2};var=varargin{3};
end

% added by EPA, Mar 2022:

if numel(y)>length(y)
y=y(:,1);
end
if numel(x)>length(x)
x=x(1,:);
end
good_x=find(~isnan(x));
x=x(good_x);
var=var(:,good_x);
newx=[(3*x(1)-x(2)),(x(1:end-1)+x(2:end)),(x(end)*3-x(end-1))]/2;
[x,y]=meshgrid(newx,y);
var=[var,nan(length(y),1)];

% back to original programming:

h=pcolor(x,y,var);shading flat;axis ij