function varargout = Auswertung_CD_GUI_TOOL(varargin)
% AUSWERTUNG_CD_GUI_TOOL M-file for Auswertung_CD_GUI_TOOL.fig
%      AUSWERTUNG_CD_GUI_TOOL, by itself, creates a new AUSWERTUNG_CD_GUI_TOOL or raises the existing
%      singleton*.
%
%      H = AUSWERTUNG_CD_GUI_TOOL returns the handle to a new AUSWERTUNG_CD_GUI_TOOL or the handle to
%      the existing singleton*.
%
%      AUSWERTUNG_CD_GUI_TOOL('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in AUSWERTUNG_CD_GUI_TOOL.M with the given input arguments.
%
%      AUSWERTUNG_CD_GUI_TOOL('Property','Value',...) creates a new AUSWERTUNG_CD_GUI_TOOL or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Auswertung_CD_GUI_TOOL_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Auswertung_CD_GUI_TOOL_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to pushbutton1 (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Auswertung_CD_GUI_TOOL

% Last Modified by GUIDE v2.5 09-Feb-2009 15:32:06

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Auswertung_CD_GUI_TOOL_OpeningFcn, ...
                   'gui_OutputFcn',  @Auswertung_CD_GUI_TOOL_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before Auswertung_CD_GUI_TOOL is made visible.
function Auswertung_CD_GUI_TOOL_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Auswertung_CD_GUI_TOOL (see VARARGIN)

%Window in the middle of screen
h_Auswertung_CD_GUI_TOOL = findobj('Tag','Auswertung_CD_GUI_TOOL');
set(h_Auswertung_CD_GUI_TOOL,'Units','pixels');
scrsz = get(0,'ScreenSize');
default_pos=get(h_Auswertung_CD_GUI_TOOL,'Position');
figpos = [(scrsz(3)-default_pos(3))/2 (scrsz(4)-default_pos(4))/2 default_pos(3) default_pos(4)];
set(h_Auswertung_CD_GUI_TOOL,'Position',figpos);

load config_cd
set(handles.edit1_na_mes,'String',na_mes);
set(handles.edit15_na,'String',na);

set(handles.edit2_TC,'String',TC);
set(handles.edit3_SR,'String',SR);
set(handles.edit4_STHD,'String',STHD);
set(handles.edit5_LTE,'String',LTE);
set(handles.edit6_SW,'String',SW);

set(handles.edit7_TGRD1U,'String',TGRD1U);
set(handles.edit8_TGRD2U,'String',TGRD2U);
set(handles.edit9_TGRD1D,'String',TGRD1D);
set(handles.edit10_TGRD2D,'String',TGRD2D);

set(handles.edit11_bornes1,'String',bornes(1));
set(handles.edit12_bornes2,'String',bornes(2));
set(handles.edit13_FF,'String',FF);
set(handles.edit17_DRF,'String',DRF);

set(handles.edit18_bornes_QI_1,'String',bornes_QI_1);
set(handles.edit19_bornes_QI_2,'String',bornes_QI_2);
set(handles.edit20_FF_QI,'String',FF_QI);

set(handles.edit14_TOL,'String',TOL);

set(handles.edit22_cur_step_min_cd,'String',cur_step_min_cd);
set(handles.edit23_apraj,'String',apraj);
set(handles.edit24_aprbj,'String',aprbj);

set(handles.edit25_cur_step_min_qi,'String',cur_step_min_qi);
set(handles.edit26_afraj,'String',afraj);
set(handles.edit27_afrbj,'String',afrbj);

set(handles.edit28_TOL_GRD_CD,'String',TOL_GRD_CD);
set(handles.edit29_TIME_GRD_CD,'String',TIME_GRD_CD);

set(handles.radiobutton1_FFT,'Value',FFT);
set(handles.radiobutton2_FFT_check,'Value',FFT_check);
set(handles.radiobutton3_MMV,'Value',MMV);
set(handles.radiobutton4_plot_RS,'Value',plot_RS);
set(handles.radiobutton5_plot_CDU,'Value',plot_CDU);
set(handles.radiobutton6_plot_CDD,'Value',plot_CDD);

set(handles.radiobutton7_EVCD,'Value',EVCD);
set(handles.radiobutton8_EVQI,'Value',EVQI);
set(handles.radiobutton12_WCS,'Value',WCS);
set(handles.radiobutton13_NOCS,'Value',NOCS);

set(handles.radiobutton14_plot_QI_raw,'Value',plot_QI_raw);
set(handles.radiobutton15_plot_QI_eval,'Value',plot_QI_eval);

set(handles.radiobutton9_FFTQI,'Value',FFTQI);
set(handles.radiobutton10_FFT_check_QI,'Value',FFT_check_QI);
set(handles.radiobutton11_MMVQI,'Value',MMVQI);

if WCS==1;
    set(handles.edit22_cur_step_min_cd,'Visible','on');
    set(handles.edit23_apraj,'Visible','on');
    set(handles.edit24_aprbj,'Visible','on');
    
    set(handles.text24,'Visible','on');
    set(handles.text25,'Visible','on');
    set(handles.text26,'Visible','on');
    
    set(handles.edit4_STHD,'Visible','off');
    set(handles.edit5_LTE,'Visible','off');
    set(handles.edit6_SW,'Visible','off');
    
    set(handles.edit7_TGRD1U,'Visible','off');
    set(handles.edit8_TGRD2U,'Visible','off');
    set(handles.edit9_TGRD1D,'Visible','off');
    set(handles.edit10_TGRD2D,'Visible','off');
    
    set(handles.text4,'Visible','off');
    set(handles.text5,'Visible','off');
    set(handles.text6,'Visible','off');
    
    set(handles.text7,'Visible','off');
    set(handles.text8,'Visible','off');
    set(handles.text9,'Visible','off');
    set(handles.text10,'Visible','off');
    
else;
    set(handles.edit4_STHD,'Visible','on');
    set(handles.edit5_LTE,'Visible','on');
    set(handles.edit6_SW,'Visible','on');
    
    set(handles.edit7_TGRD1U,'Visible','on');
    set(handles.edit8_TGRD2U,'Visible','on');
    set(handles.edit9_TGRD1D,'Visible','on');
    set(handles.edit10_TGRD2D,'Visible','on');
    
    set(handles.text4,'Visible','on');
    set(handles.text5,'Visible','on');
    set(handles.text6,'Visible','on');
    
    set(handles.text7,'Visible','on');
    set(handles.text8,'Visible','on');
    set(handles.text9,'Visible','on');
    set(handles.text10,'Visible','on');
    
    set(handles.edit22_cur_step_min_cd,'Visible','off');
    set(handles.edit23_apraj,'Visible','off');
    set(handles.edit24_aprbj,'Visible','off');
    
    set(handles.text24,'Visible','off');
    set(handles.text25,'Visible','off');
    set(handles.text26,'Visible','off');
end;


% Choose default command line output for Auswertung_CD_GUI_TOOL
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Auswertung_CD_GUI_TOOL wait for user response (see UIRESUME)
% uiwait(handles.Auswertung_CD_GUI_TOOL);


% --- Outputs from this function are returned to the command line.
function varargout = Auswertung_CD_GUI_TOOL_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;



function edit1_na_mes_Callback(hObject, eventdata, handles)
% hObject    handle to edit1_na_mes (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1_na_mes as text
%        str2double(get(hObject,'String')) returns contents of edit1_na_mes as a double

load config_cd
na_mes = get(handles.edit1_na_mes,'String');
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit1_na_mes_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1_na_mes (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


function edit4_STHD_Callback(hObject, eventdata, handles)
% hObject    handle to edit4_STHD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4_STHD as text
%        str2double(get(hObject,'String')) returns contents of edit4_STHD as a double

load config_cd
STHD = str2num(char(get(handles.edit4_STHD,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit4_STHD_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4_STHD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit5_LTE_Callback(hObject, eventdata, handles)
% hObject    handle to edit5_LTE (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit5_LTE as text
%        str2double(get(hObject,'String')) returns contents of edit5_LTE as a double

load config_cd
LTE = str2num(char(get(handles.edit5_LTE,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit5_LTE_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit5_LTE (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit6_SW_Callback(hObject, eventdata, handles)
% hObject    handle to edit6_SW (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit6_SW as text
%        str2double(get(hObject,'String')) returns contents of edit6_SW as a double

load config_cd
SW = str2num(char(get(handles.edit6_SW,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit6_SW_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit6_SW (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit7_TGRD1U_Callback(hObject, eventdata, handles)
% hObject    handle to edit7_TGRD1U (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit7_TGRD1U as text
%        str2double(get(hObject,'String')) returns contents of edit7_TGRD1U as a double

load config_cd
TGRD1U = str2num(char(get(handles.edit7_TGRD1U,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit7_TGRD1U_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit7_TGRD1U (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit8_TGRD2U_Callback(hObject, eventdata, handles)
% hObject    handle to edit8_TGRD2U (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit8_TGRD2U as text
%        str2double(get(hObject,'String')) returns contents of edit8_TGRD2U as a double

load config_cd
TGRD2U = str2num(char(get(handles.edit8_TGRD2U,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit8_TGRD2U_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit8_TGRD2U (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit9_TGRD1D_Callback(hObject, eventdata, handles)
% hObject    handle to edit9_TGRD1D (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit9_TGRD1D as text
%        str2double(get(hObject,'String')) returns contents of edit9_TGRD1D as a double

load config_cd
TGRD1D = str2num(char(get(handles.edit9_TGRD1D,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit9_TGRD1D_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit9_TGRD1D (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit10_TGRD2D_Callback(hObject, eventdata, handles)
% hObject    handle to edit10_TGRD2D (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit10_TGRD2D as text
%        str2double(get(hObject,'String')) returns contents of edit10_TGRD2D as a double

load config_cd
TGRD2D = str2num(char(get(handles.edit10_TGRD2D,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit10_TGRD2D_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit10_TGRD2D (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit2_TC_Callback(hObject, eventdata, handles)
% hObject    handle to edit2_TC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2_TC as text
%        str2double(get(hObject,'String')) returns contents of edit2_TC as a double

load config_cd
TC = str2num(char(get(handles.edit2_TC,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit2_TC_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2_TC (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit3_SR_Callback(hObject, eventdata, handles)
% hObject    handle to edit3_SR (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3_SR as text
%        str2double(get(hObject,'String')) returns contents of edit3_SR as a double

load config_cd
SR = str2num(char(get(handles.edit3_SR,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit3_SR_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3_SR (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton1_FFT.
function radiobutton1_FFT_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton1_FFT (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton1_FFT

load config_cd
FFT=get(handles.radiobutton1_FFT,'Value');

if FFT==1;
    set(handles.radiobutton3_MMV,'Value',0);
else;
    set(handles.radiobutton3_MMV,'Value',1);
    set(handles.radiobutton2_FFT_check,'Value',0);
end;

MMV=get(handles.radiobutton3_MMV,'Value');
FFT_check=get(handles.radiobutton2_FFT_check,'Value');

clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton2_FFT_check.
function radiobutton2_FFT_check_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton2_FFT_check (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton2_FFT_check

load config_cd
FFT_check=get(handles.radiobutton2_FFT_check,'Value');

if FFT_check==1;
    set(handles.radiobutton3_MMV,'Value',0);
    set(handles.radiobutton1_FFT,'Value',1);
else;
    set(handles.radiobutton3_MMV,'Value',0);
    set(handles.radiobutton1_FFT,'Value',1);
end;

MMV=get(handles.radiobutton3_MMV,'Value');
FFT=get(handles.radiobutton1_FFT,'Value');

clear eventdata hObject handles
save config_cd

function edit11_bornes1_Callback(hObject, eventdata, handles)
% hObject    handle to edit11_bornes1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit11_bornes1 as text
%        str2double(get(hObject,'String')) returns contents of edit11_bornes1 as a double

load config_cd
bornes(1) = str2num(char(get(handles.edit11_bornes1,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit11_bornes1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit11_bornes1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit12_bornes2_Callback(hObject, eventdata, handles)
% hObject    handle to edit12_bornes2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit12_bornes2 as text
%        str2double(get(hObject,'String')) returns contents of edit12_bornes2 as a double

load config_cd
bornes(2) = str2num(char(get(handles.edit12_bornes2,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit12_bornes2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit12_bornes2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton3_MMV.
function radiobutton3_MMV_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton3_MMV (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton3_MMV

load config_cd
MMV=get(handles.radiobutton3_MMV,'Value');

if MMV==1;
    set(handles.radiobutton1_FFT,'Value',0);
    set(handles.radiobutton2_FFT_check,'Value',0);
else;
    set(handles.radiobutton1_FFT,'Value',1);
end;

FFT=get(handles.radiobutton1_FFT,'Value');
FFT_check=get(handles.radiobutton2_FFT_check,'Value');

clear eventdata hObject handles
save config_cd


function edit13_FF_Callback(hObject, eventdata, handles)
% hObject    handle to edit13_FF (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit13_FF as text
%        str2double(get(hObject,'String')) returns contents of edit13_FF as a double

load config_cd
FF = str2num(char(get(handles.edit13_FF,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit13_FF_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit13_FF (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit14_TOL_Callback(hObject, eventdata, handles)
% hObject    handle to edit14_TOL (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit14_TOL as text
%        str2double(get(hObject,'String')) returns contents of edit14_TOL as a double

load config_cd
TOL = str2num(char(get(handles.edit14_TOL,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit14_TOL_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit14_TOL (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton4_plot_RS.
function radiobutton4_plot_RS_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton4_plot_RS (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton4_plot_RS

load config_cd
plot_RS=get(handles.radiobutton4_plot_RS,'Value');
clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton5_plot_CDU.
function radiobutton5_plot_CDU_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton5_plot_CDU (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton5_plot_CDU

load config_cd
plot_CDU=get(handles.radiobutton5_plot_CDU,'Value');
clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton6_plot_CDD.
function radiobutton6_plot_CDD_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton6_plot_CDD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton6_plot_CDD

load config_cd
plot_CDD=get(handles.radiobutton6_plot_CDD,'Value');
clear eventdata hObject handles
save config_cd

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

load config_cd

dat = dlmread(na_mes, ';');

Time = dat(:,1);
PFU_RAW = dat(:,2);
FL = dat(:,3);
CUR = dat(:,5)./1000;

na_qi='Q-curve / I-curve';
na_fl='Evaluation QI-curve';


%Filter claculation -------------------------------------------------------

%FFT Filter for PFU
if FFT==1;
    if FFT_check==1;
        signal(:,1)=Time;
        signal(:,2)=PFU_RAW;
        PFU=filt_perso(signal);
    else
        signal(:,1)=Time;
        signal(:,2)=PFU_RAW;
        PFU=filt_perso(signal,bornes);
    end
else;
    PFU=PFU_RAW;
end;

%MMV Filter for PFU
if MMV==1;
    h=waitbar(0,'PFU Filter Calculation');
    z=0;
    for o=1:FF:length(PFU)-FF;
        z=z+1;
        PFUFIL(z)=mean(PFU(o:o+FF));      %PFU Filter
        TIMEFIL(z)=Time(o);
        waitbar(o./length(Time));
    end;
    close(h);
else
    PFUFIL=PFU(1:DRF:end);
    TIMEFIL=Time(1:DRF:end);
end;

if EVQI == 1 | WCS ==1;
    %MMV Filter for Current and Flow
    if MMVQI==1;
        h=waitbar(0,'Flow/Current Filter Calculation');
        z=0;
        for o=1:FF_QI:length(CUR)-FF_QI;
            z=z+1;
            CURFIL(z)=mean(CUR(o:o+FF_QI));      %CUR Filter
            FLFIL(z)=mean(FL(o:o+FF_QI));        %FLOW Filter
            T_FIL(z)=Time(o);
            waitbar(o./length(Time));
        end;
        close(h);
    else;
        if FFT_check_QI==1;
            signal_fl(:,1)=Time;
            signal_fl(:,2)=FL;
            signal_cur(:,1)=Time;
            signal_cur(:,2)=CUR;
            FLFIL=filt_perso(signal_fl);     %CUR Filter
            CURFIL=filt_perso(signal_cur);   %FLOW Filter
            T_FIL=Time;
        else;
            bornes(1)=bornes_QI_1;
            bornes(2)=bornes_QI_2;
            signal_fl(:,1)=Time;
            signal_fl(:,2)=FL;
            signal_cur(:,1)=Time;
            signal_cur(:,2)=CUR;
            FLFIL=filt_perso(signal_fl,bornes);     %CUR Filter
            CURFIL=filt_perso(signal_cur,bornes);   %FLOW Filter
            T_FIL=Time;
        end;
    end;
else;
end;


if EVCD == 1;
    Auswertung_CD_GUI
end;

if EVQI == 1;
    Auswertung_QI_GUI
end;

function edit15_na_Callback(hObject, eventdata, handles)
% hObject    handle to edit15_na (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit15_na as text
%        str2double(get(hObject,'String')) returns contents of edit15_na as a double

load config_cd
na = get(handles.edit15_na,'String');
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit15_na_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit15_na (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit17_DRF_Callback(hObject, eventdata, handles)
% hObject    handle to edit17_DRF (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit17_DRF as text
%        str2double(get(hObject,'String')) returns contents of edit17_DRF as a double

load config_cd
DRF = str2num(char(get(handles.edit17_DRF,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit17_DRF_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit17_DRF (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton9_FFTQI.
function radiobutton9_FFTQI_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton9_FFTQI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton9_FFTQI

load config_cd
FFTQI=get(handles.radiobutton9_FFTQI,'Value');

if FFTQI==1;
    set(handles.radiobutton11_MMVQI,'Value',0);
else;
    set(handles.radiobutton11_MMVQI,'Value',1);
    set(handles.radiobutton10_FFT_check_QI,'Value',0);
end;

MMVQI=get(handles.radiobutton11_MMVQI,'Value');
FFT_check_QI=get(handles.radiobutton10_FFT_check_QI,'Value');

clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton10_FFT_check_QI.
function radiobutton10_FFT_check_QI_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton10_FFT_check_QI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton10_FFT_check_QI

load config_cd
FFT_check_QI=get(handles.radiobutton10_FFT_check_QI,'Value');

if FFT_check_QI==1;
    set(handles.radiobutton11_MMVQI,'Value',0);
    set(handles.radiobutton9_FFTQI,'Value',1);
else;
    set(handles.radiobutton11_MMVQI,'Value',0);
    set(handles.radiobutton9_FFTQI,'Value',1);
end;

MMVQI=get(handles.radiobutton11_MMVQI,'Value');
FFTQI=get(handles.radiobutton9_FFTQI,'Value');

clear eventdata hObject handles
save config_cd

function edit18_bornes_QI_1_Callback(hObject, eventdata, handles)
% hObject    handle to edit18_bornes_QI_1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit18_bornes_QI_1 as text
%        str2double(get(hObject,'String')) returns contents of edit18_bornes_QI_1 as a double

load config_cd
bornes_QI_1 = str2num(char(get(handles.edit18_bornes_QI_1,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit18_bornes_QI_1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit18_bornes_QI_1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit19_bornes_QI_2_Callback(hObject, eventdata, handles)
% hObject    handle to edit19_bornes_QI_2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit19_bornes_QI_2 as text
%        str2double(get(hObject,'String')) returns contents of edit19_bornes_QI_2 as a double

load config_cd
bornes_QI_2 = str2num(char(get(handles.edit19_bornes_QI_2,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit19_bornes_QI_2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit19_bornes_QI_2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton11_MMVQI.
function radiobutton11_MMVQI_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton11_MMVQI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton11_MMVQI

load config_cd
MMVQI=get(handles.radiobutton11_MMVQI,'Value');

if MMVQI==1;
    set(handles.radiobutton9_FFTQI,'Value',0);
    set(handles.radiobutton10_FFT_check_QI,'Value',0);
else;
    set(handles.radiobutton9_FFTQI,'Value',1);
end;

FFTQI=get(handles.radiobutton9_FFTQI,'Value');
FFT_check_QI=get(handles.radiobutton10_FFT_check_QI,'Value');

clear eventdata hObject handles
save config_cd

function edit20_FF_QI_Callback(hObject, eventdata, handles)
% hObject    handle to edit20_FF_QI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit20_FF_QI as text
%        str2double(get(hObject,'String')) returns contents of edit20_FF_QI as a double

load config_cd
FF_QI = str2num(char(get(handles.edit20_FF_QI,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit20_FF_QI_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit20_FF_QI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton12_WCS.
function radiobutton12_WCS_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton12_WCS (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton12_WCS

load config_cd
WCS=get(handles.radiobutton12_WCS,'Value');

if WCS==1;
    set(handles.radiobutton13_NOCS,'Value',0);
    
    set(handles.edit22_cur_step_min_cd,'Visible','on');
    set(handles.edit23_apraj,'Visible','on');
    set(handles.edit24_aprbj,'Visible','on');
    
    set(handles.text24,'Visible','on');
    set(handles.text25,'Visible','on');
    set(handles.text26,'Visible','on');
    
    set(handles.edit4_STHD,'Visible','off');
    set(handles.edit5_LTE,'Visible','off');
    set(handles.edit6_SW,'Visible','off');
    
    set(handles.edit7_TGRD1U,'Visible','off');
    set(handles.edit8_TGRD2U,'Visible','off');
    set(handles.edit9_TGRD1D,'Visible','off');
    set(handles.edit10_TGRD2D,'Visible','off');
    
    set(handles.text4,'Visible','off');
    set(handles.text5,'Visible','off');
    set(handles.text6,'Visible','off');
    
    set(handles.text7,'Visible','off');
    set(handles.text8,'Visible','off');
    set(handles.text9,'Visible','off');
    set(handles.text10,'Visible','off');
    
else;
    set(handles.radiobutton13_NOCS,'Value',1);
    
    set(handles.edit4_STHD,'Visible','on');
    set(handles.edit5_LTE,'Visible','on');
    set(handles.edit6_SW,'Visible','on');
    
    set(handles.edit7_TGRD1U,'Visible','on');
    set(handles.edit8_TGRD2U,'Visible','on');
    set(handles.edit9_TGRD1D,'Visible','on');
    set(handles.edit10_TGRD2D,'Visible','on');
    
    set(handles.text4,'Visible','on');
    set(handles.text5,'Visible','on');
    set(handles.text6,'Visible','on');
    
    set(handles.text7,'Visible','on');
    set(handles.text8,'Visible','on');
    set(handles.text9,'Visible','on');
    set(handles.text10,'Visible','on');
    
    set(handles.edit22_cur_step_min_cd,'Visible','off');
    set(handles.edit23_apraj,'Visible','off');
    set(handles.edit24_aprbj,'Visible','off');
    
    set(handles.text24,'Visible','off');
    set(handles.text25,'Visible','off');
    set(handles.text26,'Visible','off');
end;

NOCS=get(handles.radiobutton13_NOCS,'Value');

clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton13_NOCS.
function radiobutton13_NOCS_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton13_NOCS (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton13_NOCS

load config_cd
NOCS=get(handles.radiobutton13_NOCS,'Value');

if NOCS==1;
    set(handles.radiobutton12_WCS,'Value',0);
    set(handles.radiobutton8_EVQI,'Value',0);
    
    set(handles.edit4_STHD,'Visible','on');
    set(handles.edit5_LTE,'Visible','on');
    set(handles.edit6_SW,'Visible','on');
    
    set(handles.edit7_TGRD1U,'Visible','on');
    set(handles.edit8_TGRD2U,'Visible','on');
    set(handles.edit9_TGRD1D,'Visible','on');
    set(handles.edit10_TGRD2D,'Visible','on');
    
    set(handles.text4,'Visible','on');
    set(handles.text5,'Visible','on');
    set(handles.text6,'Visible','on');
    
    set(handles.text7,'Visible','on');
    set(handles.text8,'Visible','on');
    set(handles.text9,'Visible','on');
    set(handles.text10,'Visible','on');
    
    set(handles.edit22_cur_step_min_cd,'Visible','off');
    set(handles.edit23_apraj,'Visible','off');
    set(handles.edit24_aprbj,'Visible','off');
    
    set(handles.text24,'Visible','off');
    set(handles.text25,'Visible','off');
    set(handles.text26,'Visible','off');
    
else;
    set(handles.radiobutton12_WCS,'Value',1);
    
    set(handles.edit22_cur_step_min_cd,'Visible','on');
    set(handles.edit23_apraj,'Visible','on');
    set(handles.edit24_aprbj,'Visible','on');
    
    set(handles.text24,'Visible','on');
    set(handles.text25,'Visible','on');
    set(handles.text26,'Visible','on');
    
    set(handles.edit4_STHD,'Visible','off');
    set(handles.edit5_LTE,'Visible','off');
    set(handles.edit6_SW,'Visible','off');
    
    set(handles.edit7_TGRD1U,'Visible','off');
    set(handles.edit8_TGRD2U,'Visible','off');
    set(handles.edit9_TGRD1D,'Visible','off');
    set(handles.edit10_TGRD2D,'Visible','off');
    
    set(handles.text4,'Visible','off');
    set(handles.text5,'Visible','off');
    set(handles.text6,'Visible','off');
    
    set(handles.text7,'Visible','off');
    set(handles.text8,'Visible','off');
    set(handles.text9,'Visible','off');
    set(handles.text10,'Visible','off');
end;

WCS=get(handles.radiobutton12_WCS,'Value');

clear eventdata hObject handles
save config_cd

function edit22_cur_step_min_cd_Callback(hObject, eventdata, handles)
% hObject    handle to edit22_cur_step_min_cd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit22_cur_step_min_cd as text
%        str2double(get(hObject,'String')) returns contents of edit22_cur_step_min_cd as a double

load config_cd
cur_step_min_cd = str2num(char(get(handles.edit22_cur_step_min_cd,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit22_cur_step_min_cd_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit22_cur_step_min_cd (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit23_apraj_Callback(hObject, eventdata, handles)
% hObject    handle to edit23_apraj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit23_apraj as text
%        str2double(get(hObject,'String')) returns contents of edit23_apraj as a double

load config_cd
apraj = str2num(char(get(handles.edit23_apraj,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit23_apraj_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit23_apraj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit24_aprbj_Callback(hObject, eventdata, handles)
% hObject    handle to edit24_aprbj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit24_aprbj as text
%        str2double(get(hObject,'String')) returns contents of edit24_aprbj as a double

load config_cd
aprbj = str2num(char(get(handles.edit24_aprbj,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit24_aprbj_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit24_aprbj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in radiobutton7_EVCD.
function radiobutton7_EVCD_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton7_EVCD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton7_EVCD

load config_cd
EVCD=get(handles.radiobutton7_EVCD,'Value');
clear eventdata hObject handles
save config_cd

% --- Executes on button press in radiobutton8_EVQI.
function radiobutton8_EVQI_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton8_EVQI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton8_EVQI

load config_cd

if NOCS==1;
    EVQI=0;
    set(handles.radiobutton8_EVQI,'Value',EVQI);
    msgbox('Evaluation of QI-Curve not possible without current signal. Check whether a current signal is availabel. If yes, click on the correct radiobutton at "Finding of Steps for CD"','Improper Assignment','help')
else;
    EVQI=get(handles.radiobutton8_EVQI,'Value');
end;
clear eventdata hObject handles
save config_cd


function edit25_cur_step_min_qi_Callback(hObject, eventdata, handles)
% hObject    handle to edit25_cur_step_min_qi (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit25_cur_step_min_qi as text
%        str2double(get(hObject,'String')) returns contents of edit25_cur_step_min_qi as a double

load config_cd
cur_step_min_qi = str2num(char(get(handles.edit25_cur_step_min_qi,'String')));
clear eventdata hObject handles
save config_cd


% --- Executes during object creation, after setting all properties.
function edit25_cur_step_min_qi_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit25_cur_step_min_qi (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit26_afraj_Callback(hObject, eventdata, handles)
% hObject    handle to edit26_afraj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit26_afraj as text
%        str2double(get(hObject,'String')) returns contents of edit26_afraj as a double

load config_cd
afraj = str2num(char(get(handles.edit26_afraj,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit26_afraj_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit26_afraj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit27_afrbj_Callback(hObject, eventdata, handles)
% hObject    handle to edit27_afrbj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit27_afrbj as text
%        str2double(get(hObject,'String')) returns contents of edit27_afrbj as a double

load config_cd
afrbj = str2num(char(get(handles.edit27_afrbj,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit27_afrbj_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit27_afrbj (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

Plot_QI


% --- Executes on button press in radiobutton14_plot_QI_raw.
function radiobutton14_plot_QI_raw_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton14_plot_QI_raw (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton14_plot_QI_raw

load config_cd
plot_QI_raw=get(handles.radiobutton14_plot_QI_raw,'Value');
clear eventdata hObject handles
save config_cd


% --- Executes on button press in radiobutton15_plot_QI_eval.
function radiobutton15_plot_QI_eval_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton15_plot_QI_eval (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton15_plot_QI_eval

load config_cd
plot_QI_eval=get(handles.radiobutton15_plot_QI_eval,'Value');
clear eventdata hObject handles
save config_cd



function edit28_TOL_GRD_CD_Callback(hObject, eventdata, handles)
% hObject    handle to edit28_TOL_GRD_CD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit28_TOL_GRD_CD as text
%        str2double(get(hObject,'String')) returns contents of edit28_TOL_GRD_CD as a double

load config_cd
TOL_GRD_CD = str2num(char(get(handles.edit28_TOL_GRD_CD,'String')));
clear eventdata hObject handles
save config_cd


% --- Executes during object creation, after setting all properties.
function edit28_TOL_GRD_CD_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit28_TOL_GRD_CD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit29_TIME_GRD_CD_Callback(hObject, eventdata, handles)
% hObject    handle to edit29_TIME_GRD_CD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit29_TIME_GRD_CD as text
%        str2double(get(hObject,'String')) returns contents of edit29_TIME_GRD_CD as a double

load config_cd
TIME_GRD_CD = str2num(char(get(handles.edit29_TIME_GRD_CD,'String')));
clear eventdata hObject handles
save config_cd

% --- Executes during object creation, after setting all properties.
function edit29_TIME_GRD_CD_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit29_TIME_GRD_CD (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


