Primary
tclout ⚬ˣˢᵖᵉᶜ|docu|1st|20251021185603-00-⌔
tcloutcreate tcl variables from current state
Write internal xspec data to a tcl variable. This facility allows the manipulation of xspec data by tcl scripts, so that one can, for example, extract data from xspec runs and store in output files, format xspec output data as desired, use independent plotting software, etc.
tclout creates the tcl variable $xspec_tclout, which can then of course be set to any named variable. The allowed values of
Examples:
XSPEC12>data file1 XSPEC12> model pha(po) ... XSPEC12> fit ... XSPEC12>tclout stat XSPEC12>scan $xspec_tclout "%f" chistat XSPEC12>tclout param 1 XSPEC12>scan $xspec_tclout "%f"par2 XSPEC12>tclout param 2 XSPEC12>scan $xspec_tclout "%f"par3 XSPEC12>tclout param 3In this example, scan is a tcl command that does a formatted read of the variable \chi^2chistat, par2, and $par3. These can now be manipulated in any way permitted by tcl. Examples of using tclout and tcloutr can be found in the Xspec/src/scripts directory.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •