Description | Perl tools for X-ray Absorption Spectroscopy |
Demeter::UI::Screen::Interview - Simple screen interface to Demeter fit results
This documentation refers to Demeter version 0.9.26.
use Demeter;
my $fit = Demeter::Fit->new(project=>'project.dpj');
$fit->interview;
This provides a simple, screen-based machanism for interacting with a Demeter fit result imported from a project file. This interview is implemented as a method of the Fit object. The screen interview allows you to plot data from the fit, examine the fitting parameters and statistics, and change some of the plotting parameters. It is bare-bones, but still useful. It is a handy thing to add to the end of a Demeter fitting script as a simple plotting back-end to the fit.
interview
Explore the Demeter project file via an on-screen interview. The first argument is the fit object to probe. The optional second argument is a boolean which, when true, suppresses the plotting of the first data object with its fit before the beginning of the interview.
The interview understands these concise commands:
number
Plot the data set using its number in the data list.
c#
Change one of the plotting parameters. For example c1
is used to change the k-weight used in the plots and Fourier transforms.
d#
Show the operational parameters of the fit for that data set.
g
Examine the guess, def, and set parameters from the fit. Enter a number from the list of parameters to see all the details of that parameter.
s
Examine the fitting statistics.
l
Show the log file.
h
Get a bit of help written to the screen.
v
Show the Demeter version number.
Here is an example of the main interview screen:
c#) change plotting parameter:
1) k-weight = 1 g) show guess, def, set parameters
2) plot space = r s) show statistics
3) R part = m d#) show fit parameters
4) q part = r l) show log file
5) plot paths = 0 v) show version
.
Data included in the fit
1. data0 : 10 K copper data
2. data1 : 150 K copper data
.
Choose data by number, select an operation by letter, or q=quit >
And here is an example of the guess, def, set interview with a report on one of the parameters:
Guess, def, set parameters:
.
1. g: alpha010 = -0.0067 2. g: alpha150 = 0.0030
3. g: amp = 0.9782 4. g: enot = 1.4856
5. g: theta = 314.8034 6. s: sigmm = 0.0005
.
alpha010
guess parameter
math expression: 0
evaluates to -0.00665617 +/- 0.00161217
annotation: "alpha010: -0.00665617 +/- 0.00161217"
.
Choose a parameter for a full report or r to return >
See Demeter::Config for a description of Demeter's configuration system.
Along with needing Demeter, this uses Term::ANSIColor and Term::ReadLine. The example script in the Demeter distribution also uses Term::Twiddle.
Plotting rmr and turning on plotting of paths results in a crash. Should disable plotting paths when plotting rmr.
Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)
Patches are welcome.
Bruce Ravel, http://bruceravel.github.io/home
http://bruceravel.github.io/demeter/
Copyright (c) 2006-2018 Bruce Ravel (http://bruceravel.github.io/home). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl.
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.