next up previous contents
Next: The Control File Up: Advanced Topics Previous: Advanced Topics

Using IDL variables after leaving WINGSPAN

After quitting WINGSPAN, the user is left with the IDL main-level prompt. All of WINGSPAN's important variables are declared in Common at the Main level, so they are available to the user for further processing. Issuing the ``help'' command in IDL will cause all of these, as well as all the compiled routines from WINGSPAN, to be displayed. The variables are grouped by function in the various Common blocks, with some inevitable duplication. The most important of these are described in the file wgsp_cb.pro: e.g., SPECTRA, SPECTRA_ERRORS, TIMES, THRESHOLDS comprise the fundamental elements of the unprocessed data; containing (respectively) the count rates, their errors, the start and stop times for the data and finally the energy thresholds of data bins. The variable RESP_MATRIX contains the DRM, and the energy thresholds associated with it are in E_IN (for the photon input edges) and CH_OUT (for the output side, the data channels). If you have already created a background model in WINGSPAN, it is simple to create a background spectrum and errors for any specified time interval by using BACK_EVAL_MODEL and BACK_EVAL_MSIG as is done in /wingspan/idl_source/w_tmenu.pro.

A more advanced usage of WINGSPAN, its declared variables and its procedures, is to add user-defined features to the program. The modularity of the program ensures that enhancements can be made with a minimum of effort. We have very limited programming resources, so we regret that we cannot correct errors in user-developed routines. However, here is some advice on how to implement changes in an ``application-friendly'' manner: encapsulate your routine, so that it can be called as a menu choice. At the completion of your routine, return to the calling menu; do not change any variables in COMMON (except those COMMONs internal to your routines) and if you alter any IDL global plot or window parameter, restore them to the values they had before your routine was called. These practices usually ensure that user-induced errors are confined to the new code. If you think you have encountered a true WINGSPAN bug, you must be able to re-create the error on a clean, unmodified copy of WINGSPAN before reporting it. Finally, if you have a tested routine which you believe adds functionality to WINGSPAN that it currently lacks and which you would like to offer for inclusion in the distribution version, please forward it to us; we will make your module available from the WINGSPAN WWW page.


next up previous contents
Next: The Control File Up: Advanced Topics Previous: Advanced Topics

Robert S. Mallozzi
Thu Sep 5 10:38:07 CDT 1996

[image 4K] BATSE Home Page
Responsible Manager: Jerry Fishman
Web Curator: Valerie Connaughton
Last Updated: November 8, 1996.