MoMo R5.1: Setup

1. Contents
2. Setup: 2.1Prerequisites
2.2Installation of files
2.3Network installation
2.5Add MoMo to the Matlab's search path
2.6License activation
2.7 Summary: installation per net/computer/user
3. Preferences
4. Sessions
5. Command line
6. Models
7. Visualize C3D
8. Administration
9. Changes

2.1 Prerequisites

MoMo R5.0 needs Matlab 6.5 or higher. Exhaustive tests have been performed under Matlab 6.5.1 (R13.1), 7.7 (R2008b), 7.8 (R2009a) and Windows 2000 SP4 and Windows XP SP3.
Note: Matlab 6.5.0 must be updated to 6.5.1 or 6.5.2!
Although all functions of the GL-toolbox and MoMo are designed to work under Windows, Linux and MacOS-X, some MEX functions and MoMo's license management run under Windows only.
To export PDFs, GhostScript® v7.04 or higher (8.5 is fine) is needed. It is a free program, which can be downloaded from: Note: GhostScript must be installed locally on each computer. The GhostScript shipped with Matlab creates PDF files with a reduced quality only.
For the post-processing of picture files created by MoMo, the free software ImageMagick® recommended, but not necessary and not shipped with MoMo. ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.
E.g. ShowC4D displays the ImageMagick command for joining exported PNG files to an animated GIF, which is smaller and sharper than AVI movies usually.

2.2 Installation of files

The Matlab functions of MoMo and needed data are shipped in different folders, which are explained in the following table:
Name Path (example) Description
<MFiles> D:\MFiles
Base folder for all Matlab functions of MoMo. Do not create this folder inside Matlab's root directory (see matlabroot)! The code management needs the folder name to equal or include the string "MFiles", e.g. "MFiles2", "MFiles_Dec2008".
<Inits> D:\MFiles\Inits2 Scripts for initializing the path of Matlab. This should be the only folder of MoMo stored permanently in the Matlab path.
<MoMo> D:\MFiles\MoMo\R5.0 Release of MoMo with all subfunctions. For different builds a bunch of subfolders appears here.
<Filters> D:\MFiles\Filters Input and output of files: C3D, ENF, ASC, ...
<Docs> D:\MFiles\Docs Documentation and log files.
<Errors> D:\MFiles\Errors The function BugReport creates a standardized report here in case of errors. Errors occurring in momog are saved to <MoMoData>\BugReport.
<Tools> D:\MFiles\Tools The GL-toolbox containing functions for accessing files, GUI elements, mathematical calculations, strings, structs and self testing. Compiled MEX scripts are in the subfolder <Tools>\Mex.
<User> D:\MFiles\User\<Name> If different users create a bunch of experimental model scripts for MoMo, it is safe to keep these scripts separately. MoMo finds the <User>-folder by searching the file "UserNotes_MoMo.txt" in Matlab's search path. This folder need not be a child of the <MFiles> folder. See also: momo help UserNotes.
<MoMoData> D:\MoMoData
This folder contains support data for MoMo: Norm data, definitions of session-sets, bug reports, default results folder, pictures and test data. To tell MoMo the location of this folder type: momo_local $edit or more general: see: momo prefs.
<DataBase> D:\MoMoData\DB MoMo can export its results as ASCII files. Especially averaged sessions are very practical in this format, because they usually contain all needed data for calculations concerning a group of patients. The ASCII format ensures a long time availability of the data.
<WorkPath> D:\MoMoData\Results This is the destination path for exported file, which do not belong to the database, e.g. PDFs, picture files or movies from ShowC4D. The folder can depend on the current user, a specific study or the date, e.g. "<MoMoData>\Results\Foot\Deb\Mar2009". This path is controlled by MoMo_local('$edit') or the MoMo button in the see: momo prefs dialog.
<Cache> tempdir
The repeated processing of a session can be accelerated remarkably, if the contents of the C3D files is stored as copy on the local hard-drive. Therefore for each session a temporary file is written to the local temp folder. The size of this folder can be controlled by the function moCacheFile, which is e.g. called by a right-click on the "Cache trials" button in the MoMoG dialog. More help: help moCacheFile.
The complete cache folder can be deleted without loosing any data.
Tip: Move the TEMP folder under Windows to e.g. D:\Temp. This is less confusing, because it does not use the ugly short-name methods of Windows. See "Environment" in the system control panel.
<Preferences> prefdir\JSim The preferences of MoMo and the GL-toolbox are stored in this folder, which is determined by Matlab individually for each user. All files stored here can be deleted in case of problems. They are recreated automatically asking the user for new settings.
<GhostScript> C:\Program files\gs For the creation of PDFs, GhostScript must be installed locally on each computer (see Prerequisites).
To install MoMo's files, just the folders <MFiles> and <MoMoData> have to be copied from the shipped archive to your hard disk. All other folders are included or created automatically. Beside this standard, <DataBase> and <WorkPath> can be defined outside the <MoMoData> path also and need to be created in this case naturally.
In addition GhostScript is needed on each computer to create PDFs.

2.3 Network installation

MoMo is designed to work in a network environment. The <MFiles> and <MoMoData> folders can be stored centrally on a network drive, while the user related data as preferences, lists of recently processed sessions and cached trials are stored locally on each computer and for each user.
A stand-alone version of MoMo, which runs e.g. on laptops apart from the local area network, is available. Please ask the author for instructions.
Note: Processing one session from different computers at the same time can lead to unpredictable results. MoMo R5.0 does not warn the users in this situation, so please care for working on a session folder alone!
Note: UNC path names as "\\server\folder\" are not completely supported. Please map the network drives to a drive letter as "D:\MFiles".

2.4 Uninstall

On each computer MoMo is running on: Finally delete the following folders (either locally or on the network drive):

2.5 Add MoMo to the Matlab's search path

The folder <Inits>, which contains the function inigl, is the only folder, which must be included in Matlab's search path permanently. The other folders of MoMo and the GL-toolbox are managed by the function inigl. This allows an easy switching between different versions of MoMo and users can add their own folders without interfering with eachother. The sets of folders are defined in editable text files, which are read by inigl.
Procedure to store the <Inits> folder permanently in the Matlab path:
  1. Start Matlab
  2. cd <MFiles>\<Inits>   (replace <MFiles> and <Inits> with the individual path names!)
  3. inigl $install
Now the command inigl $init StandardGL inserts the folders for the newest MoMo releases temporarily in Matlab's search path. The parameter "$init" can be omitted, and the folder set "StandardGL" is the default, so you can write simply inigl without arguments. For another version of MoMo type e.g.: inigl MoMoR5_0_10. A list of known folder sets is shown by: inigl $list.
You can modify an existing folder set, e.g. to add personal folders for each user:
  1. inigl $edit StandardGL
  2. Modify the file (see tips in the file header)
  3. Save the file under a new name, e.g. "User1.ini". It is saved inside the folder <MFiles>\<Inits>\Versions, so it is available for all users immediately.
  4. Finally inigl User1 activates the new folder set for the current Matlab session or until another folder set is chosen.
The arguments of inigl are not case-sensitive.
The parameter "$lazy" is similar to "$init", but it omits the useful but time-consuming test for uniqueness of file names.
More information: help inigl.
Since MoMo R5.0.12, inigl manages the patches for the different Matlab versions dynamically. Therefore the installation of MoMo does not need patching Matlab's toolbox functions anymore. See the change log, 19-Jun-2009.

2.6 License activation

The license of MoMo must be activated once for the host (the drive containing the <MFiles> folder) and for each client (the computer running MoMo, but not for each single user). These activations are performed by momo install and the host- or client-password, respectively.
The stand-alone version for laptops needs a client-activation every 3 months.
The activation status of the current computer can be checked with momo license.
All changes of the license status are written to a log file, which contain all data to recreate the list of licensed computers. The file is shown with: momo licenselog. This log file can be used to recreate the current license file - please ask me, if this is needed. In addition, a backup of the license file is created at each activation of a new client. If the activation process fails and the current license file is damaged, ask the author for instructions, how to restore the former status.
See also: help momoLicense
Notes: Passwords, which have been sent by email, are encrypted by MaskPassword.

2.7 Summary: installation per net/computer/user

Installation in chronological order on a network or stand-alone computer:
  1. Install Matlab, GhostScript and ImageMagick (optional) on each computer.
  2. Copy the folders <MFiles> and <MoMoData> from the installation files to a network drive.
  3. Create the folders <DataBase> and <WorkPath> on a network drive for exporting results. Both folders can be children of <MoMoData> and they may contain some subfolders depending on the lab's needs.
  4. Start Matlab and move into <MFiles> with cd('<MFiles>\<Inits>').
    Insert the <Inits> folder permanently in the Matlab path with: inigl $install.
  5. Insert the folders of MoMo and the GL-toolbox in the Matlab path: inigl.
  6. For an easier installation of the clients, you can store the name of the lab and defaults for the folders needed by MoMo and the database with Default_local $edit permanently.
  7. Activate the host-license once: momo install and type in the host-password.
  8. Define the preferences of MoMo with see: momo prefs. If the defaults are well defined by Default_local $edit (see above), Start all is sufficient. The values can be adjusted for each user and on each client computer separately.
  9. Test the proper installation and compatibility with your Matlab version:
    CheckSyntax $user detail (should fail for unit-test functions only)
    addunittest; UnitTest (needed result: "No unexpected errors occurred")
    momoSelfTest (needed result: "[TRUSTED]")
After the above installation has been performed once, adding clients needs the steps 1., 4., 5., 7. and 8. only:
Author: © Jan Simon, Imprint / Impressum   File: Help/momo_5.1/setup.html    24-Nov-2018   MoMo: 5.1.34