Customization using Style Files
It can become cumbersome to repeatedly enter long lists of
customization options on the command line; there is the option to
specify these options using style files. For example, suppose that
you don't like the pulsar name and frequency in the top-left corner of
your plots, and would rather that the source name, frequency, and
bandwidth appear in the top-right corner. Also, suppose you want the
filename to the left of the frame instead of over the centre. You
could write the following style file:
above:c=unset
above:l=$file
below:l=unset
below:r=PSR J$name\nFrequency: $freq MHz\nBandwidth: $bw MHz
Note that variable names from the Pulsar::Archive
class text interface may be specified by preceding the variable name with
a dollar sign ($). The variable names are the same as those understood
by psredit; for a complete listing, run:
psredit -H
Continuing with the example, name the style file style.txt and run
psrplot -p pa -s style.txt 0437n.FF -c cut=10.0
Note: each \n in the label translates into a new
line inside the frame.
Style files can also be used to create and customize multiple plots,
as described in
multiple plot style files.
Embedded pre-processing commands
It is also possible to embed data pre-processing commands in a style
file using the exec command; for example,
exec dedisperse
#################################################
# create a phase-vs-time plot
plot time
# plot a copy of the data integrated over all frequency channels
exec fscrunch
#################################################
# create a phase-vs-frequency plot
plot freq
# plot a copy of the data integrated over all sub-integrations
exec tscrunch
Note that
- plot <name> creates a new plot
- exec commands encountered before any plot is created
will be applied to the data input to all plots
- exec commands encountered after a plot is created
will be applied to the data input only to the last created plot.