Created on 28 Feb 2011
Plotting LIS data requires these components:
User creates a PlotConfig (this reflects a PRES table). This is reusable.
Area plotting. Caching (e.g. SVG fragments - is this worth it?)
Typically a three track (+depth) have these dimensions in inches:
Track | Left | Right | Width |
---|---|---|---|
1 | 0 | 2.4 | 2.4 |
Depth | 2.4 | 3.2 | 0.8 |
2 | 3.2 | 5.6 | 2.4 |
3 | 5.6 | 8.0 | 2.4 |
Track names can be split (e.g. LHT1 is left hand track 1) or merged (T23 is spread across tracks two and three).
Examples of PRES and FILM records:
Table record (type 34) type: PRES
MNEM OUTP STAT TRAC CODI DEST MODE FILT LEDG REDG
-----------------------------------------------------------------------------------
SP SP ALLO T1 LLIN 1 SHIF 0.500000 -80.0000 20.0000
CALI CALI ALLO T1 LDAS 1 SHIF 0.500000 5.00000 15.0000
MINV MINV DISA T1 LLIN 1 SHIF 0.500000 30.0000 0.00000
MNOR MNOR DISA T1 LDAS 1 SHIF 0.500000 30.0000 0.00000
LLD LLD ALLO T23 LDAS 1 GRAD 0.500000 0.200000 2000.00
LLDB LLD ALLO T2 HDAS 1 GRAD 0.500000 2000.00 200000.
LLG LLG DISA T23 LDAS 1 GRAD 0.500000 0.200000 2000.00
LLGB LLG DISA T2 HDAS 1 GRAD 0.500000 2000.00 200000.
LLS LLS ALLO T23 LSPO 1 GRAD 0.500000 0.200000 2000.00
LLSB LLS ALLO T2 HSPO 1 GRAD 0.500000 2000.00 200000.
MSFL MSFL ALLO T23 LLIN 1 GRAD 0.500000 0.200000 2000.00
Table record (type 34) type: FILM
MNEM GCOD GDEC DEST DSCA
-----------------------------
1 E20 -4-- PF1 D200
2 EEE ---- PF2 D200
Table record (type 34) type: PRES
MNEM OUTP STAT TRAC CODI DEST MODE FILT LEDG REDG
-----------------------------------------------------------------------------------
NPHI NPHI ALLO T23 LDAS 1 SHIF 0.500000 0.450000 -0.150000
DRHO DRHO ALLO T3 LSPO 1 NB 0.500000 -0.250000 0.250000
PEF PEF ALLO T23 LGAP 1 SHIF 0.500000 0.00000 10.0000
SGR DISA T1 LLIN 1 SHIF 0.500000 0.00000 300.000
CGR DISA T1 LGAP 1 SHIF 0.500000 0.00000 300.000
TENS TENS DISA T3 LGAP 1 SHIF 0.500000 14000.0 4000.00
CAL CALI ALLO T1 LSPO 1 SHIF 0.500000 5.00000 15.0000
BS BS DISA T1 LGAP 1 SHIF 0.500000 5.00000 15.0000
FFLS FFLS DISA T1 LLIN 2 NB 0.500000 -0.150000 0.150000
FFSS FFSS DISA T1 LDAS 2 NB 0.500000 -0.150000 0.150000
LSHV LSHV DISA T3 LLIN 2 WRAP 0.500000 2150.00 2250.00
SSHV SSHV DISA T3 LDAS 2 WRAP 0.500000 1950.00 2050.00
FLS FLS DISA T2 LLIN 2 SHIF 0.500000 0.00000 150.000
FSS FSS DISA T2 LDAS 2 SHIF 0.500000 0.00000 150.000
RHOB RHOB ALLO T23 LLIN 1 SHIF 0.500000 1.95000 2.95000
PHIX PHIX ALLO T1 LLIN 1 NB 0.500000 0.500000 0.00000
Allows detailed trace comments to appear in the SVG
A few comments in SVG to delinialte header, Grid, Xaxis, curves etc
Width of comment for sections
Map of section level to comment padding character
Exception for plotting.
Exception for plotting.
Holds a minimal amount of curve plot scale and so on for the layout of the scale pane at each end of the log.
halfTrackStart is the start of the curve for a standard three track log T1=0, TD=2, T2=4, T3=6
halfTracks is the curve span as an integer so T23=4 LHT1=1 and so on.
ScaleSliceCurve(slice, curveName, start, span)
Alias for field number 1
Alias for field number 0
Alias for field number 3
Alias for field number 2
Keeps track of which slots are available for putting the curve scales in at the top and bottom of the log. This scale are is divided into slices that span the plot from left to right. These slices are subdivided into slots that correspond to a half-track in that slice.
Clears the slot map for the current slice.
Returns True if I can fit the CurvePlotScale object in the current slice.
Populates slots from a CurvePlotScale, caller should call canFit() first.
Generates a ordered list of ScaleSliceCurve objects laid out in a ‘nice’ fashion.
Describes the plot canvas as if it were a roll of paper. This can compute the various dimensions and positions of plot panes:
Legend:
In this diagram adjacent lines overlay:
|--------------------------------------------------------------------|
| Plot margin |
| .............................................................. |
| .************************************************************. |
| .* *. |
| .* Optional header e.g. API header *. |
| .* *. |
| .************************************************************. |
| .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. |
| .+ +. |
| .+ Scales (legends) at the top of the plot. +. |
| .+ +. |
| .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. |
| .^^^^^^^^^^^^^^^ -- X Stop (if up log) -- ^^^^^^^^^^^^^^^^^^^. |
| .^ ^. |
| .^ ^. |
| .^ ^. |
| .^ Main log plotted here ^. |
| .^ ^. |
| .^ ^. |
| .^ ^. |
| .^^^^^^^^^^^^^^^^ -- X Start (if up log) -- ^^^^^^^^^^^^^^^^^. |
| .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. |
| .+ +. |
| .+ Scales (legends) at the bottom of the plot. +. |
| .+ +. |
| .++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++. |
| .************************************************************. |
| .* *. |
| .* Optional trailer e.g. calibration record *. |
| .* *. |
| .************************************************************. |
| .............................................................. |
| Plot margin |
|--------------------------------------------------------------------|
The overall size of the plot.
The overall width as a number in PlotConstants.DEFAULT_PLOT_UNITS.
The overall width as a number in PlotConstants.DEFAULT_PLOT_UNITS.
The overall width as a Coord.Dim().
The overall width as a Coord.Dim().
“A Coord.Pt() that is the top left of the pane that tracks are plotted within.
The depth of the plot of the main pane as a Coord.Dim().
The available width inside the margins.
Returns a pair of top-left Coord.Pt(), Coord.Box() for the top header where the header goes.
Returns a pair of top-left Coord.Pt(), Coord.Box() for the top or bottom legend pane where the scales go.
Returns a pair of top-left Coord.Pt(), Coord.Box() for the pane where the main log goes.
Returns a pair of top-left Coord.Pt(), Coord.Box() for the pane where the trailer goes.
Returns a Coord.Dim() on the main pane that corresponds to theX as a number or an EngVal. If this is a number it is expected to be in the units of the xStart/xStop in the constructor.
Returns a Coord.Pt from theX axis value (or EngVal) and theTracPos that is a value in DEFAULT_PLOT_UNITS, for example given by a tracValueFunction. The Coord.Pt() will be scaled by VIEW_BOX_UNITS_PER_PLOT_UNITS.
Returns the start Coord.Pt() for the pane where the main log goes. For and upPlot this will be pane-bottom-left, for a downPlot this will be pane-top-left.
Defines a plot configuration. The basic architecture follows the data. The constructor takes all the static data, typically this can be obtained from the PRES and FILE tables. The dynamic (or user selected data) is passed in to plotLogPassLIS(). This is intended as a single Plot object might be used multiple times (e.g. on ‘scroll up’).
Title font
Title font size
How much depth to give each legend (curve scale) at the top and bottom of the log
How much spare depth to give over the legend (curve scale) sections at the top and bottom of the log
Where the curve line in the legend section appears as a proportion of LEGEND_DEPTH_PER_CURVE
Arrow heads on legend scales
Arrow head width on legend scales
Arrow head depth on legend scales
Arrow head line width on legend scales
Legend font.
Legend font family.
This is just a very small margin to provide a tiny bit of whitespace between elements in certain places
Maximum number of backup lines that can cross a single track in a single X step See the source of _filterCrossLineList() for an explanation.
Returns the X axis scale as a number given the FILM ID.
Returns an unordered list of FILM IDs.
Returns True if a call to plotLogPassLIS() is likely to lead to some plot data being produced.
Plot a part of a LogPass and returns a list of Channel IDs plotted.
theLisFile - The LIS File object.
theLogPass - A LogPass object, the FrameSet will be populated here.
theXStart - The start X axis position as an EngVal.
theXStop - The stop X axis position as an EngVal.
theFilmId - The ID of the output device from the film table
theFpOut - A file path for the output SVG.
frameStep - Integer number of frame steps, 1 is all frames.
title - A string for the title that will appear in LEGEND_DEPTH_SPARE
lrCONS - A CONS Logical Record that will be used to plot an API header in SVG.
timerS - Optional ExecTimer.ExecTimerList for performance measurement.
TODO: If title is empty do not use the space self.LEGEND_DEPTH_SPARE
Returns True if a call to plotLogPassLIS() is likely to lead to some plot data being produced.
Plot a part of a LogPass and returns a list of Channel IDs plotted.
theLisFile - The LIS File object.
theLogPass - A LogPass object, the FrameSet will be populated here.
theXStart - The start X axis position as an EngVal.
theXStop - The stop X axis position as an EngVal.
theFilmId - The ID of the output device from the film table
theFpOut - A file path for the output SVG.
frameStep - Integer number of frame steps, 1 is all frames.
title - A string for the title that will appear in LEGEND_DEPTH_SPARE
lrCONS - A CONS Logical Record that will be used to plot an API header in SVG.
timerS - Optional ExecTimer.ExecTimerList for performance measurement.
TODO: If title is empty do not use the space self.LEGEND_DEPTH_SPARE
A subclass of Plot that is configured from FILM, PRES and (optionally) AREA, PIP Logical Records.
A subclass of Plot that is configured from XML file(s) using LgFormat.