Thursday, January 22, 2009

xselect and region filters

I've added clarification to the on-line help for xselect about region filters. It is dangerous to make region filters in Image coordinates - the correct options are WCS or Physical. If the xselect image binning is not 1 then regions in Image coordinates will not be handled correctly.

Chandra CY11 webspec updated

Updated webspec with the final ARFs for Chandra Cycle 11.

Tuesday, January 13, 2009

recent xspec patches

12.5.0j Parameter links both to and from a model which is not associated with any spectra (shown as "Active/Off" in the model display), should not be removed when the model's state gets updated (such as when using the dummyrsp command). Our thanks to Laura Brenneman for pointing this out. Report added on Dec 24, 2008.

12.5.0k The dummyrsp command may cause a crash when entering a very large number of energy bins. Our thanks to Joel Frioriksson for pointing this out. Report added on Dec 31, 2008.

Tuesday, December 16, 2008

webspec for Chandra

I've updated webspec to use the Chandra CY11 rmfs and arfs released by the CUC. Note that in mid January they will be releasing new arfs with corrected contamination corrections and effective areas.

xspec patch for energies extend

12.5.0i The energies extend option does not work properly for the case of a data group containing multiple responses whose energy bins differ. Our thanks to Joel Frioriksson for pointing this out. Report added on Dec 15, 2008.

Monday, December 15, 2008

webspec updated to include pile-up

At the request of Andrea Prestwich at the CUC I've added the pile-up model to WebSpec. In the simple interface there is a check box to added it while in the advanced interface the user is expected to select pileup as the option for the first model component.

One tweak could be to set the default pile-up parameters appropriately for each instrument.

Friday, December 12, 2008

cfitsio region filtering bug

The recent cfitsio version region filtering fails when the first region is an exclude. This was an error I introduced when extending to multiple components as allowed in the FITS REGION extension. The fix should be available next week. Meanwhile a work-around is to include an initial region covering the entire field.

Update 12/15/08: There is also a memory-handling error in the code which reads a FITS REGION. This bug is only triggered if the extension contains a large number (>100) of exclude regions.

extractor bug for detector coordinate regions

Dave Henley reported problems with the new extractor when using detector coordinates for the region. This is because I wasn't correctly handling the case when the WCS type is blank. This is corrected in v5.09 which should be released as part of HEAsoft patch update next week.

Tuesday, December 09, 2008

xspec 12.5 patches

Another set of recent xspec patches. Two of these are minor mistakes in the 12.5 release, the others cover relatively obscure problems.

12.5.0e In the FNINIT function (for users linking the XSPEC models library into their own programs), the default model data directory name needs to be updated from "modelIonData" to "modelData" to coincide with v12.5.0 restructuring. Our thanks to John Houck for pointing this out. Report added on Dec 05, 2008.

12.5.0f Patch to improve the behavior of an exceptional case of Levenberg-Marquardt fitting, where a parameter becomes pegged due to a zero second-derivative matrix diagonal element AND the user chooses to exit before convergence. This prevents an attempt at a covariance calculation on the parameter, which otherwise might lead to a segmentation fault. Our thanks to Stefano Bianchi and Jeremy Sanders for pointing this out. Report added on Dec 05, 2008.

12.5.0g Fix to the swind1 model function. Now that it is included as part of XSPEC's built-in models library, it should no longer look to the $LMODDIR symbol for finding the model data directory. Our thanks to Delphine Porquet for pointing this out. Report added on Dec 09, 2008.

12.5.0h When doing a 2-panel plot of plot counts/lcounts chisq and the current fit statistic is cstat, the Y-axis scaling of the chisq panel is wrong. Our thanks to Fill Humphrey for pointing this out. Report added on Dec 09, 2008.

extractor bug for annular regions

Phil Evans spotted a problem in the new release when using an annulus region type. The region filtering is performed correctly however the WMAP created is too small in the case when the WMAP and image coordinates are the same. This is actually an error I introduced in the cfitsio code (which is however not used internally in cfitsio so doesn't change its standard use). A work-around is to use the elliptannulus region type instead of annulus. I also have a fix within the extractor code to get around this.

This bug is important for Swift analysis.

Monday, December 08, 2008

xselect and ASCA

The switch to wild cards in xselect.mdb was a little too enthusiastic in the case of the ASCA SIS - the catcol list still needs to be specified for individual detectors. The current version causes an error when running make obscat for ASCA SIS. I have checked in a fixed version.

Thursday, December 04, 2008

script to split *.rsp files into *.rmf and *.arf

I've written a little perl script split_rsp_to_rmf_arf which takes an input response matrix file and splits it into a response matrix file with unit total response at each energy and an arf which gives the total response at each energy. This can be used to mock up in v12 xspec the behaviour of v11 xspec with /b models. An example is given on the wiki section on backgrounds.

three more patch updates for xspec 12.5

Three minor patches to the new release are available on the bugs page.

12.5.0bWhen the editing commands addcomp, delcomp, or editmod have been used on a model that already contains linked parameters, the link expressions are not properly updated in the output to a save model file. Our thanks to Laura Brenneman for pointing this out. Report added on Dec 03, 2008.

12.5.0cThis removes the warnings issued if datasets contain CHANTYPE strings other than PI or PHA. It will still issue warnings if the CHANTYPE differs between the spectral data and RMF files. Report added on Dec 03, 2008.

12.5.0dAdditional C/Fortran function wrappers provided for the following recently added C++ models: cflux, partcov, simpl, and spexpcut. These are required for users who link the XSPEC models library into an external Fortran or C program. Our thanks to John Houck for pointing this out. Report added on Dec 03, 2008.

Tuesday, December 02, 2008

First xspec v12.5 patch released.

Li Xin-Li noted that his kerrbb model has an error in turning on/off self-irradiation and limb darkening. The model is fine if either both are on or both are off but if one is on and the other off then the wrong combination was calculated. Fixed as 12.5.0.

A couple of extractor fixes

A couple of bug fixes that were too late to get into the recent release.

1. When using a GTI file for time filtering the fall-back position of looking in the first table extension for the table data was not working. This should not be a problem if the gtinam parameter was set correctly.

2. The fixwmp routine was unnecessarily slow with the new method of region filtering. It is still slow but not as slow as it was.

These fixes are in v5.07 and will appear on the HEAsoft bugs page.

Wednesday, November 26, 2008

minor tweak to extractor region extension output

Switched the region extension written by extractor back to the XMM convention of REG001##. This works for Chandra because CIAO looks for the HDUNAME='REGION' keyword which is also included.

Tuesday, November 25, 2008

xspec 12.5

HEAsoft 6.6 which includes xspec v12.5 is now available.

Monday, November 17, 2008

updated xselect Chandra response matrix script

The xselect script xsl_chandra_acis_makeresp made some unwarranted assumptions about DSVAL1 holding the list of selected chips. Generalized this and fixed bug in one of the calls to mkacisrsp where I'd left off an wmap parameter specification. This change will make it into the release coming up this week.

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.