.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Ifeffit 3pm" .TH Ifeffit 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Ifeffit \- Perl interface to the IFEFFIT XAFS Analysis library. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& use Ifeffit; \& use Ifeffit qw(put_scalar put_string put_array); \& use Ifeffit qw(get_scalar get_string get_array); \& \& my ($kmin, $my_file, $file_type ) = (0.01, "Cu.xmu", "xmu"); \& put_scalar("rbkg", 1.1); \& put_scalar("kmin", $kmin); \& put_string("filename", $my_file); \& \& ifeffit(" read_data($my_file, prefix= my,"); \& ifeffit(" type= $file_type)"); \& ifeffit(" newplot (energy, xmu ) "); \& \& my $e0 = get_scalar("e0"); \& print "e0 = $e0 , rbkg = " ,get_scalar("rbkg"), "\en"; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The Ifeffit Perl Module gives access to the ifeffit library for XAFS analysis. The module provides seven perl functions \- \fBifeffit\fR, \&\fBput_scalar\fR, \fBget_scalar\fR, \fBput_string\fR, \fBget_string\fR, \fBput_array\fR, and \fBget_array\fR. The \fBifeffit\fR is always provided (ie, exported by the "use Ifeffit;" pragma), but the other commands must be explicitly imported, as shown above. .SS ifeffit .IX Subsection "ifeffit" The ifeffit function provides the main interface to the ifeffit engine. The character string argument is interpreted as an ifeffit command. Ifeffit returns 0 if a valid command is sent and fully processed, \-1 if a partial command has been sent (so that it will be expecting the rest of the command next), 1 if the "quit" command has been sent, and other non-zero valuses on error. The syntax for and meaning of command lines to ifeffit is described in \fIThe Ifeffit Reference Manual\fR of the Ifeffit distribution. The syntax for the perl function is .PP \&\f(CW\*(C`$i = ifeffit("plot(my.x, my.y)");\*(C'\fR .SS put_scalar .IX Subsection "put_scalar" This sets the value of a named scalar in the list of ifeffit data. The set value is returned on successful execution. The syntax is .PP \&\f(CW\*(C`$i = put_scalar("kweight", 2.0);\*(C'\fR. .PP which is equivalent to .PP \&\f(CW\*(C`$i = ifeffit("kweight = 2.0");\*(C'\fR .PP But having a choice seems like the perl way. .SS get_scalar .IX Subsection "get_scalar" This returns the value of a named ifeffit scalar. The syntax is .PP \&\f(CW\*(C`$value = get_scalar("x");\*(C'\fR .SS put_string .IX Subsection "put_string" This sets the value of a named ifeffit string. The value is returned on successful execution. The syntax is .PP \&\f(CW\*(C`$i = put_text("home", "the merry old land of oz");\*(C'\fR. .PP The same effect could be achieved with the command .PP \&\f(CW\*(C`$i = ifeffit("set \e$home = \*(Aqthe merry old land of oz\*(Aq");\*(C'\fR. .PP but \fBput_text\fR takes care of the icky leading dollar sign, and returns the string instead of a simple exit status. .SS get_string .IX Subsection "get_string" This returns the value of a named ifeffit string. The syntax is .PP \&\f(CW\*(C`$bg = get_string("plot_bg");\*(C'\fR .SS put_array .IX Subsection "put_array" This copies a perl array of numeric values to an ifeffit array. The syntax is .PP \&\f(CW\*(C`put_array("my.array",\e@array);\*(C'\fR .PP which creates (or overwrites) the ifeffit array \fImy.array\fR, and fill it with the values of the perl array \fR\f(CI@array\fR\fI\fR. Note that the \fBreference\fR to the array is passed into \fBput_array\fR, not the whole array itself! .SS get_array .IX Subsection "get_array" This gets the values of an ifeffit array of numeric values. The syntax is .PP \&\f(CW\*(C`@array = get_array("my.array");\*(C'\fR .PP which will fill the perl array \fR\f(CB@array\fR\fB\fR with the ifeffit array \&\fImy.array\fR. .SH AUTHOR .IX Header "AUTHOR" Matthew Newville \-\- newville@cars.uchicago.edu .SH "SEE ALSO" .IX Header "SEE ALSO" ifeffit, Ifeffit Reference Manual, \fBperl\fR\|(1) .PP PGPERL, PDL, GNU ReadLine Library