Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here's the beginning of our startup file 'specimen':

Panelnoformat

function gephus


%% STARTUP BOILERPLATE

 
%Set up a wait bar to show the progress.


wb = waitbarWithCancel(0, 'Starting ephus...', 'Name', 'Loading software...');


pos = get(wb, 'Position');


pos(2) = pos(2) - pos(4);


set(wb, 'Position', pos);

This section contains the function declaration, with the name of the startup file – in this case, 'gephus'.

...

This section contains the configuration information for each of the devices & channels connected to this installation of EPHUS:


%% DEVICE/CHANNEL CONFIGURATION

%Amplifier objects for ephys
patch{1} = multi_clamp('text_file_location', 'C:\MATLAB6p1\work\Physiology\MClamp700BChannel1.txt', 'scaledOutputBoardID', 1, 'scaledOutputChannelID', 0, ...
    'vComBoardID', 1, 'vComChannelID', 0, 'channel', 1, 'name', '700B-1');

patch{2} = multi_clamp('text_file_location', 'C:\MATLAB6p1\work\Physiology\MClamp700BChannel2.txt', 'scaledOutputBoardID', 1, 'scaledOutputChannelID', 4, ...
    'vComBoardID', 1, 'vComChannelID', 1, 'channel', 2, 'name', '700B-2');

%Acquirer channels 
acqChannelNames = {'photodiode1'};
acqBoardIDs =   [2];
acqChanIDs =    [0];

%Stimulator channels 
stimChannelNames = {'pockelsCell' 'shutter0' 'xMirror' 'yMirror' 'shutter1' 'ao5' 'ao6' 'ao7'};
stimBoardIDs = [3 3 3 3 3 3 3 3];
stimChanIDs =  [0 1 2 3 4 5 6 7];
No Format
Panel
Wiki Markup

EPHUS programs sometimes employ specialized devices, which are implemented as MATLAB objects. In this case, for instance, the ephys program employs amplifier objects. All objects require a constructor in order to be created – this is a function which must be called and typically consists of several arguments initializing the particular object's properties. In EPHUS, all devices must be 'constructed' upon startup, and presumed to exist 'forever' (until EPHUS is closed).

...

The next section contains configuration variables that can/should be modified by the user. In our sample file, we see:

Panelnoformat

%% CONFIGURATION VARIABLES


triggerOrigin = '/dev1/port0/line0'; %Specifies the digital line terminal on which the trigger pulse is output at the start of each acquisition


triggerDest = 'PFI0'; %Specifies the digital line terminal on which the trigger pulse is received. On /every/ board, this must be connected to the triggerOriginal terminal


xsgStartDirectory = 'C:\Data\'; %Default directory in which to save data files


pockelsOn=1; %Logical value specifying whether Pockels Cell is in fact attached/active on
 

%Size, in microns, of the camera FOV (a camera application is required by the mapper program)


xVideoScaleFactor =  2625;


yVideoScaleFactor = 1980;


%% *************************END OF CONFIGURATION***************************************

The number and names of the configuration variables in a startup file will depend on the particular application (as determined by the application sections below). Generally, they should be well-documented via MATLAB comments as seen here.

...