Jeremy Sanders provided Solar abundances from Asplund, Grevesse & Sauval (2005) which I have added to abundances.dat in the develop version of xspec.
Update 9/8/09: Martin Asplund supplied values from his 2009 ARAA paper so I used them instead for the aspl abundance option.
Wednesday, August 19, 2009
light curves with extractor
Alex requested a way of better controlling the start time of a light curve created using extractor. I've added a new parameter lcstart which sets the time of the first bin (in spacecraft time units). This is checked into the development version as extractor v5.12.
cleansis
We have seen a few cases of observations of bright sources using Suzaku where running cleansis creates a hole in the image. Part of the problem is running with too high a log probability parameter but there is also a subtle error when iterating. Pixels which are already identified as bad and have their counts set to zero are still included when calculating the local background. This artificially lowers the estimated background hence increases the probability that a pixel will be flagged as bad.
I changed the algorithm so that pixels flagged as bad in previous iterations are ignored when calculating the local background. This change has been checked into the development version.
I changed the algorithm so that pixels flagged as bad in previous iterations are ignored when calculating the local background. This change has been checked into the development version.
New release
HEAsoft 6.7 is now available. This includes XSPEC v12.5.1. The biggest change is in gain fitting which has been reworked as the preliminary step towards allowing the creation of response models. Response models will be created analogously to spectral models and will be used to either replace or augment response matrices.
This release is also the first which does not include XSPEC v11. This version has in practice not been supported for some time and it is getting increasingly difficult to ensure that it builds and runs on all systems.
This release is also the first which does not include XSPEC v11. This version has in practice not been supported for some time and it is getting increasingly difficult to ensure that it builds and runs on all systems.
Friday, June 12, 2009
XSPEC bug fixes update
xselect cleansis
Fixed a bug spotted by Ed Cackett that the iterate_clean parameter is not recognized. Just needed to add it to the xselect.key file.
Note that there are issues turning up using the probabilistic sisclean tool for bright Suzaku sources. There is a tendency for the core of the PSF to be removed. Suggested fixes are either to change the critical probability or turn the iteration off.
Note that there are issues turning up using the probabilistic sisclean tool for bright Suzaku sources. There is a tendency for the core of the PSF to be removed. Suggested fixes are either to change the critical probability or turn the iteration off.
Tuesday, May 26, 2009
self-irradiated funnel
Pavel Abolmasov sent in his self-irradiated funnel model (Abolmasov et al. 2009) and I added an entry to the new models web page.
addascaspec
The perl script addascapec, which is actually useful for other missions in addition to ASCA, had a couple of problems which I've fixed. The default errmeth should have been POISS-0 instead of POISS-1 and this parameter was not being used when summing background spectra.
Saturday, May 23, 2009
Friday, May 15, 2009
bug in thermal broadening
Irina Zhuravleva at MPE pointed out that the thermal broadening option in the xspec apec model gives a sigma which is a factor of sqrt(2) too large. Fortunately, I don't think has any science implications since there have been no observations capable of measuring this broadening.
update on 6/8/09: Richard Sturm points out there is the same error in the NEI code.
update on 6/8/09: Richard Sturm points out there is the same error in the NEI code.
Monday, May 11, 2009
panda/epanda/bpanda regions
I've added support to cfitsio region filtering for the panda/epanda/bpanda regions produced by ds9. Note that this assumes only one azimuthal region and one annulus although the region specification itself allows multiple for both. Made corresponding changes in extractor though note that the FITS region extension written in this case is not covered by the standard which does not include these shapes.
Thursday, May 07, 2009
Spectral file format standard document
I updated the PHA file standard document to try to make it clearer. I fixed an error in the type II example which had HDUCLAS3 and HDUCLAS4 inverted.
Tuesday, April 14, 2009
XSPEC bug fixes update
Here are the bug fixes from the last month. They can be found in the usual place.
| 12.5.0w | A new tclout option has been added to make it easier to retrieve the fit parameters' sigma values. The syntax for this option is: tclout sigma [<>:]n where n is the parameter number. If it is not a variable parameter or if the fit was unable to calculate its sigma, a value of -1.0 is returned. Report added on Mar 06, 2009. |
| 12.5.0x | The model.dat entry for the vequil model is missing the parameter for Ar abundance, causing the vequil parameters which follow it to be misinterpreted in the code. (This bug does not affect the equil model.) Report added on Mar 06, 2009. |
| 12.5.0y | The kerrconv convolution model code is still using the xspec11-only LMODDIR environment variable for locating the kerrtable.dat model data file. This should be modified for usage in xspec12, where LMODDIR doesn't exist. Report added on Mar 11, 2009. |
| 12.5.0z | This removes an ambiguous reference build error specific to gcc-4.1.1 on the Solaris-2.9 platform. Our thanks to Dacheng Lin for pointing this out. Report added on Mar 26, 2009. |
| 12.5.0aa | The diskir model goes to infinity when its rirr parameter = 1.0, which is also the default value of rirr's lower limit. Our thanks to Brian Refsdal for pointing this out. Report added on Mar 26, 2009. |
| 12.5.0ab | The nsmax model function is only able to find its auxiliary files when it is run directly from XSPEC's model data directory (heasoft-6.x/spectral/modelData). Our thanks to Stephen Doe for pointing this out. Report added on Mar 31, 2009. |
| 12.5.0ac | Fixes to a couple of obscure cases of gain parameter usage: If a gain parameter belongs to a response temporarily replaced by a dummy response, or a gain parameter is indirectly removed through the data command erasing its associated spectrum and response, the gain shift may still be applied to a response occupying its former spectrum and source number. This patch also improves the show response output. Report added on Apr 06, 2009. |
| 12.5.0ad | The nthcomp model has an uninitialized variable for the case of input energies less than kT_bb/10^4, which may cause a crash to occur. Our thanks to Gulab Dewangan for pointing this out. Report added on Apr 14, 2009. |
| 12.5.0ae | For those linking the models library into their own programs, the swind1 model crashes when outputing a warning message as it indirectly accesses a variable intended for use only in XSPEC. Our thanks to Stephen Doe for pointing this out. Report added on Apr 14, 2009. |
Friday, April 03, 2009
Notes on using SWIG to import C++ in Python
As a test case using my heasp library which is being converted from C to C++. Created heasp.i file to define interface. Basically a concatenation of the heasp.h, PHA.h and PHAII.h files with the following at the top. Adding additional classes will just require cat'ing their *.h file to the end and adding the appropriate #include at the top. Note the %include of "std_string.i" which is required to make the string arguments work. Similar %include specifications will be required if other STL classes are arguments for methods.
%module heasp
%include "std_string.i"
%{
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "heasp.h"
#include "PHA.h"
#include "PHAII.h"
%}
The interface file is then converted to C++ using
swig -python -c++ -classic heasp.i
which creates heasp_wrap.cxx and heasp.py. These must then be combined with the *.o files to build a shareable library called _heasp.so (note that the _ prefix and .so suffix are required). Compiling heasp_wrap.cxx will require include files from python. On my mac the relevant flag is
-I/Library/Frameworks/Python.framework/Versions/Current/include/python2.5
and on the lab Linux network
-I/usr1/local/include/python2.5
On the mac the command to make the shareable library is
ld -bundle -flat_namespace -undefined suppress -o _heasp.so ${OFILES} heasp_wrap.o -L${HEADAS}/lib -lCCfits_2.1 -lcfitsio_3.12
and on Linux
$(CXX) -shared -o _heasp.so ${OFILES} heasp_wrap.o -L${HEADAS}/lib -lCCfits_2.1 -lcfi
tsio_3.13
The module is loaded into python by
>>> import heasp
On the mac this generates an undefined symbol ___eprintf. This may require an update of Xcode to fix. On linux (running python2.5) there are no problems. Example use is
>>> import heasp
>>> spectrum = heasp.PHA()
>>> spectrum.read('file1.pha',1,1)
>>> spectrum.disp()
>>> spectrum.write('test.pha')
%module heasp
%include "std_string.i"
%{
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "heasp.h"
#include "PHA.h"
#include "PHAII.h"
%}
The interface file is then converted to C++ using
swig -python -c++ -classic heasp.i
which creates heasp_wrap.cxx and heasp.py. These must then be combined with the *.o files to build a shareable library called _heasp.so (note that the _ prefix and .so suffix are required). Compiling heasp_wrap.cxx will require include files from python. On my mac the relevant flag is
-I/Library/Frameworks/Python.framework/Versions/Current/include/python2.5
and on the lab Linux network
-I/usr1/local/include/python2.5
On the mac the command to make the shareable library is
ld -bundle -flat_namespace -undefined suppress -o _heasp.so ${OFILES} heasp_wrap.o -L${HEADAS}/lib -lCCfits_2.1 -lcfitsio_3.12
and on Linux
$(CXX) -shared -o _heasp.so ${OFILES} heasp_wrap.o -L${HEADAS}/lib -lCCfits_2.1 -lcfi
tsio_3.13
The module is loaded into python by
>>> import heasp
On the mac this generates an undefined symbol ___eprintf. This may require an update of Xcode to fix. On linux (running python2.5) there are no problems. Example use is
>>> import heasp
>>> spectrum = heasp.PHA()
>>> spectrum.read('file1.pha',1,1)
>>> spectrum.disp()
>>> spectrum.write('test.pha')
Thursday, April 02, 2009
chkarf
Updated and much simplified chkarf so it actually lists the correct keywords as mandatory. This tool really should just be a perl script - the current program is overkill.
Wednesday, April 01, 2009
using openMP in gcc
I'm testing out parallelization using openMP on an 8-core Linux box. To build xspec to support openMP options requires the hmakerc to be edited to add -fopenmp to CFLAGS, FFLAGS, and CXXFLAGS and -lgomp to be added to F77LIBS4C (I added it immediately before -lgfortran).
First test is in sumape.f to parallelize over the individual elements when interpolating the continuum and pseudo-continuum...
C$OMP PARALLEL PRIVATE(ien,limdown,limup,ihigh,energy)
C$OMP DO SCHEDULE(DYNAMIC)
DO ielt = 1, nmelt
...
ENDDO
C$OMP END DO
C$OMP END PARALLEL
The variables defined as private are to avoid threads overwriting variables being set and used by other threads.
Timing tests show that parallelization doesn't win enough in this case. Including the parallel directives slows a newpar down from 0.02 seconds to 0.4 seconds due to the overhead.
First test is in sumape.f to parallelize over the individual elements when interpolating the continuum and pseudo-continuum...
C$OMP PARALLEL PRIVATE(ien,limdown,limup,ihigh,energy)
C$OMP DO SCHEDULE(DYNAMIC)
DO ielt = 1, nmelt
...
ENDDO
C$OMP END DO
C$OMP END PARALLEL
The variables defined as private are to avoid threads overwriting variables being set and used by other threads.
Timing tests show that parallelization doesn't win enough in this case. Including the parallel directives slows a newpar down from 0.02 seconds to 0.4 seconds due to the overhead.
Saturday, March 28, 2009
Computing with GPUs
Friday, March 13, 2009
problem with extractor5.09
In the course of Suzaku pipeline testing Lorella spotted a problem I introduced during the attempted speed-up of the fixwmp routine. Pixels with non-zero counts show up even within the part of the region which is supposed to be set to -1.
The particular case of Suzaku demonstrated a conceptual issue here. Those pixels showing up within the supposed excluded region are real events. What is happening is that the region is defined in sky coordinates but the WMAP is written in detector coordinates. I calculate a conversion to determine which WMAP pixels are within the image region however it is a time-averaged solution. In the pre-5.09 version the satellite attitude wobble results in some events being incorrectly excluded from the WMAP. It was these events that the 5.09 version actually included however they are potentially confusing to users.
The fix is checked in as v5.10.
The particular case of Suzaku demonstrated a conceptual issue here. Those pixels showing up within the supposed excluded region are real events. What is happening is that the region is defined in sky coordinates but the WMAP is written in detector coordinates. I calculate a conversion to determine which WMAP pixels are within the image region however it is a time-averaged solution. In the pre-5.09 version the satellite attitude wobble results in some events being incorrectly excluded from the WMAP. It was these events that the 5.09 version actually included however they are potentially confusing to users.
The fix is checked in as v5.10.
Monday, March 02, 2009
xselect and Chandra grating data
Jane Turner reported that the current version of xselect fails to read Chandra HETG evt2 data. This is due to a bug in xsel_mdb.f which I think only matters for Chandra grating files.
Wednesday, February 25, 2009
XSPEC units for setplot wave
In v12.5 we switched the y-axis units under setplot wave to per Hz instead of per Angstrom. Since this has not been universally popular we have added an initialization option to decide between the two cases. This is available as patch 12.5.0t. That and other recent patches can be obtained from the usual place and are summarized below
| 12.5.0r | Fix needed for all etable model calculations. Our thanks to Roderick Johnstone for pointing this out. Report added on Feb 12, 2009. |
| 12.5.0s | When the both the absori and pexriv models are loaded during the same XSPEC session, whichever model is loaded second will not work properly. Note: this bug originated in version 12.5.0. Report added on Feb 13, 2009. |
| 12.5.0t | This adds an option for choosing Y-axis units when plotting in setplot wave mode. The selection is made by the WAVE_PLOT_UNITS entry, which has been added to the new version of the Xspec.init file. The units may now be specified in Hz (the default for version 12.5.0), or angstroms as they were prior to 12.5.0. This applies to plots of data, counts, and all variants of model and ufspec plots. Report added on Feb 19, 2009. |
| 12.5.0u | Minor code changes mostly to clean up the messages reported when running XSPEC under the valgrind software tool. Report added on Feb 19, 2009. |
| 12.5.0v | Multiplicative model components which are created with the mdefine command should not be multiplied by the energy bin widths. Our thanks to Roderick Johnstone for pointing this out. Report added on Feb 19, 2009. |
Subscribe to:
Posts (Atom)