Friday, November 07, 2008

writeFITS.tcl

Jörn Wilms pointed out it would be really useful in xspec to be able to write a bunch of information including best-fit parameters and errors to a single row in a FITS file. I've added a script writeFITS.tcl to do this. It either creates a new file or appends to an existing one. Obviously, this is not a general solution for all the information a user might want to save however it can easily be modified to save additional information.

2 comments:

Dave Strickland. said...

Hi Keith,

On the subject of saving fitting results to fits files, how about being able to save the results of a steppar (in particular a 2-parameter steppar) to a fits file?

D

Keith Arnaud said...

Dave,

You can get the results from steppar into Tcl variables using tclout steppar so it will be easy to modify writefits.tcl to save them to a fits file. I'm not going to supply lots of scripts to write different things to fits because there are so many choices. It's better to supply a template script that anyone can build on.