Thursday, August 28, 2008

latest xspec patches

12.4.0ak The cutoffpl model can show a distortion for very low energies (E/B approx. less than 10^-3). The incomplete gamma function calculation which this is based on needs to be improved in this region. Our thanks to Joern Wilms, Moritz Boeck, and Manfred Hanke for pointing this out. Report added on Aug 28, 2008.

12.4.0al This adds the Fortran wrapper function xgtcht(console,log) for those wishing to retrieve XSPEC's console and log chatter level settings from inside their own Fortran local models. The function is equivalent to the xgtcht contained in the xanlib library used by XSPEC11. Report added on Aug 28, 2008.

12.4.0am Enhancement patch required for reading data sets and responses in the new format used by GLAST GBM files. The modifications include the removal of the SPEC_NUM column for type-II data files, and the storing of multiple response matrix extensions into one response file. XSPEC will now distinguish among multiple response extensions by appending a curly-bracket specifier to the response file name: myResponse.rsp{n} where n is the EXTVER keyword value of the extension. Report added on Aug 28, 2008.

Friday, August 22, 2008

parallelizing xspec

Craig has been experimenting with openMP which is included in gcc v4.2 and above. Since openMP uses a shared memory model the trick is to find places where multiple threads can be used which do not trash each others' memory. A valid case is the loop over responses in Model::fold. This speeds up the code if there are multiple datasets in the same datagroup. It involves changes to Model.cxx as well as MultiResponse.cxx and RealResponse.cxx.

Test was with a dual-processor machine running Solaris. Note that the -xopenmp compiler flag required either no optimization or -O3.

Thursday, August 21, 2008

calculating fluxes and errors

Prompted by a question from Jeremy Sanders I have developed a new way of calculating fluxes and errors for models and parts of models. The trick is to provide a new convolution model called cflux whose first two parameters are the minimum and maximum energy over which the flux is calculated. The final parameter is the flux. The component is placed in front of the model component(s) whose flux is being calculated and one of the additive components has its normalization frozen. The standard fit and error command on the flux parameter will then provide the best fit flux and confidence region. This model is available through the extra models web page.

Thursday, August 07, 2008

xselect and XMM-Newton spectra

The current version of xselect/extractor writes spectra with region extensions having the EXTNAME keyword set to REGION. This is required by CIAO. However, SAS requires EXTNAME to be REG00101 so added a command to xsl_xmm_epic_makeresp to change EXTNAME before calling the response and arf generation tools.

Tuesday, August 05, 2008

genrsp and LO_THRES

Allyn Tennant pointed out that genrsp writes a keyword LO_THRESH which should actually be LO_THRES. I fixed this as v2.04 by adding the new keyword while leaving the old just in case there is other s/w that expects it.