Monday, October 22, 2007

rbnrmf bug in energy binning

I made an error in the new energy binning option - I should be averaging the response rather than summing it so the resulting responses were too large by the binning factor. Also, there was a one-off problem for responses with zero-based channels. Checked in fixes.

Friday, October 19, 2007

Preprints

Franz discusses confidence regions on ratios.

Hague et al. discuss statistical tests for deviations from the power-law for the cosmic ray energy spectrum.

Lang & Hughes investigate the ability to localize SMBH mergers from the GW signal.

Comastri & Brusa review AGN results from X-ray surveys and their multiwavelength follow-up and consider that case for 2-3 Msec XMM survey.

Rapetti & Allen consider what it would take to use X-ray observations of cluster of galaxies to determine dark energy parameters with a precision comparable to other methods.

Brunetti et al estimate hard X-ray fluxes from clusters of galaxies and relate them to prospective observations with SIMBOL-X.

Thursday, October 18, 2007

webspec

Spent some time working on webspec. Main changes are to the look : the front page is more compact so I don't have to scroll down to hit the button; the advanced page allows up to 9 components; the basic and advanced pages both read the list of missions from the same file so they won't fall out of step as in the past; the page to set exposure and parameters has been tidied up a bit; the results page now has the plot next to the set of options to change plotting parameters.

I would like to have the replot option simply change the plot on the current results page rather than opening a new page however this would involve substantial programming changes. Another nice option would be the ability to make contour plots (by running steppar) however this is a potentially huge cpu hog and I'm not sure we want to do this on the main web servers. Perhaps this would be better as part of heraspec.

UPDATE: Fixed a problem that appeared under Safari - the check box for background was not coming up checked by default because I put checked inside double quotes in the html input tag.


Monday, October 15, 2007

OpenMP

gcc 4.2 and later now includes support for the OpenMP shared-memory parallelization API. This would be a good way of adding support to xspec for multi-core machines. This can be used in C/C++ or Fortran and provides a simple way of parallelizing loops.

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)

with

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.

Thursday, August 30, 2007

Removing values of names set using xset

Jeremy Sanders enquires how to return to the default after having used xset to change APECROOT. Doing
XSPEC12> xset APECROOT
actually works although this is undocumented and is misleading because doing an xset then shows APECROOT still existing but with no value. Fixed so that the name no longer shows up as existing.

Tuesday, August 28, 2007

Abundances in NEI models

Frank Haberl pointed out that the documentation on the NEI models is wrong. The documentation states that abundances are wrt Anders & Grevesse while in fact they are relative to whatever is set by the abund command. This was a change in code from June 2005 which was never documented. Updated all the relevant files (11.3.2ai).

Thursday, August 23, 2007

PGPLOT PS driver

Phil Evans reports occasionally losing a few pixels from text labels due to the bounding box being set too small. Made a simple fix in grtext.f to add 2% in each direction.

rdblur model

The hard lower limit on the Rin parameter for rdblur should be 6, not 0 as currently set. If Rin < 6 then the model returns zero.

Monday, August 20, 2007

xspec updates

Bug fixes/updates from Craig. These are all listed on the bugs page.

12.3.1ak This fixes dummyrsp so it can be applied to any model for a given spectrum, and can now take advantage of XSPEC's recently added multiple sources capability in the same way as the response command. Previously dummyrsp only worked properly for the standard single source cases. This also fixes a Solaris specific bug, which could cause NaN calculation errors when folding a model with a dummy response. Report added on Aug 20, 2007.

The fix is to replace headas/Xspec/src/XSModel/Data/ SpectralData.cxx, src/XSModel/Data/Detector/ UserDummyResponse.cxx, src/XSModel/GlobalContainer/ DataContainer.cxx, src/XSUser/Handler/ xsDummyrsp.cxx, xsResponse.cxx, and rebuild xspec.

12.3.1al Using delcomp to remove a table model component causes a segmentation fault. If editmod is used on a model with a table component, and the component is written with an abbreviated form of "atable", "mtable", etc., editmod erroneously considers it a modified component. Report added on Aug 20, 2007.

The fix is to replace headas/Xspec/src/XSModel/Model/ Model.cxx, src/XSModel/Model/Component/ Component.cxx, and rebuild xspec.

12.3.1am A couple of output formatting improvements: lumin output should be in standard "d.ddde+EE" format and not written as "d.ddd x 10^EE". The margin command output should switch from fixed to scientific format for a wider range of exponent values. Our thanks to Jeremy Sanders for pointing this out. Report added on Aug 20, 2007.

The fix is to replace headas/Xspec/src/XSFit/MCMC/ MarginGrid.cxx, src/XSModel/Model/ Model.cxx, and rebuild xspec.

Thursday, August 16, 2007

building lisatools

Building lisatools using the instructions provided by Michele. A few things to note :

1. The correct svn command is
svn co https://lisatools.svn.sourceforge.net/svnroot/lisatools lisatools

2. The build of synthLISA fails with a C++ error. This is because python2.5 requires the
SWIGged files to have been created by swig 1.3.31, not the swig 1.3.29 in lisatools. Grabbed
the new gzipped swig from sourceforge and replaced in lisatools/Packages. Then edited
master-install.py to use 1.3.31 instead of 1.3.29.

3. This still fails because the SWIGged files are not created in the standard build. Deleted
lisasim/{lisasim-swig_wrap.cpp, lisasim.py} then built synthLISA using the setup.py in
synthLISA-1.3.3. Note that if I rerun the master-install.py it reextracts the contents of the
tarfile and puts back the two files I just deleted.

Monday, August 13, 2007

xspec lumin command

Jeremy Sanders points out that the lumin command doesn't write the number in standard computer notation (x.xxxxxe+yy) unlike every other output number in xspec. So, modified Model.cxx appropriately.

xselect array sizes

Kenji ran into a problem with xselect trying to use a large number of MKFs. Since the cost in memory is low I increased most of the sizes in the xsel.inc file.

Saturday, July 28, 2007

Ubuntu network problem

I ran into a problem with avahi that appears to be relatively common. My version is that the wireless networking fails and Network Tools shows a network device called eth1:avahi which shows a few transmitted and received bytes (with errors) but no interface information. This device appears to have preempted the correct eth1 device. I killed this rogue device using
sudo avahi-autopid --kill eth1
then after a while wireless works again as the eth1 device shows a connection.

At the suggestion of omingo I have done a
sudo apt-get --purge install avahi-autoipd --reinstall
to make sure the latest version of avahi-autopid is in use.

Update: this doesn't seem to have helped. Another possible workaround seems to be to go to Wireless Connections Properties using the Network Settings tool and switch from DHCP to Zeroconf, click on OK, wait for the tool to finish resetting the connection, then go back into Properties and switch back to DHCP.

Update: this may actually be a problem with network-manager. I've made the fix to NetworkManager.conf for bug 40125. Did a suspend then restart and the wireless connection came up correctly which it has not done before.

Thursday, July 26, 2007

HEAsoft built under Ubuntu

Successfully built the HEAsoft distribution on my new Dell with Ubuntu Feisty Fawn. I had to get a number of packages...

sudo apt-get install gfortran g++
sudo apt-get install libncurses5-dev
sudo apt-get install x-dev libx11-dev libxt-dev

Just to be on the safe side (and under bash) I did a

F77=gfortran
export F77
CC=gcc
export CC
CXX=g++
export CXX

Then the configure and build is

./configure > config.out 2>&1 &amp;
make > build.log 2>&1 &
make install > install.log 2>&1 &

Wednesday, July 25, 2007

Cisco VPN client and Ubuntu Feisty Fawn

Working on setting up my new Dell laptop which came preinstalled with Ubuntu Feisty Fawn. A little work needed with the Cisco VPN client - the version downloaded from Goddard CNE needs patching for recent versions of Linux. Fortunately, there are really helpful instructions on using the VPN client available. Tricks I had to do were
sudo chmod 4111 /opt/cisco-vpnclient/bin/cvpnd
/etc/init.d/vpnclient_init restart

to get round the error messages
privsep: unable to drop privileges: group set failed.
The application was unable to communicate with the VPN sub-system.

then I got
Initializing the VPN connection.
Initiating TCP to 198.119.56.78, port 10005
Secure VPN Connection terminated locally by the Client
Reason: Failed to establish a VPN connection.
There are no new notification messages at this time.

This occurs if both the wireless and ethernet connections are enabled at the same time. I turned off the ethernet connection by going to Network Settings selecting Wired Connection then clicking on Properties followed by checking the Enable Roaming Mode box.

Friday, July 20, 2007

update of fluxerror.tcl for multiple datasets

Shao Li noted that fluxerror.tcl doesn't work if multiple datasets have been read in. An immediate workaround is just to change "tcloutr flux" to "tcloutr flux 1" in the script. I have checked in a new version of the script which returns an error range for each dataset - note that the flux ranges will only actually be different if the datasets are members of different datagroups.

Thursday, July 19, 2007

xspec v12 gain fit parameters

Craig has fixed the gain fit parameters so they can be individually frozen during a fit (other than just having both parameters fixed or free). This makes the behavior similar to that available in v11. v12.3.1ae.