| Home | Trees | Indices | Help | 
        
  | 
  
|---|
| 
       | 
  
Author: Duncan Macleod <duncan.macleod@astro.cf.ac.uk>
    
  | 
|||
| 
        PlotSegmentsPlot Horizontal bar segment plot.  | 
  |||
| 
        ScatterPlot A simple scatter plot, taking x- and y-axis data.  | 
  |||
| 
        ColorbarScatterPlot A scatter plot of x- versus y-data, coloured by z-data.  | 
  |||
| 
        DetCharScatterPlot A 'DetChar' style scatter plot, whereby those triggers under a threshold on the colour column are plotted much smaller than others, allowing line features to be shown easily.  | 
  |||
| 
        LineHistogram A simple line histogram plot.  | 
  |||
| VerticalBarHistogram | |||
| 
        DataPlot Time-series data plot.  | 
  |||
| ColorMap | |||
| 
        SkyPositionsPlot Plot of sky positions plotted onto mpl_toolkits basemap projection.  | 
  |||
| ColorbarSkyPositionsPlot | |||
    
  | 
|||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
    
  | 
|||
        _display = getenv('DISPLAY', '')
     | 
  |||
        _backend_warn = """No display detected, moving to 'Agg' backen
     | 
  |||
        __date__ = git_version.dateThis module provides plotting routines for use in data quality investigations.  | 
  |||
    
  | 
|||
  
 
Format the x- and y-axis ticks to ensure minor ticks appear when needed
and the x-axis is set for spaces of 4 rather than 5.
Arguments:
  ax : matplotlib.axes.AxesSubplot
    Axes object to format
   | 
  
 
Format the string columnName (e.g. xml table column) into latex format for 
an axis label.
Examples:
>>> display_name('snr')
'SNR'
>>> display_name('bank_chisq_dof')
'Bank $\chi^2$ DOF'
Arguments:
  columnName : string
    string to format
   | 
  
 
Work out renormalisation for the time axis, makes the label more
appropriate. Returns unit (in seconds) and string descriptor
Example:
>>> time_unit(100)
(1, 'seconds')
>>> time_unit(604800)
(86400, 'days')
Arguments:
  duration : float
    plot duration to normalise
   | 
  
 
Returns the value of trig.col or trig.get_col() for the given string col,
and the object trig. If col='time' is given, trig.get_peak() is returned for
*Burst* objects, trig.get_end() for *Inspiral* objects and trig.get_start()
for *Ringdown* objects. Raises KeyError if cannot execute.
Arguments:
  trig : [ lsctables.SnglBurst | lscatbles.SnglInspiral |
           lsctables.SnglRingdown ]
    xml table entry from which to extract parameter
  col : string
    glue.ligolw.table column name to extract
   | 
  
 
Plot the time series / spectrum of a given set (or given sets) of data.
Arguments:
  data : list
    list of (ChannelName,x_data,y_data) tuples with channel name (or data 
    source) and time/freq, amplitude arrays for each channel. Channels are
    plotted in the order given.
  outfile : str
    output plot path
Keyword Arguments:
  x_format : [ 'time' | 'frequency' ]
    type of data for x_axis, allows formatting of axes
  zero : [ float | int | LIGOTimeGPS ]
    time around which to centre time series plot
  zeroindicator : [ False | True ]
    indicate zero time with veritcal dashed line, default: False
Unnamed keyword arguments:
  logx : [ True | False ]
    boolean option to display x-axis in log scale.
  logy : [ True | False ]
    boolean option to display y-axis in log scale.
  xlim : tuple
    (xmin, xmax) limits for x-axis
  ylim : tuple
    (ymin, ymax) limits for y-axis
  xlabel : string
    label for x-axis
  ylabel : string
    label for y-axis
  title : string
    title for plot
  subtitle : string
    subtitle for plot
All other given arguments will be passed to matplotlib.axes.Axes.plot.
   | 
  
 
Wrapper for dqPlotUtils.LineHistogram to plot a histogram of the value in
any column of the ligolw table triggers. If a glue.segments.segmentlist
seglist is given, the histogram is presented before and after removal of
triggers falling inside any segment in the list.
Arguments:
  triggers : glue.ligolw.table.Table
    ligolw table containing triggers
  outfile : string
    string path for output plot
Keyword arguments:
  column : string
    valid column of triggers table to plot as histrogram
  num_bins : int
    number of histogram bins to use
  seglist : glue.segments.segmentlist
    list of segments with which to veto triggers
  flag : string
    display name of segmentlist, normally the name of the DQ flag
  start : [ float | int | LIGOTimeGPS]
    GPS start time (exclude triggers and segments before this time)
  end : [ float | int | LIGOTimeGPS]
    GPS end time (exclude triggers and segments after this time)
  livetime : [ float | int | LIGOTimeGPS ]
    span of time from which triggers and segments are valid, used to
    display histogram counts in terms of rate (Hz) for easy comparisons
  etg : string
    display name of trigger generator, defaults based on triggers tableName
Unnamed keyword arguments:
  cumulative : [ True | False ]
    plot cumulative histogram
  rate : [ True | False ]
    plot rate histogram (normalises with given or calculated livetime)
  fill : [ True | False ]
    fill below the histogram curves, default colors:
        red (vetoed), green (not vetoed).
  logx : [ True | False ]
    boolean option to display x-axis in log scale.
  logy : [ True | False ]
    boolean option to display y-axis in log scale.
  xlim : tuple
    (xmin, xmax) limits for x-axis
  ylim : tuple
    (ymin, ymax) limits for y-axis
  xlabel : string
    label for x-axis
  ylabel : string
    label for y-axis
  title : string
    title for plot
  subtitle : string
    subtitle for plot
  greyscale : [ True | False ]
    use (non-greyscale) colour scheme suitable for greyscale plots
All other given arguments will be passed to matplotlib.axes.Axes.plot and
matplotlib.axes.Axes.fill_between. 
   | 
  
 
Plots ycolumn against xcolumn for columns in given
Sngl{Burst,Inspiral}Table object triggers, coloured by the zcolumn
highlighting those entries falling inside one of the entries in the
glue.segments.segmentlist object segments, if given. 
'time' given as a column name is a special case, since s and ns times are
stored separately in the SnglTable structures. In this case the
trigger.get_xxxx() function is called.
Arguments:
  triggers : glue.ligolw.table.Table
    ligolw table containing triggers
  outfile : string
    string path for output plot
Keyword arguments:
  xcolumn : string
    valid column of triggers table to plot on x-axis
  ycolumn : string
    valid column of triggers table to plot on y-axis
  zcolumn : string
    valid column of triggers table to use for colorbar (optional).
  rankcolumn : string
    valid column of triggers table to use for ranking events (optional).
  etg : string
    display name of trigger generator, defaults based on triggers tableName 
  start : [ float | int | LIGOTimeGPS ]
    GPS start time of plot
  end : [ float | int | LIGOTimeGPS ]
    GPS end time of plot
  zero : [ float | int | LIGOTimeGPS ]
    time around which to centre plot
  seglist : glue.segments.segmentlist
    list of segments with which to veto triggers
  flag : string
    display name of segmentlist, normally the name of the DQ flag
Unnamed keyword arguments:
  detchar : [ True | False ]
    use 'DetChar' style for scatter plot with colorbar, triggers below given
    dcthreshold are small with no edges, whilst other triggers are normal
  dcthreshold : float
    threshold below which scatter points are small with no edges when using
    DetChar plotting style
  logx : [ True | False ]
    boolean option to display x-axis in log scale.
  logy : [ True | False ]
    boolean option to display y-axis in log scale.
  logz : [ True | False ]
    boolean option to display z-axis in log scale.
  xlim : tuple
    (xmin, xmax) limits for x-axis. Triggers outside range are removed.
  ylim : tuple
    (ymin, ymax) limits for y-axis. Triggers outside range are removed.
  zlim : tuple
    (zmin, zmax) limits for z-axis. Triggers outside range are removed.
  clim : tuple
    (cmin, cmax) limits for color scale. Triggers outside range are moved
    onto boundary.
  xlabel : string
    label for x-axis
  ylabel : string
    label for y-axis
  zlabel : string
    label for z-axis
  title : string
    title for plot
  subtitle : string
    subtitle for plot
  greyscale : [ True | False ]
    use (non-greyscale) colour scheme suitable for greyscale plots
All other given arguments will be passed to matplotlib.axes.Axes.scatter. 
   | 
  
 
segments.
Plots a histogram of segment duration for the glue.segments.segmentlist
Arguments:
  segs : [ glue.segments.segmentlist | glue.segments.segmentlistdict ]
    list of segments with which to veto triggers, use dict for multiple
    datasets
  outfile : string 
    string path for output plot
Keyword arguments:
  flag : string
    display name for segments, normally the name of the DQ flag
  logx : [ True | False ]
    boolean option to display x-axis in log scale.
  logy : [ True | False ]
    boolean option to display y-axis in log scale.
   | 
  
 
Plot rate versus time for the given ligolw table triggers, binned by the
given bincolumn using the bins list.
Arguments:
  triggers : glue.ligolw.table
    LIGOLW table containing a list of triggers
  outfile : string
    string path for output plot
Keyword arguments:
  average : float
    Length (seconds) of rate segment
  start : [ float | int | LIGOTimeGPS ]
    GPS start time
  end : [ float | int | LIGOTimeGPS ]
    GPS end time
  zero : [ float | int | LIGOTimeGPS ]
    GPS time to use for 0 on time axis
  bincolumn : string
    valid column of the trigger table to use for binning
  bins : list
    list of tuples defining the rate bins
  etg : string
    display name of trigger generator
  logy : [ True | False ]
    boolean option to display y-axis in log scale
  ylim : tuple
    (ymin, ymax) limits for rate axis
   | 
  
 
Plot RMS versus time for the given ligolw table triggers, binned by the
given bincolumn using the bins list.
Arguments:
  triggers : glue.ligolw.table
    LIGOLW table containing a list of triggers
  outfile : string
    string path for output plot
Keyword arguments:
  average : float
    Length (seconds) of RMS segment
  start : [ float | int | LIGOTimeGPS ]
    GPS start time
  end : [ float | int | LIGOTimeGPS ]
    GPS end time
  zero : [ float | int | LIGOTimeGPS ]
    GPS time to use for 0 on time axis
  rmscolumn : string
    valid column of the trigger table to RMS over
  bincolumn : string
    valid column of the trigger table to use for binning
  bins : list
    list of tuples defining the rate bins
  etg : string
    display name of trigger generator
  logy : [ True | False ]
    boolean option to display y-axis in log scale
  ylim : tuple
    (ymin, ymax) limits for rate axis
   | 
  
 Plot the segments contained within the glue.segments.segmentlistdict segdict to the given path string outfile. The list keys can be given to guarantee the order of the segments on the y-axis. x-axis limits can be controlled using start, end and zero. The glue.segments.segmentlist object highlight_segments can be given to highlight a number of segments. Arguments: segdict : glue.segments.segmentlistdict  | 
  
 
Parse ConfigParser.ConfigParser section for plot parameters. Sections should
be name '[plot xcolumn-ycolumn-zcolumn]' e.g.
'[plot time-peak_frequency-snr]'. Returns a pair of dicts with the
following keys:
columns:
  xcolumn : [ string | None ]
    column string to plot on x-axis
  ycolumn : [ string | None ]
    column string to plot on y-axis
  zcolumn : [ string | None ]
    column string to plot on z-axis
params:
  xlim : list
    [xmin, xmax] pair for x-axis limits
  ylim : list
    [ymin, ymax] pair for y-axis limits
  zlim : list
    [zmin, zmax] pair for z-axis limits
  clim : list
    [cmin, cmax] pair for colorbar limits
  logx : bool
    True / False to plot log scale on x-axis
  logy : bool
    True / False to plot log scale on y-axis
  logz : bool
    True / False to plot log scale on z-axis
   | 
  
 
Plot latitude against longitude for the given ligolw table skyTable into the
given outfile. Uses the mpl_toolkits basemap module to plot the sky sphere 
in a variety of projections, or simply a scatter plot if projection=None.
Can plot lines and detector positions on top if given.
Arguments:
  skyTable : glue.ligolw.table.Table
    ligolw table containing triggers or SkyPosition objects
  outfile : string
    string path for output plot
Keyword arguments:
  zcolumn : string
    valid column of ligolw table to use for colorbar (optional).
  format : [ 'radians' | 'degrees' ]
    str identifying format of longtiude/ra, latitude/dec colums in table.
    Plot is always drawn in degrees.
  projection : str
    type of spherical projection to use, if any. See matplotlib Basemap
    documentation for details, recommended: 'ortho', 'hammer'.
  centre : tuple
    (longitude, latitude) pair on which to centre plot. Latitude centring
    only works for certain projections.
  detectors : list
    list of detector prefixes to plot, e.g. ['H1', 'L1'].
  lines : dict
    dict of name:table pairs from which to plot lines (+ marker) on top of
    points
  range : tuple
    ((xmin, ymin), (xmax, ymax)) tuples for lower left and upper right
    corners, in range 0-1, e.g. (0,0) is full lower left, (1,1) full upper
    right corners for full spherical projection. Only works with certain
    projections.
Unnamed keyword arguments:
  logx : [ True | False ]
    boolean option to display x-axis in log scale. Not applicable when using
    projection.
  logy : [ True | False ]
    boolean option to display y-axis in log scale. Not applicable when using
    projection.
  logz : [ True | False ]
    boolean option to display z-axis in log scale.
  xlim : tuple
    (xmin, xmax) limits for x-axis (longitude). Triggers outside range are
    removed.
  ylim : tuple
    (ymin, ymax) limits for y-axis (latitude). Triggers outside range are
    removed.
  zlim : tuple
    (zmin, zmax) limits for z-axis. Triggers outside range are removed.
  clim : tuple
    (cmin, cmax) limits for color scale. Triggers outside range are moved
    onto boundary.
  xlabel : string
    label for x-axis
  ylabel : string
    label for y-axis
  zlabel : string
    label for z-axis
  title : string
    title for plot
  subtitle : string
    subtitle for plot
All other given arguments will be passed to matplotlib.axes.Axes.scatter. 
   | 
    
  | 
|||
  _backend_warn
  | 
  __date__This module provides plotting routines for use in data quality investigations. All routines are written to work in as general a way as possible with ligolw tables and lsctables compatible columns, and to plot in a similar pythonic way to pylal.plotutils. 
  | 
| Home | Trees | Indices | Help | 
        
  | 
  
|---|
| Generated by Epydoc 3.0.1 on Tue Dec 12 01:21:41 2017 | http://epydoc.sourceforge.net |