Skip to content

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.

License

Notifications You must be signed in to change notification settings

yaohualiu/McCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/*******************************************************************************
*
* McStas, neutron ray-tracing package
*         Copyright 1997-2018, All rights reserved
*         Technical University of Denmark, Kongens Lyngby, Denmark
*         Institut Laue Langevin, Grenoble, France
*
* Documentation: README
*
* %Identification
* Written by: KN, KL, PEO, EF, PW
* Date: 2008
* Origin: Risoe
* Release: all McStas
*
* This file is part of McStas.
*
* %Link
* <a href="http://www.mcstas.org">Official McStas website</a>
*
* %End
*******************************************************************************/

This is McStas 2.x
Copyright (C) Technical University of Denmark, 1997-2018. All rights reserved.
See the file COPYING for conditions on use.
This software is covered by the GNU General Public License. User instrument
files generated by McStas, output data or papers based on these use is NOT
considered "derived work" but is considered normal usage of the software.
The random number algorithm used by default in McStas is the "Mersenne Twister",
by Makoto Matsumoto and Takuji Nishimura
(see http://www.math.keio.ac.jp/~matumoto/emt.html). This code is included in
the file lib/mcstas-r.c and is distributed under the terms of the GNU
Library General Public License, see the file lib/LGPL.

If you wish to use McStas in ways that contradict the conditions,
contact us and chances are that we will be able to make a suitable
arrangement.

Installation instructions are in the doc/install_docs directory.

Changes from previous versions are in the file CHANGES. Please read that !

To get started, some example instrument definitions have been supplied
in the mcstas-comps/examples/ directory. To run a simulation, the command `mcrun' is
used. For example:

    mcrun ISIS_Prisma2.instr -n2e6 TT=-30 PHA=22 PHA1=-3 PHA2=-2 PHA3=-1 PHA4=0 PHA5=1 PHA6=2 PHA7=3 TTA=44

This will first compile the instrument definition (if necessary) and
subsequently run it. It is also possible to run simulations from the
graphical user interface `mcgui', or to compile and run simulations
manually.

The output files will be put in the current directory by default. The
file tas1-scans in the example directory is a script that will run a
series of simulations that constitute a line-up experiment of the TAS1
spectrometer at Ris.

To fully utilize McStas, you will need a copy of the McStas manual. It
may be found in the lib/doc directory of the distribution.
The manual, along with much other information, is
available from the McStas WWW home page:

    http://www.mcstas.org

Contacts for McStas are:
  Kim Lefmann <[email protected]> (KL)
  Emmanuel Farhi <[email protected]> (EF)
  Peter Kjaer Willendrup <[email protected]> (PW)
  Erik Knudsen <[email protected]> (EK)

Previous authors are:
  Kristian Nielsen, email <[email protected]> (KN)
  Per-Olof �trand <[email protected]> (PEO)
  Klaus Lieutenant <[email protected]> (KL2)
  Peter Christiansen <[email protected]> (PC)

Feel free to direct any comments or questions
to this address. It is an important goal of the McStas project to have
the program used also outside of Ris, so if you have a reasonable
request there is a good chance that we will be willing to help you out.

Some parts of McStas require additional software to be installed in
order to work. The needed software packages are all freely
distributable, and can be found on the McStas WWW home page or on the
McStas CD-Rom distribution.

 - The 'mcstas' base program only requires a C compiler, which is usually
   provided with most Unix/Linux systems. For Windows, a MinGW C compiler
   is shipped with Strawberry-Perl which we recommend.
 - The `mcrun' front-end requires Perl or python,
   which are available on most Unix-like systems, and may installed for
   Windows as well.
 - The `mcdisplay' front-end requires Perl or python, and one
   of the following:
   1- the PGPLOT graphics Fortran library, and the PgPerl interface
      between Perl and PGPLOT
   2- Matlab or iFit
   3- a VRML/X3D viewer (we recommend InstantPlayer)
   
 - The `mcplot' front-end requires Perl or python, and one
   of the following:
   1- the PGPLOT graphics Fortran library, and the PgPerl interface
      between Perl and PGPLOT, and the PDL scientific data extension
      for Perl.
   2- Matlab or iFit
   3- Gnuplot
   4- Python/matplotlib or Python/chaco.
   
 - The `mcgui' front-end requires  Perl, the perl/tk
   perl extension, and one of the following:,
   1- the PGPLOT graphics library, the PgPerl interface between Perl
      and PGPLOT, and the PDL scientific data extension for Perl.
   2- Matlab or iFit
   3- Gnuplot

Information on Perl may be found on
    http://language.perl.com/index.html
Information on Tcl/Tk may be found on
    http://tcl.tk.com/
  and
    http://strawberryperl.com/ (includes a C compiler)
Information on perl/tk may be found on
    http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html
Information on PGPLOT may be found on
    http://astro.caltech.edu/~tjp/pgplot/index.html
Information on PgPerl may be found on
    http://www.aao.gov.au/local/www/kgb/pgperl/
Information on PDL may be found on
    http://www.aao.gov.au/local/www/kgb/perldl/
Information on Matlab may be found on (commercial)
    http://www.mathworks.com
Information on iFit may be found on (free)
    http://ifit.mccode.org/


About

The home of the McStas (neutrons) and McXtrace (x-rays) Monte-Carlo ray-tracing instrument simulation codes.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 64.9%
  • Fortran 12.3%
  • Perl 8.6%
  • Shell 2.8%
  • Python 1.6%
  • Makefile 1.5%
  • Other 8.3%