_Our standard rig plan‎ > ‎Modules‎ > ‎Two-Photon‎ > ‎

Customizing TwoPhoton Analyses


General customizing through the TwoPhotonUserInit.m file:

There is a file called TwoPhotonUserInit.m that is present in the vhtools/configuration directory that allows one to add custom plugins or features that the TwoPhoton tools can employ in performing analysis.  This file is run whenever the TwoPhoton tools library is initialized.  Some notes:
  • Setup:  If you don't have a TwoPhotonUserInit.m file, there is a default TwoPhotonUserInit.m file that is copied the first time the TwoPhoton library is initialized.  This can then be edited by the user as they see fit.
  • Updating: Whenever the software is subsequently updated by the vhtools_installer, the user's TwoPhotonUserInit.m file is not modified, allowing the user to keep his/her custom settings without having to re-do them for each software upgrade.

Automatic cell drawing routines in the stack editor analyzetpstack:

One common use of the TwoPhotonUserInit.m file is to define custom cell drawing devices or to set a custom set of parameters for draw devices.  For example, to set up a draw device that uses the routine "draw_adaptivethreshold" you might use the following code (which is already present in the default TwoPhotonUserInit.m file):

% define the parameters we will use:
adp20x = struct('localwindowsize',[20 20],'paramC',-0.05,'meanormedian',0,'flare',2,... 
        'min_area',120,'max_eccen',2,'min_circularity',0.4,'channel_order',[1 2],'overlap',50,'labels1','tdTomato',...
        'labels2','FURA','labels3','GFP','labels4','Oregon green',...
        'chan1method',0,'chan2method',1,'chan3method',0,'chan4method',0);
% install the drawing device using these parameters:
analyzetpstack_active_draw_devices('add','adapt20x_kade','draw_adaptivethreshold',adp20x);

See help analyzetpstack_active_draw_devices to learn more about draw devices, and see help draw_adaptivethreshold to learn about the parameters for the draw_adaptivethreshold draw device.

Filtered preview images in the stack editor analyzetpstack:

[Text soon]

Comments