Faq import three-way data and Faq obtain or use recompilation license for PLS Toolbox: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Bob
No edit summary
 
imported>Lyle
(Created page with "===Issue:=== How do I obtain or use a recompilation license for PLS_Toolbox? ===Possible Solutions:=== The standard [http://www.eigenvector.com/software/license_evri.html P...")
 
Line 1: Line 1:
===Issue:===
===Issue:===


How do I import three-way data into Solo or PLS_Toolbox?  
How do I obtain or use a recompilation license for PLS_Toolbox?


===Possible Solutions:===
===Possible Solutions:===


'''Solution 1) Built in EEM importers :'''
The standard [http://www.eigenvector.com/software/license_evri.html PLS_Toolbox license] does not permit recompilation of any part of the code without written permission from Eigenvector Research, Inc. This permission is usually in the form of a recompiliation license (for more information on recompilation licenses, see: our [http://www.eigenvector.com/evriblog/?p=27 Blog post on Compiling PLS_Toolbox] ).


If applicable to your file type, use one of the built in EEM importers. There are importers for EEM data from Hitachi, Shimazdu, Horiba and Jasco. Please see this wiki entry for more information on [[Data_Importing_Formats | Data Importing Formats]]
If you have purchased a recompiliation license for PLS_Toolbox and/or other Matlab-based Eigenvector Research products, you can use the following instructions to compile your application including the licensed Eigenvector Research (EVRI) code.


EEM data needs be configured in a specific way such that:
# If you were not supplied an ''evrilicense.lic'' file by EVRI, create one by copying the license code supplied for your compilation license (found on the download tab of your EVRI account) into a plain-text file named: ''evrilicense.lic'' The file should consist of the license code on a single line of the file. For example: <pre>12345678-98765432-ab-1234-1234</pre>
# Copy the ''evrilicense.lic'' file into one of the folders on your Matlab path. This could be either one of the PLS_Toolbox folders, or your application's folder.
# Add the ''evrilicense.lic'' file to the "Shared Resources" list in the Matlab project builder. This will assure that the EVRI license gets included in the compiled application.
# Compile your application as usual using Mathworks' standard instructions. The Matlab dependency logic will automatically include the PLS_Toolbox functions in your compiled application. (See note below regarding "blocking" certain functions from being included.)


* '''mode 1''' corresponds to '''samples'''
'''Blocking Unnecessary Functions'''


* <div>'''mode 2''' corresponds to '''emission'''</div>
By default, Matlab's compiler automatically identifies all m-files which are necessary to run your application and includes all of these in the compiler output. Because of the integrated nature of many of the PLS_Toolbox functions, this can lead to "sprawl" - inclusion of many more functions than are actually needed.


* <div>'''mode 3''' corresponds to '''excitation'''</div>
One way to help reduce these unnecessary additions is to create empty "shell" functions to overload certain PLS_Toolbox functions. These functions, if placed in a folder above PLS_Toolbox when you are compiling, will shadow (hide) the actual function and help avoid sprawl. In particular the following functions are useful to shadow:


The built-in EEM importers will handle this configuration automatically. When importing manually (see below), further manipulation will likely be necessary. Use the Transform &rarr; Permute modes and Transform &rarr; Reshape smenu items to modify your imported data as appropriate.
*analysis.m
*browse.m
*plotgui.m
*browse.m
*evriinstall.m
*evrireporterror.m


'''Solution 2) For three-way data with few slabs:'''
These functions will not be called in normal operation and, in most cases, our compilation licenses do not permit their inclusion in your application anyway.


<ol style="list-style-type:lower-alpha">
'''Uninstall the Stats Toolbox '''
  <li>Import the data slabs into the workspace (browser). The workspace browser is available from the main analysis user interface from the menu item FigBrowser.</li>
  <li>Each slab, i.e. each matrix of data is imported individually. Hence, if you have a '''10x8x3''' array, you will import three slabs each of size '''10x8'''.</li>
  <li>Use the mouse to drag slab two onto slab one. In the window that opens choose Augment and then choose augment in the Slabs direction.</li>
  <li>A two-slab three-way array has now replaced the first data matrix. More slabs can be added in the same fashion.</li>
</ol>


Alternatively, you may also open one slab in the dataset editor and then add additional slabs using File &rarr; Import. After selecting the next slab to import, answer the same questions as in step c above. Repeat for each slab.  
Although moving the Stats Toolbox below PLS_Toolbox on your MATLAB path (or removing the Stats Toolbox folders altogether) will allow the PLS_Toolbox DataSet Object to function normally, you must uninstall the Stats Toolbox before compiling PLS_Toolbox function that require the DataSet Object.  


'''Solution 3) For larger three-way data:'''
The MathWorks states:  


In the DataSet editor, you can import a full three-way array if you have it organized as a two-way matrix. Upon importing the two-way data, you can reshape to a three-way array using the menu item: Transform &rarr; Fold into 3-way.  
"When you compile [a program] into an application and run it, the MATLAB Compiler Run-time references its in-built Dataset function which is higher in its PATH and hence runs the data against this inbuilt Dataset function."


For example, you have the above matrices (three slabs) in one table/matrix:
For more information on the DataSet Object history see here:  
 
*[http://www.eigenvector.com/evriblog/?p=10 DataSet Object Conflict]
  [ Slab1;
*[http://www.eigenvector.com/evriblog/?p=11 DataSet Object — Letter to MathWorks March 15, 2007]
  Slab2;
  Slab3 ]
 
hence have the three slabs below each other. Upon importing, use the menu option described above to "Fold into 3-way" and choose three as the number of slabs and the data will be rearranged accordingly. If you are familiar with the MATLAB function <code>reshape</code>, you may also use Transform &rarr; Reshape for other types of rearrangements.
 
Note: the result of this command will give you slabs in the 3rd mode of the DataSet. If these slabs are separate samples (such as with EEMs), you'll want to use the Transform &rarr; Permute menu to reorder the dimensions. For example, permuting to the order [3 2 1] would swap the order of the 1st and 3rd modes, putting slabs as the first mode.
 
 
'''Still having problems? Please contact our helpdesk at [mailto:helpdesk@eigenvector.com helpdesk@eigenvector.com]'''


[[Category:FAQ]]
[[Category:FAQ]]

Revision as of 10:58, 28 November 2018

Issue:

How do I obtain or use a recompilation license for PLS_Toolbox?

Possible Solutions:

The standard PLS_Toolbox license does not permit recompilation of any part of the code without written permission from Eigenvector Research, Inc. This permission is usually in the form of a recompiliation license (for more information on recompilation licenses, see: our Blog post on Compiling PLS_Toolbox ).

If you have purchased a recompiliation license for PLS_Toolbox and/or other Matlab-based Eigenvector Research products, you can use the following instructions to compile your application including the licensed Eigenvector Research (EVRI) code.

  1. If you were not supplied an evrilicense.lic file by EVRI, create one by copying the license code supplied for your compilation license (found on the download tab of your EVRI account) into a plain-text file named: evrilicense.lic The file should consist of the license code on a single line of the file. For example:
    12345678-98765432-ab-1234-1234
  2. Copy the evrilicense.lic file into one of the folders on your Matlab path. This could be either one of the PLS_Toolbox folders, or your application's folder.
  3. Add the evrilicense.lic file to the "Shared Resources" list in the Matlab project builder. This will assure that the EVRI license gets included in the compiled application.
  4. Compile your application as usual using Mathworks' standard instructions. The Matlab dependency logic will automatically include the PLS_Toolbox functions in your compiled application. (See note below regarding "blocking" certain functions from being included.)

Blocking Unnecessary Functions

By default, Matlab's compiler automatically identifies all m-files which are necessary to run your application and includes all of these in the compiler output. Because of the integrated nature of many of the PLS_Toolbox functions, this can lead to "sprawl" - inclusion of many more functions than are actually needed.

One way to help reduce these unnecessary additions is to create empty "shell" functions to overload certain PLS_Toolbox functions. These functions, if placed in a folder above PLS_Toolbox when you are compiling, will shadow (hide) the actual function and help avoid sprawl. In particular the following functions are useful to shadow:

  • analysis.m
  • browse.m
  • plotgui.m
  • browse.m
  • evriinstall.m
  • evrireporterror.m

These functions will not be called in normal operation and, in most cases, our compilation licenses do not permit their inclusion in your application anyway.

Uninstall the Stats Toolbox

Although moving the Stats Toolbox below PLS_Toolbox on your MATLAB path (or removing the Stats Toolbox folders altogether) will allow the PLS_Toolbox DataSet Object to function normally, you must uninstall the Stats Toolbox before compiling PLS_Toolbox function that require the DataSet Object.

The MathWorks states:

"When you compile [a program] into an application and run it, the MATLAB Compiler Run-time references its in-built Dataset function which is higher in its PATH and hence runs the data against this inbuilt Dataset function."

For more information on the DataSet Object history see here: