Sirius wiki tutorial

From .:: Wiki-Sirius ::.
Jump to: navigation, search

Introduction

Wiki is a collaborative documentation system with embedded user authentication, version control, user discussion and messaging, file upload and management. The system is conceptually composed of the following elements: users, groups, pages, namespaces, templates, files and modules. For a usefull startup page on wiki formatting, click here!

Pages

Pages are the main objects in the wiki system: they are documents (text) written in wiki markup language. The usually contains references to other wiki pages or to external url pages. They can also contain markups to transclude other wiki pages, that is, take their contain and embed them into current page. Each wiki page has a unique name. For example the name of this page is Sirius wiki tutorial and is displayed in the browser address bar.

Namespaces

Each page when first created can be given a namespace attribute. This is accomplished by prefixing the name of the page with the namespace label followed by a colon. For example Machine:Storage ring is the full name of the page Storage ring which belong to namespace Machine. Namespaces are a way of grouping pages to reflect the natural categorization of the wiki documentation. There are a number of default build-in namespaces:

  • (Main) default nameless namespace. A page without namespace falls in this namespace by default
  • File namespace that contains all upload files
  • File Talk each page in namespace File has an associated page with the same name in namespace ' File Talk
  • User namespace with users page
  • User Talk pages in this namespace are used to send messages to corresponding users
  • Template namespace for pages whose function is to be used as Templates (see below)
  • Template Talk namespace for discussions on the template or for testing templates
  • Module namespace for Lua scripts (see below)
  • Module Talk namespace testing corresponding Lua scripts or discussions
  • etc

A number of additional namespaces have been defined for Sirius wiki system. They are all described in the sections below.

Sirius namespace Machine

This namespace should contain pages comprising the project documentation

Sirius namespace Table

Pages in Machine namespace will refer to tables with parameters for the Sirius project. Each table, concentrating correlated parameters, should be defined in a separate wiki page. This way the same table maybe reused in several pages using the mediawiki mechanism of page transclusion (see examples). Pages for each table has the potential to minimize efforts in keeping information updated across the documentation.

One can use the following external link, Table Generator, to generate wiki markup text for table. Just use its interface to edit the table and copy the generated markup text and paste it into the Sirius wiki page.


Sirius namespace Parameter

Pages within Machine or Table namespaces will make reference to parameters of the Sirius project, such as the storage ring lattice circumference, for example. For each sirius parameter there should be an associated page with its current value, the LNLS group responsible to define and update its value, a revision control history and observations. Sirius parameters fall within two categories: primitive and derived parameters. Values for primitive parameters are set in the parameters'page as independent values. Derived parameters are dependent of other parameters and their values are defined as mathematical expressions in the corresponding pages. Some useful constants and functions have been added to be used in these expressions. To define a derived parameter, set the Derived section on its page to True. Then, in the Value section, add an expression with parameter names to be replaced by values between double quotes (e.g.: "SI beam energy"). The list of valid operators, constants and functions can be found at the code GitHub repository.

For magnets, for example, there are a number of different ways for creating primitive and derived parameters. Integrated quadrupole strengths and effective lengths may be primitive while the quadrupole strength can be defined as a derived parameter. Or the integrated strength can be defined as derived from the quadrupole strength and effective length. In order to define things consistently for all magnets the diagram below is recommended.

Figure 1: Diagram showing how each magnet parameter should be derived. KL, R and L are primitive parameters: integrated strength, magnetic rigidity and effective length. GL = KL*R, K = KL / L are derived from primitive parameters and correspond to integrated field gradient (quadrupolar, sextupolar, etc) and strength. G = GL / L is the local gradient derived from GL and L

Sirius extension tags

  • <sirius>: This tag is used to retrieve a Sirius parameter value and its units. The value string is linked to the parameter page. The tag is implemented in the Parameters wiki extension.
  • <sirius_value>: This tag is used to retrieve a Sirius parameter value. The value string is linked to the parameter page. The tag is implemented in the Parameters wiki extension.
  • <sirius_units>: This tag is used to retrieve a Sirius parameter units. The tag is implemented in the Parameters wiki extension.
  • <math_expr>: This tag is used to calculate derived math expressions from other ones (including constants). The tag is implemented in the Parameters wiki extension.
  • <parameter_list>: This tag is used to retrieve a list with all Sirius subsystem parameters. The subsystems are: LI - main storage ring, TS - booster to main storage ring transport line, BO - booster storage ring, TB - linac to booster transport line and LI - linac.

When using expressions in derived parameters a few constants and functions are available. These constants and functions can be read from this PHP file at GitHub.

Sirius templates

A few Sirius template pages have been implemented whose purpose is to simplify the syntax of the markup text.

Text formatting

the templates bellow are useful for text formating

  1. Template:script: formats strings that represent names of scripts. Ex.: {{script|lnls_setpath_mml_at}} → lnls_setpath_mml_at
  2. Template:path: formats strings that represent names of paths. Ex.: {{path|/home/fac_files}} → /home/fac_files
  3. Template:Caption: transcludes text in section caption from figure summary.
  4. Template:SiriusTable: Table style configuration.


FAQS

how to create a new page

how to update a project parameter

how to create tables with GUI

tablesgenerator.com