IFEFFIT_SHELL(1p) | User Contributed Perl Documentation | IFEFFIT_SHELL(1p) |
ifeffit - Shell Interface to IFEFFIT
ifeffit is a shell interface to the Ifeffit XAFS Analysis System. Ifeffit commands are entered and executed as they are typed in, giving complete access to the Ifeffit library in a relatively friendly command-line program.
A sample session might look like this:
%~>ifeffit Ifeffit 1.0004 Copyright (c) 2000 Matt Newville, Univ of Chicago Ifeffit Shell Perl Module 1.2 (ReadLine enabled) reading /home/newville/.ifeffitrc ... OK Ifeffit> read_data(My.xmu,type=xmu) Ifeffit> spline(energy,xmu, rbkg = 1.0, kweight =1 ) Ifeffit> plot(energy, xmu) Ifeffit> plot(energy, bkg)
If you have the Perl module for the ReadLine library (Term::ReadLine and Term::Readkeys are both required), you can use the command-line editing features of the Gnu ReadLine library. Most importantly, this library makes the up arrow scroll through previous commands. It also gives you access to the last 300 commands typed in (stored in the file .ifeffit_hist in your home directory) in previous sessions. The command "l [number]" shows you the last "number" commands typed in.
There is also some support for command-line completion via the tab key. While typing the first word at the command-line prompt, selected ifeffit commands and shell commands will be 'tab-completed', meaning that hitting the tab key will complete as much of a partially-typed command as possible. The list of ifeffit and shell commands recognized for this purpose is customizable. After the first word has been fully typed, the tab key will complete file names in the current working directory.
e.g.:
%~>ifeffit Ifeffit 1.0002 Copyright (c) 2000 Matt Newville, Univ of Chicago Ifeffit Shell Perl Module 1.2 (ReadLine enabled) reading /home/newville/.ifeffitrc ... OK Ifeffit>
'l' lists the history buffer
'?' is an alias for help, which will display this document, or
give a
brief command summary (as in: 'help plot').
'??' lists the known system shell commands that can be
executed from
within ifeffit. For other shell commands, use the '!' character
to escape to the system shell.
$Escape [default = '!'] a line starting with this character is sent to the shell.
$Prompt [default = 'Ifeffit> '] command-line prompt.
$HOME [default from Environment Variable] users home directory.
ifeffit> ! emacs script & -- add ifeffit code to script and save the file ifeffit> load script
A typical ~/.ifeffitrc file might look like this:
# # start-up perl for shiffit push @shell_commands, qw(emacs grep gunzip diff); # # pre-load some common ifeffit macros ifeffit("load $HOME/.ifeffit_macros ");
This file is "require'd" by ifeffit. The "push" line, adds a few more commands to the default list of shell commands. The "ifeffit" line loads a bunch of pre-defined ifeffit macros.
Matthew Newville -- newville@cars.uchicago.edu
Term::Readline perl module to use the GNU Readline library to improve reading the command-line and enabling history mechanism. This module is available from Comprehensive Perl Archive Network.
Ifeffit.pm perl module to use the Ifeffit XAFS Analysis library from within perl. Several applications distributed as part of the Ifeffit Analysis System, including this program, requires this Ifeffit perl module,
Ifeffit Reference Manual main reference for the commands of the Ifeffit XAFS Analysis system.
2021-11-22 | perl v5.32.1 |