CRaTER -- c_graph, c_plot


c_graph, c_plot -- Generate histogram of primary science results


     c_graph|c_plot [-a #] [-b #] [-c] [-d 246] [-h] [-l] [-o outfile] \
             [-t|T Title] [-v] [-z] [file_name]


       -a #    specifies the lowest channel/time of interest
       -b #    specifies the highest channel/time of interest
       -c      make print file in color Postscript
       -d      specifies the detector numbers of interest;
               multiple -d flags result in multiple plots
       -h      gets full help message
       -l      make plot scales linear (default is log-log)
       -L      make plot scales log-linear
       -o      specify name of output print file
       -t      prefix default title information (s/n & date) with Title
       -T      replace default title information with Title
       -v      makes the output verbose (to STDERR)
       -z      zipper the plot points together with lines
       file_name   read data from this file; if not provided, use STDIN


In the default case, we read a tab-separated histogram of science data in the form {Channel D1 D2 D3 D4 D5 D6}, one entry per line. The lower and upper bounds of the channels of interest may be chosen with the -a and -b flags, respectively. The plot scales are log-log by default, but may be set to either linear or log-linear. The program generates a Postscript file for printing in parallel with displaying the plot in a separate X-window.

If multiple -d flags with arguments are given, a separate plot is made for each instance; in the Postscript file each plot appears on a separate page in the common output file.

The program c_hist generates histograms from raw CRaTER science packets which are compatible with this program. The first line in those histograms is of the form

   ### CRaTER SerialNumber nn   Time    hh:mm:ss mm/dd/yy

If that line is present, c_graph will label the plots with the instrument serial number and date the data was taken.

The plots will look cleaner if the -z flag is used to plot using lines rather than points. If there are discontinuities in the data, however, the result can be misleading.


    perl5.002     Minimum version of Perl interpreter required
    gnuplot       This script works with version 3.7 and 4.0
    CRATERTOOLS   Environment variable containing path to CRaTER utilities


The spool file for STDIN is hardcoded and both it and the Postscript file are written to the current directory, rather than /tmp.


lf_hist, gnuplot


Bob Goeke

RCS Information

$Id: c_graph,v 2.2 2008/11/04 16:05:15 goeke Exp goeke $