### Navigation

- previous
- Fityk home |
- Wiki/Trac |
- Fityk 0.9.4 manual »

# Appendix A. List of functions

The list of all functions can be obtained using `i+ types`. Some formulae here have long parameter names (like “height”, “center” and “hwhm”) replaced with

Gaussian:

SplitGaussian:

GaussianA:

Lorentzian:

SplitLorentzian:

LorentzianA:

Pearson VII (Pearson7):

split Pearson VII (SplitPearson7):

Pearson VII Area (Pearson7A):

Pseudo-Voigt (PseudoVoigt):

Pseudo-Voigt is a name given to the sum of Gaussian and Lorentzian. parameters in Pearson VII and Pseudo-Voigt are not related.

split Pseudo-Voigt (SplitPseudoVoigt):

Pseudo-Voigt Area (PseudoVoigtA):

Voigt:

The Voigt function is a convolution of Gaussian and Lorentzian functions. = heigth, = center, is proportional to the Gaussian width, and is proportional to the ratio of Lorentzian and Gaussian widths.

Voigt is computed according to R.J.Wells, Rapid approximation to the Voigt/Faddeeva function and its derivatives, Journal of Quantitative Spectroscopy & Radiative Transfer 62 (1999) 29-48. (See also: http://www.atm.ox.ac.uk/user/wells/voigt.html). The approximation is very fast, but not very exact.

FWHM is estimated using approximation by Olivero and Longbothum (JQSRT 17, 233 (1977)): .

VoigtA:

Exponentially Modified Gaussian (EMG):

LogNormal:

Doniach-Sunjic (DoniachSunjic):

Polynomial5:

# Appendix B. Grammar

The syntax of the fityk mini-language (it can be called a domain-specific language) will be defined formally during the work on a new parser.

The syntax below (in extended BNF) is not complete and may change in the future.

Note that each line is parsed and executed separately and no new line characters are expected.

    line ::= [{statement ';'} statement] [comment]

    comment ::= '#' { AllChars }

    statement ::= [with_st] ( commands_st |
                              define_st |
                              delete_st |
                              fit_st |
                              guess_st |
                              info_st |
                              plot_st |
                              set_st |
                              undefine_st |
                              assign_st |
                              dataset_st |
                              dump_st |
                              "quit" |
                              "reset" |
                              "sleep" Number |
                              '!' { AllChars } |
                              transform_st )

    with_st ::= With option {',' option}

    commands_st ::= Commands ...TODO
        (* TODO: commands > file -> set logfile file *)
        (* TODO: commands < file -> exec file *)
        (* TODO: commands ! shell command -> exec ! shell command *)

    define_st ::= Define ...TODO

    delete_st ::= Delete ( (delete_arg {, delete_arg}) |
                           ( '(' data_expression ')' in_arg ) )
    delete_arg ::= Varname | func_id | Dataset

    fit_st ::= Fit fit_arg in_arg
    fit_arg ::= ['+'] Number |
                "undo" |
                "redo" |
                "history" Number |
                "clear_history"

    guess_st ::= Guess ...TODO

    info_st ::= Info info_arg {',' info_arg} [redir]

    dump_st ::= "dump" redir (* to be replaced with info state *)

    plot_st ::= Plot ...TODO

    set_st ::= Set (option {',' option} | name)

    undefine_st ::= Undefine Word {, Word}

    assign_st ::= Varname '=' TODO |
                  func_id '=' TODO |
                  func_id '.' Word '=' TODO |
                  Dataset '.' 'F' '=' TODO |
                  Dataset '.' 'F' '.' Word '=' TODO |
                  Dataset '.' "title" '=' TODO

    dataset_st ::= (Dataset | "@+") ( '<' Filename {option} |
                                      '=' [Word] Dataset { '+' Dataset } {Word} )

    transform_st ::= transform_lhs '=' data_expression

    func_id = Funcname |
              (* TODO: Dataset '.' 'z' | *)
              Dataset '.' 'F' '[' Number ']'

    option ::= name '=' value

    string ::= QuotedString | Word

    QuotedString ::= "'" { AllChars - "'" } "'"

    Word ::= { AllChars - (Whitespace | ';' | ',' | '#' ) }

    AllChars ::= ? all characters ?

    Varname ::= '$' Word
    Funcname ::= '%' Word

    Commands ::= "c" | "co" | "com" | ... | "commands"
    Define ::= "def" | ... | "define"
    Delete ::= "del" | ... | "delete"
    Fit ::= "f" | "fi" | "fit"
    Guess ::= "g" | ... | "guess"
    Info ::= "i" | ... | "info"
    Plot ::= "p" | ... | "plot"
    Set ::= "s" | "se" | "set"
    Undefine ::= "undef" | ... | "undefine"
    With ::= "w" | ... | "with"

# Appendix C. License

Fityk is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Text of the license is distributed with the program in the file `COPYING`.

# Appendix D. About this manual

This manual is written using ReStructuredText. All changes, improvements, corrections, etc. are welcome. Use the `Show Source` link to get the source of the page, save it, edit, and send me either modified version or patch containing changes.

Following people have contributed to this manual (in chronological order): Marcin Wojdyr (maintainer), Stan Gierlotka, Jaap Folmer, Michael Richardson.

### Navigation

- previous
- Fityk home |
- Wiki/Trac |
- Fityk 0.9.4 manual »