Code covered by the BSD License  

Highlights from
CO2gui - lab control and automation

CO2gui - lab control and automation

by

 

06 Jan 2010 (Updated )

Software used for controlling and data logging lab equipment.

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

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

% Last Modified by GUIDE v2.5 19-Nov-2009 17:43:27

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @pressdrophelpergui_OpeningFcn, ...
                   'gui_OutputFcn',  @pressdrophelpergui_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 pressdrophelpergui is made visible.
function pressdrophelpergui_OpeningFcn(hObject, eventdata, handles, pressDropGuiHandle)
% 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 pressdrophelpergui (see VARARGIN)

% checks the number of arguments
error(nargchk(4, 4, nargin))

% saves the main gui handle for later use
handles.pressDropGuiHandle = pressDropGuiHandle;

% gets the data from the pressure drop GUI appdata
objectConfig = getappdata(pressDropGuiHandle, 'objectConfig');
guiConfig = getappdata(pressDropGuiHandle, 'guiConfig');
objectTypes = getappdata(pressDropGuiHandle, 'objectTypes');
tc08Config = getappdata(pressDropGuiHandle, 'tc08Config');

% saves the window handle into the pressure drop gui appdata
setappdata(pressDropGuiHandle, 'plotOptionsWindowHandle', hObject)

% Update handles structure
guidata(hObject, handles)

% for each instrument...
for m = 1:8
    % writes the name
    set(handles.(sprintf('name%d', m)), 'String', objectConfig(m).name);

    % writes the instrument type
    set(handles.(sprintf('type%d', m)), 'String', objectTypes(objectConfig(m).type).name);

    % fills the boxes according to the plotFlags supplied
    set(handles.(sprintf('currentTemp%d', m)), 'Value', objectConfig(m).currentTempPlotFlag)
    set(handles.(sprintf('setTemp%d', m)), 'Value', objectConfig(m).setTempPlotFlag)
    set(handles.(sprintf('currentPress%d', m)), 'Value', objectConfig(m).currentPressPlotFlag)
    set(handles.(sprintf('setPress%d', m)), 'Value', objectConfig(m).setPressPlotFlag)
    set(handles.(sprintf('flow%d', m)), 'Value', objectConfig(m).flowPlotFlag)
end

% gets the serial data
serialData = getappdata(pressDropGuiHandle, 'serialData');

% if the serial data is not empty, start modifying the fields
if ~isempty(serialData)
    % defines the fields
    fields = {'currentTemp', 'setTemp', 'currentPress', 'setPress', 'flow'};
    
    % for each instrument
    for n = 1:8
        % for each field
        for nn = 1:5
            % is the column full of NaNs?
            if all(isnan(serialData(:, 1 + ((n - 1) * 5) + nn)))
                % disables the field
                set(handles.(sprintf([fields{nn}, '%d'], n)),   'Enable', 'off',...
                                                                'Value', 0)
            end
        end
    end
end

% for each Pico log channel
for o = 1:10
    % writes the channel name
    set(handles.(sprintf('picoName%d', o)), 'String', tc08Config(o).name);

    % writes the units
    set(handles.(sprintf('picoUnits%d', o)), 'String', tc08Config(o).units);

    % fills the boxes according to the plotFlags supplied
    set(handles.(sprintf('picoPlot%d', o)), 'Value', tc08Config(o).plotFlag)
end

% for the fibre
for p = 1:2
    % fills the boxes
    set(handles.(sprintf('fibreIntensity%d', p)), 'Value', guiConfig.(sprintf('showFibreIntensity%d', p)))
end

% gets the pico data
picoData = getappdata(pressDropGuiHandle, 'picoData');

% if the pico data is not empty, start modifying the fields
if ~isempty(picoData)
    % for each channel
    for q = 2:11
        % is the column full of NaNs?
        if all(isnan(picoData(:, q)))
            % disables the field
            set(handles.(sprintf('picoPlot%d', q)), 'Enable', 'off',...
                                                    'Value', 0)
        end
    end
    
    % fix for older data if there is only 1 column of fibre data
    fibreChannels = size(picoData, 2) - 10 - 1;
    
    % same for the fibre
    for r = 1:2
        % is there enough data or is the column full of NaNs?
        if fibreChannels < r || all(isnan(picoData(:, 11 + r)))
            % disables the field
            set(handles.(sprintf('fibreIntensity%d', r)),   'Enable', 'off',...
                                                            'Value', 0)
        end
    end
end


% --- Outputs from this function are returned to the command line.
function pressdrophelpergui_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)



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

% forms the help text
helpString = {  '1. Select the fields to be exported to a spreadsheet (it can be easily opened in Excel).';...
                '';...
                '2. The default values are chosen (if this was launched from the main program) are based on the parameters normally plotted to the axes.'};

% opens a help dialog with the help information in
helpdlg(helpString)


% --- Executes on button press in all1.
function all1_Callback(hObject, eventdata, handles)
% hObject    handle to all1 (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 all1

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp1.
function currentTemp1_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp1 (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 currentTemp1


% --- Executes on button press in setTemp1.
function setTemp1_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp1 (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 setTemp1


% --- Executes on button press in currentPress1.
function currentPress1_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress1 (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 currentPress1


% --- Executes on button press in setPress1.
function setPress1_Callback(hObject, eventdata, handles)
% hObject    handle to setPress1 (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 setPress1



% --- Executes on button press in flow1.
function flow1_Callback(hObject, eventdata, handles)
% hObject    handle to flow1 (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 flow1




% --- Executes on button press in all2.
function all2_Callback(hObject, eventdata, handles)
% hObject    handle to all2 (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 all2

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp2.
function currentTemp2_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp2 (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 currentTemp2


% --- Executes on button press in setTemp2.
function setTemp2_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp2 (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 setTemp2


% --- Executes on button press in currentPress2.
function currentPress2_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress2 (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 currentPress2


% --- Executes on button press in setPress2.
function setPress2_Callback(hObject, eventdata, handles)
% hObject    handle to setPress2 (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 setPress2



% --- Executes on button press in flow2.
function flow2_Callback(hObject, eventdata, handles)
% hObject    handle to flow2 (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 flow2


% --- Executes on button press in all3.
function all3_Callback(hObject, eventdata, handles)
% hObject    handle to all3 (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 all3

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp3.
function currentTemp3_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp3 (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 currentTemp3


% --- Executes on button press in setTemp3.
function setTemp3_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp3 (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 setTemp3


% --- Executes on button press in currentPress3.
function currentPress3_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress3 (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 currentPress3


% --- Executes on button press in setPress3.
function setPress3_Callback(hObject, eventdata, handles)
% hObject    handle to setPress3 (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 setPress3



% --- Executes on button press in flow3.
function flow3_Callback(hObject, eventdata, handles)
% hObject    handle to flow3 (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 flow3


% --- Executes on button press in all4.
function all4_Callback(hObject, eventdata, handles)
% hObject    handle to all4 (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 all4

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp4.
function currentTemp4_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp4 (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 currentTemp4


% --- Executes on button press in setTemp4.
function setTemp4_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp4 (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 setTemp4


% --- Executes on button press in currentPress4.
function currentPress4_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress4 (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 currentPress4


% --- Executes on button press in setPress4.
function setPress4_Callback(hObject, eventdata, handles)
% hObject    handle to setPress4 (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 setPress4



% --- Executes on button press in flow4.
function flow4_Callback(hObject, eventdata, handles)
% hObject    handle to flow4 (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 flow4


% --- Executes on button press in all5.
function all5_Callback(hObject, eventdata, handles)
% hObject    handle to all5 (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 all5

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp5.
function currentTemp5_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp5 (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 currentTemp5


% --- Executes on button press in currentPress5.
function currentPress5_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress5 (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 currentPress5


% --- Executes on button press in setPress5.
function setPress5_Callback(hObject, eventdata, handles)
% hObject    handle to setPress5 (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 setPress5



% --- Executes on button press in flow5.
function flow5_Callback(hObject, eventdata, handles)
% hObject    handle to flow5 (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 flow5


% --- Executes on button press in all6.
function all6_Callback(hObject, eventdata, handles)
% hObject    handle to all6 (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 all6

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp6.
function currentTemp6_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp6 (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 currentTemp6


% --- Executes on button press in setTemp6.
function setTemp6_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp6 (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 setTemp6


% --- Executes on button press in currentPress6.
function currentPress6_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress6 (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 currentPress6


% --- Executes on button press in setPress6.
function setPress6_Callback(hObject, eventdata, handles)
% hObject    handle to setPress6 (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 setPress6


% --- Executes on button press in flow6.
function flow6_Callback(hObject, eventdata, handles)
% hObject    handle to flow6 (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 flow6


% --- Executes on button press in all7.
function all7_Callback(hObject, eventdata, handles)
% hObject    handle to all7 (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 all7

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp7.
function currentTemp7_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp7 (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 currentTemp7


% --- Executes on button press in setTemp7.
function setTemp7_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp7 (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 setTemp7


% --- Executes on button press in currentPress7.
function currentPress7_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress7 (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 currentPress7


% --- Executes on button press in setPress7.
function setPress7_Callback(hObject, eventdata, handles)
% hObject    handle to setPress7 (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 setPress7

% --- Executes on button press in flow7.
function flow7_Callback(hObject, eventdata, handles)
% hObject    handle to flow7 (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 flow7


% --- Executes on button press in all8.
function all8_Callback(hObject, eventdata, handles)
% hObject    handle to all8 (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 all8

% calls the generic enable all callback
allCallback(hObject, eventdata, handles)


% --- Executes on button press in currentTemp8.
function currentTemp8_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp8 (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 currentTemp8


% --- Executes on button press in setTemp8.
function setTemp8_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp8 (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 setTemp8


% --- Executes on button press in currentPress8.
function currentPress8_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress8 (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 currentPress8


% --- Executes on button press in setPress8.
function setPress8_Callback(hObject, eventdata, handles)
% hObject    handle to setPress8 (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 setPress8



% --- Executes on button press in flow8.
function flow8_Callback(hObject, eventdata, handles)
% hObject    handle to flow8 (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 flow8



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

% defines the possible parent
parent = getfigure(callingObject);

% if the parent is the root (0), then use the calling object as the parent
% handle
if ~parent
    % changes the parent
    parent = callingObject;
end

% if the main gui handle is not 0 (i.e. it was supplied), remove the handle
% from the main GUI
if handles.pressDropGuiHandle ~= parent
    % removes the handles from the main GUI appdata
    try
        % deletes fields
        rmappdata(handles.pressDropGuiHandle, 'plotOptionsWindowHandle')
        
    catch
        % brings up an error dialog
        errordlg('Handle fields not removed from main GUI appdata.')
    end
end

% deletes the window
delete(parent)


% --- Designed to be executed as a generic "all" callback
function allCallback(callingObject, eventdata, handles)
% callingObject handle to the calling object
% eventdata     reserved - to be defined in a future version of MATLAB
% handles       structure with handles and user data (see GUIDATA)

% fetches the tag of the handle (the actual handle is a horribly unreadable
% number like 27.0023)
callingHandleString = get(callingObject,'Tag');

% extracts the numeric parts of the handle name (this 'number' is actually
% a string)
number = callingHandleString(isstrprop(callingHandleString, 'digit'));

% fetches the current value
value = get(callingObject, 'Value');

% ticks these boxes
set([   handles.(['currentTemp', number]),...
        handles.(['setTemp', number]),...
        handles.(['currentPress', number]),...
        handles.(['setPress', number]),...
        handles.(['flow', number])], 'Value', value)


% --- Executes on button press in all0.
function all0_Callback(hObject, eventdata, handles)
% hObject    handle to all0 (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 all0

% ticks/unticks everything that is enabled
for m = 1:8
    % generates handles vector for convenience (this has to be a cell
    % array)
    fields = [  handles.(sprintf('currentTemp%d', m)),...
                handles.(sprintf('setTemp%d', m)),...
                handles.(sprintf('currentPress%d', m)),...
                handles.(sprintf('setPress%d', m)),...
                handles.(sprintf('flow%d', m))];
    
    % for each field
    for mm = 1:numel(fields)
        % checks if it enabled
        if strcmp(get(fields(mm), 'Enable'), 'on')
            % ticks/unticks it
            set(fields(mm), 'Value', get(hObject, 'Value'))
        end
    end
end


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


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


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


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


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


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


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


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



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


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


% --- Executes on button press in currentTemp0.
function currentTemp0_Callback(hObject, eventdata, handles)
% hObject    handle to currentTemp0 (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 currentTemp0

% enables all of the currentTemp checkboxes
for m = 1:8
    % defines the handle
    currentTemp = sprintf('currentTemp%d', m);
    
    % if the checkbox is activated...
    if onoff(get(handles.(currentTemp), 'Enable'))
        % enables/disables it
        set(handles.(currentTemp), 'Value', get(hObject, 'Value'))
    end
end


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


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


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

% gets the config files
tc08Config = getappdata(handles.pressDropGuiHandle, 'tc08Config');
objectConfig = getappdata(handles.pressDropGuiHandle, 'objectConfig');

% for each instrument
for m = 1:8
    % changes each field
    objectConfig(m).currentTempPlotFlag = get(handles.(sprintf('currentTemp%d', m)), 'Value');
    objectConfig(m).setTempPlotFlag = get(handles.(sprintf('setTemp%d', m)), 'Value');
    objectConfig(m).currentPressPlotFlag = get(handles.(sprintf('currentPress%d', m)), 'Value');
    objectConfig(m).setPressPlotFlag = get(handles.(sprintf('setPress%d', m)), 'Value');
    objectConfig(m).flowPlotFlag = get(handles.(sprintf('flow%d', m)), 'Value');
end

% for each Pico log channel
for n = 1:10
    % changes the plot flag
    tc08Config(n).plotFlag = get(handles.(sprintf('picoPlot%d', n)), 'Value');
end

% for each fibre channel
for o = 1:2
    % defines the field
    fibreIntensity = sprintf('fibreIntensity%d', o);
    
    % changes the flag
    guiConfig.(['show', capitalise(fibreIntensity)]) = get(handles.(fibreIntensity), 'Value');
end

% saves these back into the pressure drop GUI
setappdata(handles.pressDropGuiHandle, 'tc08Config', tc08Config)
setappdata(handles.pressDropGuiHandle, 'objectConfig', objectConfig)
setappdata(handles.pressDropGuiHandle, 'guiConfig', guiConfig)

% gets the main gui handles
pressDropGuiHandles = guidata(handles.pressDropGuiHandle);

% runs the cancel button callback to correctly get rid of this window
cancelButton_Callback(handles.cancelButton, eventdata, handles)

% re-runs the process data callback in the pressure drop GUI
batchpressdropanalysergui('processData', handles.pressDropGuiHandle, eventdata, pressDropGuiHandles)


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


% --- Executes on button press in setTemp0.
function setTemp0_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp0 (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 setTemp0

% enables all of the setTemp checkboxes
for m = 1:8
    % defines the handle
    setTemp = sprintf('setTemp%d', m);

    % if the checkbox is activated...
    if onoff(get(handles.(setTemp), 'Enable'))
        % enables/disables it
        set(handles.(setTemp), 'Value', get(hObject, 'Value'))
    end
end


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


% --- Executes on button press in currentPress0.
function currentPress0_Callback(hObject, eventdata, handles)
% hObject    handle to currentPress0 (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 currentPress0

% enables all of the currentPress checkboxes
for m = 1:8
    % defines the handle
    currentPress = sprintf('currentPress%d', m);
    
    % if the checkbox is activated...
    if onoff(get(handles.(currentPress), 'Enable'))
        % enables/disables it
        set(handles.(currentPress), 'Value', get(hObject, 'Value'))
    end
end


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


% --- Executes on button press in setPress0.
function setPress0_Callback(hObject, eventdata, handles)
% hObject    handle to setPress0 (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 setPress0

% enables all of the setPress checkboxes
for m = 1:8
    % defines the handle
    setPress = sprintf('setPress%d', m);
    
    % if the checkbox is activated...
    if onoff(get(handles.(setPress), 'Enable'))
        % enables/disables it
        set(handles.(setPress), 'Value', get(hObject, 'Value'))
    end
end


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



% --- Executes on button press in flow0.
function flow0_Callback(hObject, eventdata, handles)
% hObject    handle to flow0 (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 flow0

% enables all of the flow checkboxes
for m = 1:8
    % defines the handle
    flow = sprintf('flow%d', m);
    
    % if the checkbox is activated...
    if onoff(get(handles.(flow), 'Enable'))
        % enables/disables it
        set(handles.(flow), 'Value', get(hObject, 'Value'))
    end
end

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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



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


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


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


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


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


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




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


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


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


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


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



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


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


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


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


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


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


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


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


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


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


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


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



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


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


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


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


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


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


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


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


% --- Executes on button press in enableAllPico.
function enableAllPico_Callback(hObject, eventdata, handles)
% hObject    handle to enableAllPico (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 enableAllPico

% enables all of the pico checkboxes
for m = 1:10
    % defines the handle
    picoPlot = sprintf('picoPlot%d', m);
    
    % if the checkbox is activated...
    if onoff(get(handles.(picoPlot), 'Enable'))
        % enables/disables it
        set(handles.(picoPlot), 'Value', get(hObject, 'Value'))
    end
end


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


% --- Executes on button press in picoPlot1.
function picoPlot1_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot1 (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 picoPlot1


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


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



function name1_Callback(hObject, eventdata, handles)
% hObject    handle to name1 (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 name1 as text
%        str2double(get(hObject,'String')) returns contents of name1 as a double


% --- Executes during object creation, after setting all properties.
function name1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name1 (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 type1_Callback(hObject, eventdata, handles)
% hObject    handle to type1 (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 type1 as text
%        str2double(get(hObject,'String')) returns contents of type1 as a double


% --- Executes during object creation, after setting all properties.
function type1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type1 (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 name2_Callback(hObject, eventdata, handles)
% hObject    handle to name2 (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 name2 as text
%        str2double(get(hObject,'String')) returns contents of name2 as a double


% --- Executes during object creation, after setting all properties.
function name2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name2 (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 type2_Callback(hObject, eventdata, handles)
% hObject    handle to type2 (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 type2 as text
%        str2double(get(hObject,'String')) returns contents of type2 as a double


% --- Executes during object creation, after setting all properties.
function type2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type2 (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 name3_Callback(hObject, eventdata, handles)
% hObject    handle to name3 (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 name3 as text
%        str2double(get(hObject,'String')) returns contents of name3 as a double


% --- Executes during object creation, after setting all properties.
function name3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name3 (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 type3_Callback(hObject, eventdata, handles)
% hObject    handle to type3 (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 type3 as text
%        str2double(get(hObject,'String')) returns contents of type3 as a double


% --- Executes during object creation, after setting all properties.
function type3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type3 (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 name4_Callback(hObject, eventdata, handles)
% hObject    handle to name4 (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 name4 as text
%        str2double(get(hObject,'String')) returns contents of name4 as a double


% --- Executes during object creation, after setting all properties.
function name4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name4 (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 type4_Callback(hObject, eventdata, handles)
% hObject    handle to type4 (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 type4 as text
%        str2double(get(hObject,'String')) returns contents of type4 as a double


% --- Executes during object creation, after setting all properties.
function type4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type4 (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 name5_Callback(hObject, eventdata, handles)
% hObject    handle to name5 (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 name5 as text
%        str2double(get(hObject,'String')) returns contents of name5 as a double


% --- Executes during object creation, after setting all properties.
function name5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name5 (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 type5_Callback(hObject, eventdata, handles)
% hObject    handle to type5 (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 type5 as text
%        str2double(get(hObject,'String')) returns contents of type5 as a double


% --- Executes during object creation, after setting all properties.
function type5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type5 (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 name6_Callback(hObject, eventdata, handles)
% hObject    handle to name6 (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 name6 as text
%        str2double(get(hObject,'String')) returns contents of name6 as a double


% --- Executes during object creation, after setting all properties.
function name6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name6 (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 type6_Callback(hObject, eventdata, handles)
% hObject    handle to type6 (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 type6 as text
%        str2double(get(hObject,'String')) returns contents of type6 as a double


% --- Executes during object creation, after setting all properties.
function type6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type6 (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 name7_Callback(hObject, eventdata, handles)
% hObject    handle to name7 (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 name7 as text
%        str2double(get(hObject,'String')) returns contents of name7 as a double


% --- Executes during object creation, after setting all properties.
function name7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name7 (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 type7_Callback(hObject, eventdata, handles)
% hObject    handle to type7 (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 type7 as text
%        str2double(get(hObject,'String')) returns contents of type7 as a double


% --- Executes during object creation, after setting all properties.
function type7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type7 (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 name8_Callback(hObject, eventdata, handles)
% hObject    handle to name8 (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 name8 as text
%        str2double(get(hObject,'String')) returns contents of name8 as a double


% --- Executes during object creation, after setting all properties.
function name8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to name8 (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 type8_Callback(hObject, eventdata, handles)
% hObject    handle to type8 (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 type8 as text
%        str2double(get(hObject,'String')) returns contents of type8 as a double


% --- Executes during object creation, after setting all properties.
function type8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to type8 (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 during object creation, after setting all properties.
function nameLabel_CreateFcn(hObject, eventdata, handles)
% hObject    handle to nameLabel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


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



function picoName1_Callback(hObject, eventdata, handles)
% hObject    handle to picoName1 (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 picoName1 as text
%        str2double(get(hObject,'String')) returns contents of picoName1 as a double


% --- Executes during object creation, after setting all properties.
function picoName1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName1 (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 picoUnits1_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits1 (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 picoUnits1 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits1 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits1 (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 picoPlot2.
function picoPlot2_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot2 (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 picoPlot2


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



function picoName2_Callback(hObject, eventdata, handles)
% hObject    handle to picoName2 (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 picoName2 as text
%        str2double(get(hObject,'String')) returns contents of picoName2 as a double


% --- Executes during object creation, after setting all properties.
function picoName2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName2 (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 picoUnits2_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits2 (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 picoUnits2 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits2 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits2 (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 picoPlot3.
function picoPlot3_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot3 (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 picoPlot3


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



function picoName3_Callback(hObject, eventdata, handles)
% hObject    handle to picoName3 (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 picoName3 as text
%        str2double(get(hObject,'String')) returns contents of picoName3 as a double


% --- Executes during object creation, after setting all properties.
function picoName3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName3 (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 picoUnits3_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits3 (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 picoUnits3 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits3 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits3 (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 picoPlot4.
function picoPlot4_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot4 (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 picoPlot4


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



function picoName4_Callback(hObject, eventdata, handles)
% hObject    handle to picoName4 (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 picoName4 as text
%        str2double(get(hObject,'String')) returns contents of picoName4 as a double


% --- Executes during object creation, after setting all properties.
function picoName4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName4 (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 picoPlot5.
function picoPlot5_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot5 (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 picoPlot5


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



function picoName5_Callback(hObject, eventdata, handles)
% hObject    handle to picoName5 (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 picoName5 as text
%        str2double(get(hObject,'String')) returns contents of picoName5 as a double


% --- Executes during object creation, after setting all properties.
function picoName5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName5 (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 picoUnits5_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits5 (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 picoUnits5 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits5 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits5 (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 picoPlot6.
function picoPlot6_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot6 (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 picoPlot6


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



function picoName6_Callback(hObject, eventdata, handles)
% hObject    handle to picoName6 (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 picoName6 as text
%        str2double(get(hObject,'String')) returns contents of picoName6 as a double


% --- Executes during object creation, after setting all properties.
function picoName6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName6 (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 picoUnits6_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits6 (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 picoUnits6 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits6 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits6 (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 picoPlot7.
function picoPlot7_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot7 (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 picoPlot7


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



function picoName7_Callback(hObject, eventdata, handles)
% hObject    handle to picoName7 (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 picoName7 as text
%        str2double(get(hObject,'String')) returns contents of picoName7 as a double


% --- Executes during object creation, after setting all properties.
function picoName7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName7 (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 picoUnits7_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits7 (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 picoUnits7 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits7 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits7 (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 picoPlot8.
function picoPlot8_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot8 (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 picoPlot8


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



function picoName8_Callback(hObject, eventdata, handles)
% hObject    handle to picoName8 (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 picoName8 as text
%        str2double(get(hObject,'String')) returns contents of picoName8 as a double


% --- Executes during object creation, after setting all properties.
function picoName8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName8 (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 picoUnits8_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits8 (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 picoUnits8 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits8 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits8 (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 picoPlot9.
function picoPlot9_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot9 (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 picoPlot9


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



function picoName9_Callback(hObject, eventdata, handles)
% hObject    handle to picoName9 (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 picoName9 as text
%        str2double(get(hObject,'String')) returns contents of picoName9 as a double


% --- Executes during object creation, after setting all properties.
function picoName9_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName9 (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 picoUnits9_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits9 (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 picoUnits9 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits9 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits9_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits9 (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 picoPlot10.
function picoPlot10_Callback(hObject, eventdata, handles)
% hObject    handle to picoPlot10 (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 picoPlot10


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



function picoName10_Callback(hObject, eventdata, handles)
% hObject    handle to picoName10 (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 picoName10 as text
%        str2double(get(hObject,'String')) returns contents of picoName10 as a double


% --- Executes during object creation, after setting all properties.
function picoName10_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoName10 (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 picoUnits10_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits10 (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 picoUnits10 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits10 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits10_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits10 (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 picoUnits4_Callback(hObject, eventdata, handles)
% hObject    handle to picoUnits4 (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 picoUnits4 as text
%        str2double(get(hObject,'String')) returns contents of picoUnits4 as a double


% --- Executes during object creation, after setting all properties.
function picoUnits4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to picoUnits4 (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 setTemp5.
function setTemp5_Callback(hObject, eventdata, handles)
% hObject    handle to setTemp5 (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 setTemp5


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


% --- Executes on selection change in exportDataFormatMenu.
function exportDataFormatMenu_Callback(hObject, eventdata, handles)
% hObject    handle to exportDataFormatMenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns exportDataFormatMenu contents as cell array
%        contents{get(hObject,'Value')} returns selected item from exportDataFormatMenu


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

% Hint: popupmenu 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 openOnExport.
function openOnExport_Callback(hObject, eventdata, handles)
% hObject    handle to openOnExport (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 openOnExport


% --- Executes on button press in fibreIntensity1.
function fibreIntensity1_Callback(hObject, eventdata, handles)
% hObject    handle to fibreIntensity1 (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 fibreIntensity1


% --- Executes on button press in fibreIntensity2.
function fibreIntensity2_Callback(hObject, eventdata, handles)
% hObject    handle to fibreIntensity2 (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 fibreIntensity2


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


Contact us