Difference between revisions of "Plugins-sqlsummary"

From Bcontrol
(New page: something)
 
Line 1: Line 1:
something
+
=@sqlsummary - sendsummary=
 +
 
 +
This plugin lets you call a single command:
 +
  sendsummary(obj);
 +
that will send a summary of your session to a mysql server. 
 +
<tt>
 +
  function [err]=sendsummary(obj, varargin)
 +
  pairs = { ...
 +
  'hits' get_val('hit_history');...
 +
  'sides' get_val('previous_sides');...
 +
  'endtime' datestr(now,13);...
 +
  'sessiondate' datestr(now,29);...
 +
  'hostname' get_val('SavingSection_hostname');...
 +
  'experimenter'      get_val('SavingSection_experimenter');...
 +
  'ratname'          get_val('SavingSection_ratname');...
 +
  'n_done_trials' get_val('n_done_trials');...
 +
  'protocol' class(obj);...
 +
  'protocol_data'    'NULL'
 +
  }; parseargs(varargin, pairs);
 +
 
 +
 
 +
  %% Get the relevant SPH
 +
 
 +
  total_correct=nanmean(hits);
 +
  right_correct=nanmean(hits(sides=='r'));
 +
  left_correct=nanmean(hits(sides=='l'));
 +
  percent_violations=mean(isnan(hits));
 +
</tt>
 +
 
 +
 
 +
 
 +
 
 +
NOTE: Currently this functionality is only supported for the Brody Lab.  Users outside of the brody lab must set up a mysql server for their lab and replace the *bdata.p* file found in <tt>ExperPort/MySQLUtility</tt> using *bdata_template.m*.
 +
 
 +
[[User:Jerlich|Jerlich]] 20:23, 29 December 2007 (EST)

Revision as of 01:23, 30 December 2007

@sqlsummary - sendsummary

This plugin lets you call a single command:

 sendsummary(obj);

that will send a summary of your session to a mysql server.

 function [err]=sendsummary(obj, varargin)
 pairs = { ...
 		'hits'				get_val('hit_history');...
 		'sides'				get_val('previous_sides');...
 		'endtime'			datestr(now,13);...
 		'sessiondate'		datestr(now,29);...
 		'hostname'			get_val('SavingSection_hostname');...
 		'experimenter'      get_val('SavingSection_experimenter');...
 		'ratname'           get_val('SavingSection_ratname');...
 		'n_done_trials'		get_val('n_done_trials');...
 		'protocol'			class(obj);...
 		'protocol_data'     'NULL'
 		}; parseargs(varargin, pairs);
 
 		
 %% Get the relevant SPH
 
 total_correct=nanmean(hits);
 right_correct=nanmean(hits(sides=='r'));
 left_correct=nanmean(hits(sides=='l'));
 percent_violations=mean(isnan(hits));



NOTE: Currently this functionality is only supported for the Brody Lab. Users outside of the brody lab must set up a mysql server for their lab and replace the *bdata.p* file found in ExperPort/MySQLUtility using *bdata_template.m*.

Jerlich 20:23, 29 December 2007 (EST)