next up previous contents
Next: 12. Files needed by Up: 11. Other useful PaPCo Previous: 11.2 PaPCo get remote

   
11.3 PaPCo output routine

One of the caveats of ISTP support for PaPCo was that PaPCo be able to produce output in digital form for use outside of PaPCo .

We have written a new PaPCo utility which can take the data arrays that are plotted and dump them out to file in a standard manner. This is done by providing an output routine which can be called at the point the data is plotted and which will write the data to file.

The user calls the papco_output routine and hands over the time and either one or two dimensional data arrays. A range of keywords can be set to add more information to the output product. For more information look at the header of the file papco_XX/papco_output.pro.

To use this feature press the ``Output'' action button in the PaPCo main widget - this will execute a normal draw loop and output all the data for the current PaPCo product into a single file (only for those modules in the product that support this feature). This data file can be written in either text, IDL saveset or CDF format (CDF format is still being implemented). The file name for this file is constructed using the current product name (set to ``none'' if no product name is defined) and the time range of the plot. The extension of the file indicates the file format, ``.ascii'' or ``.idl'' or ``.cdf''. The file is placed into the default output location set by the print widget.

As PaPCo is a distributed software project it is up to each module to support this feature in their draw routines. This feature can be transparently added to existing draw routines by including the keyword \OUTPUT to the draw_plot_type PaPCo interface routine and to the user's plot routine.

This feature is enabled by adding a new PaPCo interface routine (canget_plot_type) to ``tell'' PaPCo that the module supports this feature, into the modules papcoadd_plot_type file. All this interface routine does is set a variable ``canget'' to 1 to enable or to 0 to disable this feature. If this routine does not exist, this feature is disabled by default.

Finally all the user has to do is to add the lines

  if KEYWORD_SET(OUTPUT) then begin
    print,'% p_plot_type_spec: Writing plot data out to file'
    description='plot_type template sample data - Energy spectra, 10 channels'
    time_label='Seconds since start of day'
    channels=yarr
    y_label=uytitle
    z_label=uztit
    rs_label=utitle
    nodata=0
    papco_write_data, time, zmat, $
                      DESCRIPTION=description, TIME_LABEL=time_label, $
                      CHANNELS=channels, $
                      Y_LABEL=y_label, Z_LABEL=z_label, $
                      RS_LABEL=rs_label, NODATA=nodata
  endif

at the end of his/her plot routine. The above example is taken from the current module template plot_type, which implements this feature.

To find out more about how to implement this feature look at the module template plot_type and the documentation included within the code.


next up previous contents
Next: 12. Files needed by Up: 11. Other useful PaPCo Previous: 11.2 PaPCo get remote
Reiner Friedel
1999-02-03