Instrument Simulation:mcstas:Installation

From DANSE

Table of contents

This page is out of date

Please refer to Install DANSE simulation packages (http://arcscluster.caltech.edu:5001/Install/InstallInstrumentSimulationFromSource)

install pyre framework. please refer to Installing_build_procedure_and_framework

install simulation package

Installing simulation package

install mcstas [1] (http://neutron.risoe.dk)

  1. Instructions: [2] (http://neutron.risoe.dk/download/src/install_docs/html/install.html)
  2. unset $MCSTAS if it is not set to the mcstas executable
  3. Mac OS X note: Just follow the installation instructions for Linux.

install swig [3] (http://www.swig.org/)

  1. You can download the source code or binary package here: [4] (http://sourceforge.net/project/showfiles.php?group_id=1645)
  2. Follow the INSTALL file in the installation tree. The usual way:
./configure
make
make install


With installaions of mcstas and swig, do the following

make sure mcstas and swig are in $PATH

install pyre-mcstas

check out mcstas package into $DV_DIR

$ cd $DV_DIR
$ cvs -d username@cvs.cacr.caltech.edu:/srv/cvs/arcs co arcs/packages/mcstas 

Now let us make an environment variable

$ PYRE_MCSTAS = $DV_DIR/arcs/packages/mcstas

for convenience. To build the package

$ cd  $PYRE_MCSTAS
$ mm export 
$ mm 

now we need to wrap all mcstas components to pyre-mcstas components

$ cd ~
$ python 
>>> from mcstas_wrapper import Wrapper
>>> Wrapper.wrap_all() 

this will take a while. If sucessful, we can now build the pyre-mcstas components

$ cd  $PYRE_MCSTAS/pyre_components
$ mm 

This concludes the installation.

For the first test

$ cd $PYRE_MCSTAS/tests
$ ./instr_test1.py 
Personal tools
Document Uploads/Links