print str(forcebase*(10**12))+' pN'
to_dump='forcebase '+self.current.path+' '+str(forcebase*(10**12))+' pN'
self.outlet.push(to_dump)
+\r
+ def plotmanip_multiplier(self, plot, current):
+ '''
+ Multiplies all the Y values of an SMFS curve by a value stored in the 'force_multiplier'\r
+ configuration variable. Useful for calibrations and other stuff.
+ '''
+
+ #not a smfs curve...
+ if current.curve.experiment != 'smfs':
+ return plot
+
+ #only one set is present...
+ if len(self.plots[0].vectors) != 2:
+ return plot
+ #multiplier is 1...
+ if (self.config['force_multiplier']==1):
+ return plot\r
+\r
+ for i in range(len(plot.vectors[0][1])):
+ plot.vectors[0][1][i]=plot.vectors[0][1][i]*self.config['force_multiplier'] \r
+\r
+ for i in range(len(plot.vectors[1][1])):
+ plot.vectors[1][1][i]=plot.vectors[1][1][i]*self.config['force_multiplier']\r
+\r
+ return plot \r
+
def plotmanip_flatten(self, plot, current, customvalue=False):
'''
-<?xml version="1.0" ?>
-<!-- To comment something, put dashes and ! like here -->
-<config>
-<!-- Internal variabls. -->
- <display ext="1" colour_ext="None" ret="1" colour_ret="None" correct="1" colour_correct="None" contact_point="0" medfilt="0" xaxes="0" yaxes="0" flatten="1" temperature="301" auto_fit_points="50" auto_slope_span="20" auto_delta_force="10" auto_fit_nm="5" auto_min_p="0.005" auto_max_p="10" baseline_clicks="0" auto_left_baseline="20" auto_right_baseline="20" fc_showphase="0" fc_showimposed="0" fc_interesting="0" tccd_threshold="0" tccd_coincident="0"/>
-
-<!--
-The following section defines your own work directory. Substitute your work directory.
- -->
-<workdir>
- insert directory
-</workdir>
-
-<!--
-The following section defines the default playlist to load at startup.
--->
-<defaultlist>
- test.hkp
-</defaultlist>
-
-<!--
-This section defines which plugins have to be loaded by Hooke.
- -->
-<plugins>
- <fit/>
- <procplots/>
- <flatfilts/>
- <generalclamp/>
- <!-- dummyguiplug/ -->
- <!-- superimpose/ -->
- <generalvclamp/>
- <massanalysis/>
- <viewer/>
- <!-- tutorial/ -->
- <macro/>
- <autopeak/>
- <pcluster/>
- <generaltccd/>
-</plugins>
-
-<!--
-This section defines which drivers have to be loaded by Hooke.
- -->
-<drivers>
- <picoforce/>
- <!-- picoforcealt/ -->
- <hemingclamp/>
- <csvdriver/>
- <!-- tutorialdriver/ -->
- <jpk/>
- <mfp1dexport/>
- <mcs/>
-</drivers>
-
-<!--
-This section defines which plot manipulators have to be loaded by Hooke,
-and -IMPORTANTLY- their order.
- -->
-<plotmanips>
- <correct/>
- <median/>
- <!-- absvalue/ -->
- <flatten/>
- <clamp/>
- <threshold/>
- <coincident/>
-</plotmanips>
-
-</config>
-
+<?xml version="1.0" ?>\r
+<!-- To comment something, put dashes and ! like here -->\r
+<config>\r
+<!-- Internal variabls. -->\r
+ <display ext="1" colour_ext="None" ret="1" colour_ret="None" correct="1" colour_correct="None" contact_point="0" medfilt="0" xaxes="0" yaxes="0" flatten="1" temperature="301" auto_fit_points="50" auto_slope_span="20" auto_delta_force="10" auto_fit_nm="5" auto_min_p="0.005" auto_max_p="10" baseline_clicks="0" auto_left_baseline="20" auto_right_baseline="20" force_multiplier="1" fc_showphase="0" fc_showimposed="0" fc_interesting="0" tccd_threshold="0" tccd_coincident="0"/>\r
+\r
+<!-- \r
+The following section defines your own work directory. Substitute your work directory.\r
+ -->\r
+<workdir>\r
+ insert directory\r
+</workdir>\r
+\r
+<!--\r
+The following section defines the default playlist to load at startup.\r
+-->\r
+<defaultlist>\r
+ test.hkp\r
+</defaultlist>\r
+\r
+<!--\r
+This section defines which plugins have to be loaded by Hooke.\r
+ -->\r
+<plugins>\r
+ <fit/>\r
+ <procplots/>\r
+ <flatfilts/>\r
+ <generalclamp/>\r
+ <!-- dummyguiplug/ -->\r
+ <!-- superimpose/ -->\r
+ <generalvclamp/>\r
+ <massanalysis/>\r
+ <viewer/>\r
+ <!-- tutorial/ -->\r
+ <macro/>\r
+ <autopeak/>\r
+ <pcluster/>\r
+ <generaltccd/>\r
+</plugins>\r
+\r
+<!--\r
+This section defines which drivers have to be loaded by Hooke.\r
+ -->\r
+<drivers>\r
+ <picoforce/>\r
+ <!-- picoforcealt/ -->\r
+ <hemingclamp/>\r
+ <csvdriver/>\r
+ <!-- tutorialdriver/ -->\r
+ <jpk/>\r
+ <mfp1dexport/>\r
+ <mcs/>\r
+</drivers>\r
+\r
+<!--\r
+This section defines which plot manipulators have to be loaded by Hooke,\r
+and -IMPORTANTLY- their order.\r
+ -->\r
+<plotmanips>\r
+ <correct/>\r
+ <median/>\r
+ <!-- absvalue/ -->\r
+ <flatten/>\r
+ <multiplier/>\r
+ <clamp/>\r
+ <threshold/>\r
+ <coincident/>\r
+</plotmanips>\r
+\r
+</config>\r
+\r
'''
styles: defines what is the style of the current plots. If undefined or None, it is line plot.
If an element of the list is 'scatter', the corresponding dataset
- is drawn with scattered points and not a continuous line.
+ is drawn with scattered points and not a continuous line.
'''
self.styles=[]