qjas

Software to display angle-time spectrograms stacked by energy of data from individual energy sweeps of the Cluster and Doublestar PEACE instruments (and perhaps other similar instruments) from data held in the IDFS (see www.idfs.org) format. The plot format is based on a design developed by J-A Sauvaud, CESR, Toulouse. When viewed from afar, the separate spectrograms merge to resemble an omni-directional energy-time spectrogram. Within each spectrogram, the angular dependence of a given energy level is revealed.

qjas will also export such sweep-organised data to an ISTP/Cluster compliant CDF file or to a flat ascii file with attached header conformant with the Cluster Exchange Format adopted for the Cluster Active Archive (see DS-QMW-TN-0010.pdf).

qjas draws on QPeace modules, which may have wider applicability. At present, qjas works correctly with the various 3-D PEACE modes, including 3DX, 3DR, and LER, in which the angle dimension corresponds to polar angle of each sensor; as time advances successive sweeps are plotted together with a panel showing the asimuth. Qjas also renders the original PAD data and the newer SPINPAD (which is equivalent to the 3D products with only one sweep per "spin") in which the angle dimension corresponds to pitch angle.  As of Version 3.0, QJAS will gather a user-specified number of sweeps, spins, or seconds with options to rebin in energy, to correct for spacecraft potential using the Cluster EFW prime parameter probe potential or a constant value, and to rebin onto a user-specified pitch angle distribution using high-resolution magnetometer data.

Contents

Copyright and Licence
Requirements
Authors
History
Running qjas
Using qjas
IDFS Lineage
Energy/Velocity Options
Phase Space Options
Plot Output
Wheel Sequences
Data Export
Save/Restore
Troubleshooting
FAQ

Copyright and License

This software is made available under the GNU Public License, with copyright by the author(s). SwRI IDFS software is licencsed separately and does NOT form part of this software. Some of this software also uses freely available software including the PGPLOT graphics library and the QT widget library. These libraries are subject to their own licensing conditions.

Requirements

qjas is distributed as a binary executable with dynamic linkage for Linux (Mandrake) and Sun/Solaris. Various system and utility libraries can also be found on the www distribution site if needed. The full source code is delivered in the tarr'ed distribution.

qjas is a C++ application, which draws on QPeace software, which is written mainly in C. Separate programmer's documentation is provided for generic QPeace routines. Qjas is a widget application using the QT toolkit.  It is developed primarily on a Linux workstation (Mandrake) and tested regularly on Sun Solaris. Early versions were developed on a Redhat system without difficulty, and it has also been built successfully on a MacOsX platform. A build is supplied by SwRi as an SDDAS-aware application, which is probably particularly helpful for Macintosh users. Graphics uses the C language interface to the PGPLOT library (see http://www.astro.caltech.edu/~tjp/pgplot/). In order to compile against IDFS modules, users will need appropriate licensing authority for the IDFS software (see www.idfs.org).

Running qjas requires a local pgplot xwindow server (pgxwin_server - unless only gif and postscript file output is required) and a fully functional SDDAS/IDFS system.

Authors

Steve Schwartz (s.schwartz@imperial.ac.uk) is the original author and formal PEACE Co-Investigator.

History

20 June 2001 First issue
31 July 2001 Includes file export
January 2002 File export conforms to Cluster Exchange Format; attempt to include data promotion (courtesy Joey Mukherjee, SwRI).
July 2002 Added rebinning in pitch angle and custom energy bins.
February 2005 Significant re-write of qpeace idfs routines to perform better with data quirks, sun pulse, jitters, and other afflictions of real data. Added capability to gather (i.e., average) variable numbers of sweeps, spins, or seconds, and to correct energy limits (with corresponding corrections to science values if appropriate - e.g., differential energy flux), for spacecraft potential.

Running qjas

Be sure the qjas executable is in your search path (it is delivered in the bin directory of the QPeace software), and that the pgplot xwindow server pgxwin_server and fonts (grfonts.dat) are available, e.g., by placing them in a directory and setting the environment variable PGPLOT_DIR to point to that directory.  qjas should run without these if the plots are sent to gif or postscript files. A script QJAS is provided which sets the shell and pgplot environment variables if you do not want to add the PGPLOT_DIR environment variable to your .cshrc. Edit this script to point to your local copies.

The application takes no arguments and brings up the single GUI shown. Pushing the Help button brings up a text browser containing this documentation.

qjas gui

Using qjas


qjas sample plot

Troubleshooting

Launching

Although not especially verbose, qjas does issue various warnings and errors to the console window from which it was launched, and this may provide clues as to the source of the problem(s).  Most problems launching qjas are related to either library inconsistencies between the supplied binary versions and the user's local installation. Try downloading the collection of system libraries from the qpeace homepage, put those in the qpeace/lib directory, and uncomment/edit the QJAS script to put these libraries ahead of your own system's in the LD_LIBRARY_PATH environment variable. Other things such as the pgplot shareable (.so) library may also need to be added to your LD_LIBRARY_PATH in the same way. If the application fails saying it can't find a xyz.so file, that's what the problem is, so make sure you can find the file it's looking for and put it in the LD_LIBRARY_PATH.

Lineage

Plotting

Exporting

Bugs and Features


Report bugs and comments to: csc_support@qmul.ac.uk


FAQ

Q: Why don't I always see the full set of energies when I know the instrument returned more?
Q: When I correct for the (varying) spacecraft potential, why do my plot and exported data not show varying energy bins?
Q: When I correct for the spacecraft potential, the colours and values in the plot change. Why?
Q: How are count rates treated in rebinning or correcting for spacecraft potential?
Q: Why does gathering sweeps of PAD data result in twice as many output time strips when rebinned in pitch angle?

-------------------------------

Q: Why don't I always see the full set of energies when I know the instrument returned more?
A: To plot (and export), QJAS always recasts the data onto a uniform set of energy/angle bins. The template for this interpolation is taken by default from the FIRST sweep being plotted/exported. You can change this by selecting Custom Bins, and then specifying a new number and energy range for these bins.

Q:
When I correct for the (varying) spacecraft potential, why do my plot and exported data not show varying energy bins?
A: The QJAS code does indeed use the instantaneous value for the spacecraft potential, and each sweep of data is corrected accordingly. However, before plotting or exporting the data, they are interpolated onto a COMMON set of energy/angle bins, taken to be those of the FIRST sweep in the sequence. The interpolation algorithm finds the overlapping polar area between the old and new bins and computes a weighted average of the phase space density within each new bin.

Q: When I correct for the spacecraft potential, the colours and values in the plot change. Why?
A: Correcting for spacecraft potential involves converting to (presumed) free space values for phase space density. In essence this means following electron trajectories from the spacecraft back in time and applying Liouville's Theorem. This theorem tells us that proper phase space density f(v) is conserved in this process, and you should see that when you are looking at phase space density the colours do not (interpolation matters aside) change. However, differential energy flux (DeF) is proportional to E^2 f(v), and qpeace software thus calculates a new DeF by finding the ratio of E^2(new) to E^2(old) in order to preserve the associated value of f(v).

Q: How are count rates treated in rebinning or correcting for spacecraft potential?
A: All qpeace operations on count rates are designed to preserve the total number of counts. This can be misleading if you try to interpret, say, pitch angle rebinned count rates in terms of the underlying distribution function. At the same time, it is a useful measure of where the instrument counting statistics really are (and aren't). If you want to do physics, use a physical quantity. Differential energy flux is essentially the same moment of f(v) as the instrument count rate, so you can think of DeF as calibrated counts.

Q: Why does gathering sweeps of PAD data result in twice as many output time strips when rebinned in pitch angle?
A:  When NOT rebinned, PAD actually fetches and uses the SPINPAD virtual instrument (you can see this in the title to the plot). SPINPAD has two separate measurements, a half spin apart from one another, combined into a unified pitch angle distribution. Gathering by sweeps grabs each individual piece of this and rebins it in pitch angle separately, resulting in twice as many results. This is useful if you want to see where/when the various contributions to the pitch angle distribution were sampled (and indeed the time resolution corresponds to the precise instrument sweep). To get the analog to the SPINPAD data,  pa-rebin the PAD data by gathering SPINS instead. You may also specify two sweeps, though in some instrument modes (HAR) there are more than just two sweeps returned, so gathering by SPINS is more robust (unless you want to see those extra sweeps).

PEACE Diagram

PEACE Diagram



Page maintained by: Steve Schwartz (s.schwartz@imperial.ac.uk)
Last updated: 9 May 2007 (AJA)