Wednesday, September 26, 2007

xselect and directory paths with spaces

Eric Miller points out that xselect runs into problems on the Mac if the directory path has a space in it even if a soft link is used to produce a path without a space. This occurs because xselect calls getcwd to return the current working directory and getcwd resolves any links to give the absolute path. This then runs into the customary problems with directory paths containing spaces.

The best workaround seems to be to change xsel_utils.f and replace

call XPICWD(wrkdir)


wrkdir = "./"
call XSL_EXPAND_DIR(wrkdir,status)

since the xsl_expand_dir routine in xsel_unix_c.c spawns a shell and runs pwd to get the current directory path. This method does preserve links.

Note that having an explicit directory path with a space (ie no links) fails in all sorts of ways and will be very hard to work around.

Thursday, September 20, 2007

Linking parameters in xspec

There is a subtle issue when linking parameters in xspec. If you do something like

XSPEC12> newpar 5 = 12

then the hard limits used for parameter 12 are those of parameter 5. This is not usually a problem however if parameter 12 is part of a table model and its tabulated parameters cover a smaller range than parameter 5 it is possible for the fit to reach a point outside the available tabulated data. This will generate a warning message in v11 and an error message in v12.

The best workaround is to always make sure that table model parameters are linked to rather than from so that the hard limits in use will be those from the table model.

Thursday, September 06, 2007

bad channels in the Suzaku XIS

Koji just spotted that xselect sets the channels 1-81 bad for the Suzaku XIS and this ought to be 0-81. Checked in a fix to xselect.mdb.