<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">from matrixfilereader help <ahref="structerror_code.html#details">More...</a><br/></td></tr>
<trclass="memdesc:a45e930b8eadd7cf6a5f664befd87d725"><tdclass="mdescLeft"> </td><tdclass="mdescRight">initialize the package data folder. <ahref="#a45e930b8eadd7cf6a5f664befd87d725">More...</a><br/></td></tr>
<trclass="memdesc:ac7790f06151821678a65ab0065a5323e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">check that the package data folder exists <ahref="#ac7790f06151821678a65ab0065a5323e">More...</a><br/></td></tr>
<trclass="memdesc:a3f524f5190341d2accc8cb8c3ed2ceb5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">initialize the package and reload preferences after an experiment is loaded. <ahref="#a3f524f5190341d2accc8cb8c3ed2ceb5">More...</a><br/></td></tr>
<trclass="memdesc:ae2cfa1ac6651cfc3fb0dfce03494995b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">open a matrix file that was dropped into Igor. <ahref="#ae2cfa1ac6651cfc3fb0dfce03494995b">More...</a><br/></td></tr>
<trclass="memdesc:a8acd2b03343ef9bdfecaa75e831392d1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">load the preview of a Matrix data file <ahref="#a8acd2b03343ef9bdfecaa75e831392d1">More...</a><br/></td></tr>
<trclass="memdesc:af0eaec901e06ce59250eb434539a0f6c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">from matrixfilereader help <ahref="#af0eaec901e06ce59250eb434539a0f6c">More...</a><br/></td></tr>
<trclass="memdesc:a6ac0c685976b0e0c1944fb616a4f3a3c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">load all data from a Matrix data file. <ahref="#a6ac0c685976b0e0c1944fb616a4f3a3c">More...</a><br/></td></tr>
<trclass="memdesc:a0dc1efa23739e10b7558543b166e95b9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">split a matrix filename and return the first three parts <ahref="#a0dc1efa23739e10b7558543b166e95b9">More...</a><br/></td></tr>
<trclass="memdesc:a893405a122fdf70429f4f75b8877ed7d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">create or look up a data folder based on a matrix file name. <ahref="#a893405a122fdf70429f4f75b8877ed7d">More...</a><br/></td></tr>
<trclass="memdesc:a1a46b042e41daffee61706ab2cf54351"><tdclass="mdescLeft"> </td><tdclass="mdescRight">create a data folder for bricklet data. <ahref="#a1a46b042e41daffee61706ab2cf54351">More...</a><br/></td></tr>
<trclass="memdesc:ad74d5afa71179728a9237d1ec5884482"><tdclass="mdescLeft"> </td><tdclass="mdescRight">find out bricklet ID of a file <ahref="#ad74d5afa71179728a9237d1ec5884482">More...</a><br/></td></tr>
<trclass="memdesc:a59e72c849f4314aaa8339fd899665d85"><tdclass="mdescLeft"> </td><tdclass="mdescRight">open a matrix result or data file <ahref="#a59e72c849f4314aaa8339fd899665d85">More...</a><br/></td></tr>
<trclass="memdesc:abd09594d22038853e1e8021e0f36363d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">load a preview image from a Matrix data file. <ahref="#abd09594d22038853e1e8021e0f36363d">More...</a><br/></td></tr>
<trclass="memdesc:a6aeef317fd468c88c99a274338c70ae3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">load all data from a Matrix data file. <ahref="#a6aeef317fd468c88c99a274338c70ae3">More...</a><br/></td></tr>
<trclass="memdesc:a3a0ba4a7ad64739303b705d92be53267"><tdclass="mdescLeft"> </td><tdclass="mdescRight">load descriptive info from a Matrix data file. <ahref="#a3a0ba4a7ad64739303b705d92be53267">More...</a><br/></td></tr>
<trclass="memdesc:ab80101bc780dcbe94200e2446bce51d9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">remove linear background line-by-line <ahref="#ab80101bc780dcbe94200e2446bce51d9">More...</a><br/></td></tr>
<divclass="textblock"><p>data file import for omicron matrix (STM) files </p>
<p>the matrix file import requires the matrix file reader XOP by thomas braun (<ahref="http://www.igorexchange.com/project/matrixFileReader">http://www.igorexchange.com/project/matrixFileReader</a>) which in turn requires an installation of vernissage by omicron nanotechnology.</p>
<dlclass="section warning"><dt>Warning</dt><dd>EXPERIMENTAL the matrix import module and its interface may change radically in future revisions!</dd></dl>
<p>initialize the package and reload preferences after an experiment is loaded. </p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00085">85</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>open a matrix file that was dropped into Igor. </p>
<p>preliminary implementation. this should rather load the entire file and display a preview. graph windows should be reused by subsequent loads. also decide on a data saving location. </p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00102">102</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>initialize the package if the folder does not exist. </p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00072">72</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00045">45</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00212">212</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>generate elog message from bricklet metadata </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">metadata</td><td>two-column text wave </td></tr>
</table>
</dd>
</dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00120">120</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00145">145</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>create or look up a data folder based on a matrix file name. </p>
<p>the name of the folder is mtrx_date_time, where date and time are parsed from the file name. for this to work, the file name must consist of at least three parts that are separated by dash or underscore. the second (third) part contains the date (time). date and time are copied as strings.</p>
<p>if the data folder exists, a reference to the existing folder is returned.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">fileName</td><td>name of the result or data file.</td></tr>
<tr><tdclass="paramname">df_base</td><td>(optional) base data folder. default: current folder.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>reference of the newly created or existing data folder. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00360">360</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<dlclass="section warning"><dt>Warning</dt><dd>EXPERIMENTAL the code of this function is inefficient. the function may be removed in a later version.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">resultFile</td><td>base name of result file without chain link number and extension. as returned by mtrx_parse_filename.</td></tr>
<tr><tdclass="paramname">runCycle</td><td>requested run cycle. 0 = first available.</td></tr>
<tr><tdclass="paramname">scanCycle</td><td>requested scan cycle. 0 = first available.</td></tr>
<tr><tdclass="paramname">channel</td><td>channel name. for example: "I", "Z", "Aux(V)", etc. empty string: first available.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>bricklet ID, or -1 if an error occurred. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00461">461</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>the name of the folder is, for example "r23s2" where the first (second) number is the run (scan) cycle. run cycle and scan cycle numbers are taken from the open matrix file unless overridden by optional arguments.</p>
<p>if the data folder exists, a reference to the existing folder is returned. if one of the run or scan cycle numbers is lower than 1, the base folder is returned.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">df_base</td><td>(optional) base data folder. default: current folder.</td></tr>
<tr><tdclass="paramname">runCycle</td><td>(optional) run cycle number. must be >= 1. default: from last mtrx_open_file call.</td></tr>
<tr><tdclass="paramname">scanCycle</td><td>(optional) scan cycle number. must be >= 1. default: from last mtrx_open_file call.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>reference of the newly created or existing data folder. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00405">405</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00231">231</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>the data wave is loaded into a sub-subfolder the current data folder. the relative path has the format ":mtrx_{date}_{time}:r{run_cycle}s{scan_cycle}", where the parameters {date}, {time}, {run_cycle} and {scan_cycle} are copied from the file name. the file name must be formatted according to the specifications set out below.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">pathName</td><td>igor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed</td></tr>
<tr><tdclass="paramname">fileName</td><td>if empty a dialog box shows up the file name must adhere to the format "{prefix}-{date}-{time}-{anything}--{run_cycle}_{scan_cycle}.{extension}". the first three seperators can alternatively be underscores. it may be necessary to change the configuration of the Matrix application.</td></tr>
<tr><tdclass="paramname">traces</td><td>(currently not used) semicolon-separated list of preferred traces. the items of the list are match strings for the Igor StringMatch function. only matching traces are loaded from the file. default: "*Up;*Down;*ReUp;*ReDown;"</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>semicolon-separated list of loaded waves including partial path from current data folder. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00767">767</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>load descriptive info from a Matrix data file. </p>
<p>the info string lists the following information for each scan contained in the file:</p><ul>
<li>path of the scan group inside the file.</li>
<li>number of scan positions.</li>
<li>dataset names of scan positioners.</li>
<li>dataset names of detectors.</li>
</ul>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">APathName</td><td>igor symbolic path name. can be empty if the path is specified in AFileName or a dialog box should be displayed</td></tr>
<tr><tdclass="paramname">AFileName</td><td>if empty a dialog box shows up</td></tr>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00863">863</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>load a preview image from a Matrix data file. </p>
<p>the data wave is loaded into the current data folder.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">destName</td><td>destination wave name. the wave is created in the current data folder.</td></tr>
<tr><tdclass="paramname">pathName</td><td>igor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed</td></tr>
<tr><tdclass="paramname">fileName</td><td>if empty a dialog box shows up the file name must adhere to the format "{prefix}-{date}-{time}-{anything}--{run_cycle}_{scan_cycle}.{extension}". the first three seperators can alternatively be underscores. it may be necessary to change the configuration of the Matrix application.</td></tr>
<tr><tdclass="paramname">traces</td><td>(currently not used) semicolon-separated list of preferred traces. the items of the list are match strings for the Igor StringMatch function. only the first matching trace is loaded from the file. default: "*Up;*Down;*ReUp;*ReDown;"</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>semicolon-separated list of loaded waves including partial path from current data folder. </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00682">682</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>this function opens a matrix result file (.mtrx) or data file (.*_mtrx).</p>
<p>if a data file is selected, the function locates the corresponding result file, opens it, and looks up the bricklet ID of the data file. if a result file is selected, the function opens it but does not look up bricklet IDs.</p>
<p>the result file remains open and can be accessed using the mtrx_ functions or MFR_ operations. once a result file is open, you can easily access any bricklets linked to it, i.e., any run cycle, scan cycle, and channel.</p>
<p>the function stores information about the opened file in a global package data folder. if the same result file is opened again later, the information is reused and the file not read again. this may cause problems if the file has been modified in the meantime, or if the cached data become corrupt for some reason. the function detects if a data file is not linked in the open result file, and updates the cache. in other situations it may be necessary to force a reload.</p>
<dlclass="todo"><dt><b><aclass="el"href="todo.html#_todo000005">Todo:</a></b></dt><dd>fix possible cache issues, add an option to override the cache.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">pathName</td><td>igor path name or empty string.</td></tr>
<tr><tdclass="paramname">fileName</td><td>file name, with or without path, or empty string.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>file type <ul>
<li>0 result file (logbook) </li>
<li>1 result data file (bricklet) </li>
<li>-1 error, no data loaded </li>
<li>-2 matrixfilereader.xop not installed </li>
</ul>
</dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00545">545</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>parse matrix file names for result name, run cycle, scan cycle, and channel.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">fileName</td><td>matrix result or data file name (without path).</td></tr>
<tr><tdclass="paramname">resultFile</td><td>(out) base name of the result file. append "_%04u.mtrx" to get the actual result file. we do not know the chain link number at this stage.</td></tr>
<tr><tdclass="paramname">runCycle</td><td>(out) run cycle number. necessary to look up the bricklet ID.</td></tr>
<tr><tdclass="paramname">scanCycle</td><td>(out) scan cycle number. necessary to look up the bricklet ID.</td></tr>
<dlclass="section return"><dt>Returns</dt><dd>file type <ul>
<li>0 result file (logbook) </li>
<li>1 result data file (bricklet)</li>
</ul>
result file names look like: default_2015Apr20-124353_STM-STM_AtomManipulation_0001.mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation_0002.mtrx, etc. the function returns the first part up to the experiment name ("AtomManipulation" in the examples). all other return values set to defaults and must not be regarded.</dd></dl>
<p>result data files look like: default_2015Apr20-124353_STM-STM_AtomManipulation–136_1.Aux1(V)_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–136_1.I(V)_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–14_1.I_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–14_1.Z_mtrx, etc. the function returns all results as described in the parameter list. </p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00294">294</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00829">829</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>split a matrix filename and return the first three parts </p>
<p>we assume that the second (third) part contains the date (time). the parts are separated by dash or underscore. </p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00332">332</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<p>the preview is loaded to the preview_image wave in the pearl_explorer data folder.</p>
<p>the s_file_info string is updated with information about the scan dimensions.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">filename</td><td>name of a file in the directory specified by the pearl_explorer_filepath path object.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>wave reference of the preview image </dd></dl>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00170">170</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00886">886</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00040">40</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00037">37</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="pearl-matrix-import_8ipf_source.html#l00038">38</a> of file <aclass="el"href="pearl-matrix-import_8ipf_source.html">pearl-matrix-import.ipf</a>.</p>