On 09/12/11 17:13, Jason Gofford wrote:
Hi,

I'm trying do away with QDP/PLT when generating plots from XSPEC. So
far, Veusz has been a welcome break from the tedious PLT interface and
its working great when importing spectra etc from QDP files. However, I
can't quite get QDP contour plots to work.

I've got a saved QDP contour plot which is 200x100 in size. Is there a
"correct" way of loading this file into Veusz (if it is possible)?
Importing the QDP file straight off gives me 101 datasets with a size of
201 but this doesn't play well with the contour plot function. Importing
as a 2D dataset doesn't seem to work due to the formatting in the file
(lines linked with "-"). Is there a work arounf for this?

Unfortunately I didn't include 2D qdp support in the current release. I meant to add this, but ran out of time. I've now added it to the plugin here:
https://github.com/jeremysanders/veusz/raw/6722ab896834de60f409ae481e797079b9f3e8c6/plugins/importplugin.py

You can replace the existing importplugin.py if you haven't got the binary version. It is possible to modify this and add it as a plugin to replace the existing version if that is useful - I can give instructions. I'm not sure it works if you have a complex dataset combining 2D and 1D data, however.

An alternative way to get the data into veusz is to copy the xspec output when doing steppar and import this as 1d data. You can then use the 1st option in the 2d dataset create dialog box to create a 2d dataset from 1d x, y, z datasets.

Also, when opened in QDP its possible to have several contours
corresponding to, for example, 90%, 99% and 99.9% confidence levels.
Assuming its possible to load in the QDP contour plot, how would I go
about emulating the multiple-contour behaviour in Veusz?

The modified plugin doesn't get the contour levels from the qdp file. This might be possible in the future as it is possible to return constants from a dataset, but I think the contour widget won't accept the values (yet).

Either switch the contour widget to "manual" mode and enter the contour levels from the "con" statement in the qdp file, or create a new 2D dataset based on your data, subtracting off the minimum. You can enter something like my2ddata - my2ddata.min() in the create 2d data dialog box (choosing from expression, based on existing 2d data). You can then use fixed values of deltachi2 in the contour widget, selecting manual mode again, appropriate to the contour levels.

Jeremy

_______________________________________________
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss

Répondre à