## Institut für Astronomie und Astrophysik## Abteilung AstronomieSand 1, D-72076 Tübingen, Germany |

A frontend for Craig Marquardts mpfit, allowing the fitting of arbitrary models to several data sets.

It supports:

- on line help for each command
- text/fits file data reading
- loading several data sets in distinct groups
- combining standard models in algebraic expressions
- defining separate models for each data group
- perform fit process for nonlinear functions,
- perform a joint fit with different groups
- fix parameters
- ignore/notice data points for fitting
- plot result with several types of residuum, with combined plot types in different panels
- error computation
- parameter stepping
- simple batch processing

cafe | Interactive fit environment suplying a frontend for reading/fitting/plotting/analysing data |

cafe - introduction | multi-purpose fit environment. |

chgrp | Change default group |

chpar | change model parameter |

chres | Change group for results |

clean | removes undefined datapoints |

copy | copy one data set to another group. |

curvefit | perform fit process with IDL CURVEFIT |

data | Read in data set from fits/ascii file. |

data_dat | Read in data set from ascii file. |

data_dat2 | Read in 2-d data set from ascii file. |

data_fits | Read in data set from fits file (binary/ascii table) |

data_fits2 | Read in 2-d data set from fits file (binary/ascii table) |

data_fitsimg | Read in data set from fits file (image extension) |

data_gti | Read in good time intervals from a fits file and apply this information by ignoring not covered data points. |

data_pha2 | Read in phase resolved spectra profile. |

data_qdp | Read in data set from qdp file (PLT/XSPEC output) |

defpar | define model parameter properties like its name or its boundary |

epfold | performs epoche folding on data set(s) withing certain period ranges. Tries to look for periods. |

error | compute errors for fit using the chi^2 distribution. |

exec | executes commands defined in file. |

export | Write out data set to ascii/fits file. |

export_dat | Write out data to ascii file. |

export_gti | Write out ignored data information into GTI file (fits). |

export_sav | Write out data to IDL save file. |

fit | perform fit process of given model to data |

fiterror | reconstruct error column by fitting model |

freeze | fixes model parameter |

gafit | perform genetic algorithm fit process of given model to data |

help | prints help of a standard command/model. |

hist | Creates histogram of x values for certain data sets. Result is presented in a new data set allocated in result group. |

hist2 | Creates 2-d histogram of x1/x2 values for certain data sets. Result is presented in a new data set allocated in result group. |

idle | Suspend command line for window event processing |

ignore | ignore datapoints for fit |

import | Imports data from IDL variables. |

integrate | integrates data set(s) in given range and prints result. |

iplot | interactively plots data/model of fit |

legend | draws legend information for plots |

legend_data | Draws/writes data/line information in legend in plot window. |

legend_line | Draws a line in legend |

legend_models | Writes currently used models as legend in plot window. |

legend_param | Writes parameter name+value in legend |

legend_result | Writes Fit result as legend in plot window. |

legend_set | Writes current setting in legend |

legend_string | Writes legend text in plot window. |

limit | limit model parameter to constrain fitting process |

load | Loads environment from file which was created with the "save" command. |

load_cfg | Loads from file some configuration items. |

load_plt | Loads plot style from plt file. |

load_sav | Loads environment from IDL SAV file. |

log | Set/Change log file for cafe environment |

cafe - maintenance | Describes how to support this environment |

merge | merges data sets into new data set. |

minimize | Tries to minimize a specific metric (e.g. chi^2) by changing model parameters. |

cafe_minimize_chisq | chi^2 metric function |

cafe_minimize_chisqdx | chi^2 metric function which takes x-error (dx) also into account |

model | define model of fit |

model_ceil | Returns closest integer value above x value |

model_const | Define constant fit model y = const |

model_data | Use separate data in distinct group as fit model. |

model_data2 | Use separate 2-dimensional data in distinct group as fit model. |

model_exp | Define exponential fit model y |

model_floor | Returns closest integer value below x value |

model_gauss | Define Gaussian fit model y = 1/sqrt(2*pi)/sigma * exp(- 1/2*((x-x0)/sigma)^2) |

model_gauss2 | Define 2-Dim Gaussian fit model y = 1/sqrt(sigma*2*pi) * exp( - 0.5*((x_1-x0)/sigma_x)^2 - 0.5*((x_2-y0)/sigma_y)^2) |

model_legendre | Define model consisting of legendre polynoms |

model_lin | Define linear fit model y = m*x + b. |

model_log | Define logarithmic fit model |

model_lorentz | Define Lorentzian fit model y = 1/pi * gamma/2 * 1/((x-x0)^2 + (gamma/2)^2) |

model_parabel | Define parabolic fit model y = a*x^2 + b*x + c. |

model_pow | Define power fit model |

model_sin | Define sinus fit model y |

model_tan | Define tangent fit model y |

model_theta | Define theta function (step from 0 to 1 at x=0) |

model_x | Identity model - returns x value as is |

model_x1 | Projektion model of identity - returns X-values column 1 (first) of multidimensional data. |

model_x2 | Projektion model of identity - returns X-values column 2 (second) of multidimensional data. |

model_x3 | Projektion model of identity - returns Z-values column 3 (third) of multidimensional data. |

modify | modifies data point values (x/y/error) |

notice | explicitely allow data points for fit |

pause | Waits till user hits key. Usefull for scripts. |

pfold | folds data set(s) with certain period. |

plot | plots data/model of fit |

plot_axis | plot axis |

plot_data | plot data as is |

plot_data2 | plot 2-d data as is |

plot_data3 | plot 3-d data transforming into voxel which are displayed using shade_volume or other routines. |

plot_datafill | plot data with filled axis, adding some information. |

plot_datascal | plot data with the possibility to shift/scale the plot in X/Y direction. |

plot_delchi | plot residuum in 1-sigma units |

plot_empty | do not plot anything |

plot_frame | plots the frame for following plot types. Must (!) be the first plot type (will be inserted automatically if not given). |

plot_frame2 | plots 3-d frame for following plot types. Must (!) be the first plot type (will be inserted automatically if not given and 3-d data to plot). |

plot_model | plot model |

plot_model2 | plot 2-d model over existing data |

plot_model3 | plot 3-d model usingvoxels which are displayed using shade_volume or other routines. |

plot_parmodel | plot parametriced models |

plot_ratio | plot residuum as a ratio |

plot_res | plot residuum |

plot_selection | plot selected data |

plot_slice2 | extract from 2D-data set a slice and plot it 1-dimensional |

plot_steppar | plot 2-dim parameter confidence computed with steppar command |

plot_steppar2 | plot 3-dim steppar values computed with the steppar command |

plot_text | Plot text at given position. |

plot_ybar | plot y=const line for all existing data points, ignoring its y information. |

plotout | creates hardcopy of last plot |

plotout_eps | Plot out to encapsulated postscript file. |

plotout_jpg | Plot out to jpeg file. |

plotout_png | Plot out to an portable network graphic file. |

plotout_ps | Plot out to postscript file. |

prints out data list of single group | |

prompt | Change prompt of cafe program |

quit | exit cafe program |

remove | Removes data set in group/subgroup |

reset | Resets environment into initial state. |

save | Saves environment into file. |

save_cfg | Saves current configuration (set/setplot settings) into file. |

save_cmd | Saves current state into a command script file. To restore the state it is sufficient to run this file as an ordinary script. |

save_param | Saves fit parameter into ascii file. |

save_plt | Saves current plot style into file. |

save_sav | Saves environment into IDL SAV file. |

scargle | Compute the lomb-scargle periodogram of an unevenly sampled lightcurve. Refer procedure "scargle" in the aitlib. |

select | select datapoints |

set | Change common setup parameter |

setformat | Change print format for print/parameters |

setplot | Change common plot appearance |

show | displays fit results/general status of environment |

show_chres | Displays current result group (from chres) |

show_data | displays data of all groups/subgroups |

show_datrange | displays range information about all data sets |

show_error | displays last computed parameter errors |

show_files | displays files using in different subgroups |

show_free | displays fit results of free parameters |

show_legend | Displays current legend settings |

show_limit | displays parameter limit |

show_model | displays model of different groups |

show_param | displays complete parameter information |

show_plot | Displays all plot panels |

show_result | displays fit results/general status of environment |

show_set | Displays all setup definitions. |

show_setplot | Displays all setplot definitions. |

show_stat | displays statistic information about all data |

show_step | displays parameter step informations |

show_wplot | Displays wplot settings (buttons/sliders) |

sort | sort datapoints in ascending x order. Plots look better doing this. |

steppar | compute confidence range/contour for fit |

cafe - syntax | Describe command line syntax |

thaw | releases fixed model parameter |

tie | links parameters to other |

tutorial | runs a (more or less) interactive tutorial. |

undo | restores former environment |

unselect | unselect data points |

untie | releases binding of model parameter |

wplot | interactively plots data/model of fit in separate window |

wplot_chgrp | Button to change group |

wplot_chpar | Button to change parameter value |

wplot_error | Button to compute fit error for selected data points |

wplot_exclude | Button to exclude non-selected data points |

wplot_exec | Button to perform any (fixed) cafe command. |

wplot_fit | Button to fit selected data points |

wplot_fiterror | Button to reconstruct error column by fitting selected data points |

wplot_ignore | Button to ignore selected data points |

wplot_notice | Button to notice selected data points |

wplot_rotdown | Button to rotate 3-dim pictures around AX axis down. |

wplot_rotleft | Button to rotate 3-dim pictures clockwise |

wplot_rotright | Button to rotate 3-dim pictures anticlock wise |

wplot_rotup | Button to rotate 3-dim pictures around X axis up. |

wplot_savefit | Button to save fitted parameters into file |

wplot_seekleft | Button to navigate in data and find next data point |

wplot_seekright | Button to navigate in data and find next data point |

wplot_setplot | Button to modify setplot settings. |

wplot_shiftleft | Button to shift view of data |

wplot_shiftright | Button to change view of data |

wplot_sliderchgrp | Slider to change current group |

wplot_sliderparam | Slider to change parameter value |

wplot_sliderrotx | Slider to rotate around x-range |

wplot_sliderrotz | Slider to rotate display around z axis. |

wplot_sliderx | Slider to shift x-range |

wplot_slidery | Slider to shift y-range |

wplot_sliderz | Slider to shift z-range |

wplot_stepleft | Button to change viewport to left |

wplot_stepright | Button to change viewport to right |

wplot_unselect | Button to unselect all data points |

wplot_zoomin | Button to enlarge view of data |

wplot_zoomout | Button to enlarge view of data |

cafeaddextrakey | Used to add for _EXTRA structure a keyword entry and set it at a given value. |

cafeconvertparamtoabs | convert parameter index of parameter to absolute index of parameter |

cafecurvefitfun | fitting function for IDL CURVEFIT |

cafeenv__cleanup | Cleans up resources needed from environment structure definition of the CAFE program. This procedure should be changed to maintain environment defining/destroying (s.a.) |

cafeenv__define | Environment structure definition of the CAFE program. This procedure allows automatic structure definition after IDL version 5.0 |

cafeexecparse | parses a command line, returns a string list which contains all items of a command line, usually separated with ",". |

cafeexecscan | scans exec string into token A token is a substring, being either - a comma - open/close parentheses () - open/close brackets [] - open/close string (") - some other characters - empty string if nothing matching found |

cafeextract | extracts data arrays according given range/subgroup/group |

cafefitfun | main fitting function |

cafegetchisq | compute chi^2 value for current parameters/data |

cafegetdof | compute degree of freedom for current settings |

cafegetparam | retrieve parameter |

cafegetplotparam | retrieve plot parameter |

cafegetvalidparam | return index for valid parameters |

cafegti | Return good time interval for given data sets. |

cafeiplotbutton | plots button on graphic window |

cafeiplotinbutton | returns whether button hit |

cafelegendinfo | adds plot legend information to environment so the legend_data routine can retrieve the plot information. |

cafeminimizefun | main minimization function |

cafemodel | main model function |

cafemodelparse | parses a model, returns a model string which contains additional items by equip each model with the environment identifier ("env"), the group and the input variabe ("x"). |

cafemodelscan | scans fit model string into token A token is a substring, being either - an identifier (characters) - open/close parentheses - some other character - empty string if nothing matching found |

cafeparam | converts parameter to an index referencing this parameter in environment parameter list |

cafeplotpanel | plots data/model of fit in single panel |

cafeplotpanelenhanced | plots data/model of fit in single panel, faciliating enhanced expressions. Functionally like cafeplotpanel. |

cafequotestr | Adds string quotation marks if required. |

caferange | converts range string to an index for a group/subgroup |

caferead | reads a string/values from command line, reports it to log file, if given |

cafereport | reports a string/values to command output and log file, if given |

cafesetparam | Change list of set items |

cafesetplotparam setplotparam | Change common plot appearence |

cafeupdatetie | Looks for all tied parameters and updates its value according the tie defined. |

Last modified by pro2html on 2008 November 09 at 04:10 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)

Updated automatically