FILM Plotting Configuration

Represents the part of a plot configuration that, typically, can be obtained from a LIS FILM table.

Created on 21 Mar 2011

Example of the data in a film table:

Table record (type 34) type: FILM

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------

1     EEE   ----  PF2   D200
2     EEE   ----  PF1   DM

Other FILM Table Examples:

Table record (type 34) type: FILM

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
1     EEB   ----  PF1   D200
2     EEB   ----  PF2   DM

Table record (type 34) type: FILM

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
1     E20   -4--  PF1   D200
2     EEE   ----  PF2   D200

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
1     EEE   ----  PF1   D200
2     E1E   -4-   PF2   D200

Table record (type 34) type: FILM

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------

D     E3E   -3-   PFD   D200
E     E3E   -3-   PFE   D500
5     EB0   ---   PF5   D200
6     EEB   ---   PF6   D200

Table record (type 34) type: FILM

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------

8     EB0   ---   PF8   D200
A     LLLL  1111  PFA   DM
E     E4E   -4-   PFE   D200
K     E4E   -4-   PFK   D500

Table record (type 34) type: FILM

MNEM      CINT      GCOD  GDEC  DEST  DSCA
-------------------------------------------

1          0.00000  E2E   -2-   PF1   D200
2          0.00000  E2E   -1-   PF2   D500
3          0.00000  EEE   ----  NEIT  S5
4          0.00000  EEE   ----  NEIT  S5

Table record (type 34) type: FILM

MNEM      CINT      GCOD  GDEC  DEST  DSCA
-------------------------------------------

1          300.000  E2E   -2-   PF1   D200
2          300.000  E2E   -2-   PF2   D500
3          300.000  EEE   ----  NEIT  S5
4          300.000  EEE   ----  NEIT  S5

Table record (type 34) type: FILM

MNEM      CINT      GCOD  GDEC  DEST  DSCA
-------------------------------------------

1          50.0000  EEE   ----  PF1   D200
2          0.00000  EEE   ----  PF2   D200
3          0.00000  EEE   ----  NEIT  D200
4          0.00000  EEE   ----  NEIT  D200

Minimal, but not complete interpretation:

Ignore GDEC as dupe.

  • E - Equi-spaced (linear).
  • n - Log with number of decades.
  • B - Blank.
  • L - ?

What to do with 0 (continuation?). Examples: E20 -4– means 4 decades over track 23.

Four tracks, from 200099.S07:

Table record (type 34) type: FILM
MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
...
A     LLLL  1111  PFA   DM  
...

Table record (type 34) type: PRES
MNEM  OUTP  STAT  TRAC  CODI  DEST  MODE      FILT          LEDG          REDG      COLO
-----------------------------------------------------------------------------------------
...
AX1A  AX    ALLO  F2    LLIN  A     SHIF      0.500000      -9.00000       9.00000  400 
AY1A  AY    ALLO  F2    LSPO  A     SHIF      0.500000      -9.00000       9.00000  400 
AZ1A  AZ    ALLO  F2    LGAP  A     NB        0.500000      -9.00000       9.00000  400 
AN1A  ANOR  ALLO  F4    HDAS  A     NB        0.500000       9.00000       11.0000  420 
CS1A  CS    DISA  F1    LDAS  A     NB        0.500000       0.00000       150000.  000 
FX1A  FX    ALLO  F3    LLIN  A     NB        0.500000     -0.700000      0.700000  003 
FY1A  FY    ALLO  F3    LGAP  A     NB        0.500000     -0.700000      0.700000  003 
FZ1A  FZ    ALLO  F3    LSPO  A     NB        0.500000     -0.700000      0.700000  003 
FN1A  FNOR  ALLO  F4    LLIN  A     NB        0.500000      0.200000      0.700000  420 
FI1A  FINC  ALLO  F4    LGAP  A     NB         1.00000       0.00000       90.0000  420 
GA1A  GADZ  DISA  F1    LLIN  A     NB         1.00000      -1.00000       1.00000  020 
GP1A  GPV   DISA  F1    LGAP  A     NB         1.00000       14.0000       16.0000  020 
GN1A  GNV   DISA  F1    LDAS  A     NB         1.00000      -16.0000      -14.0000  020 
GM1A  GMT   DISA  F3    HDAS  A     SHIF       1.00000       80.0000       130.000  020 
GA2A  GAT   DISA  F2    HDAS  A     SHIF       1.00000       80.0000       130.000  020 
SI1A  SILO  DISA  FD    HLIN  A     NB         1.00000       0.00000       20.0000  000 
ST1A  STIT  DISA  FD    LLIN  A     NB         1.00000       0.00000       20.0000  000 
ST2A  STIA  ALLO  FD    LLIN  A     NB         1.00000       0.00000       20.0000  000 
TE1A  TENS  DISA  FD    LDAS  A     WRAP      0.500000       2000.00       7000.00  000 
...

TODO: What about CINT and FORM headings?

2011-05-27 Frequency Analysis done on:

$ python3 TableHistogram.py -k --name=FILM -l40 --col=DEST ../../../pLogicTestData/LIS/
Cmd: TableHistogram.py -k --name=FILM -l40 --col=DEST ../../../pLogicTestData/LIS/
2011-05-27 09:23:23,870 ERROR    Can not read LIS file ../../../pLogicTestData/LIS/13576.S1 with error: Can not fit integer number of frames length 120 into LR length 824, modulo 104 [indirect size 0].
2011-05-27 09:23:24,649 ERROR    Can not read LIS file ../../../pLogicTestData/LIS/13610.S1 with error: Can not fit integer number of frames length 7176 into LR length 13354, modulo 6178 [indirect size 0].
...

GCOD:

======================== Count of all table entries =======================
{
"(34, b'FILM', b'GCOD', b'BBB ')": 2,
"(34, b'FILM', b'GCOD', b'E1E ')": 5,
"(34, b'FILM', b'GCOD', b'E20 ')": 26,
"(34, b'FILM', b'GCOD', b'E2E ')": 40,
"(34, b'FILM', b'GCOD', b'E3E ')": 3,
"(34, b'FILM', b'GCOD', b'E40 ')": 2,
"(34, b'FILM', b'GCOD', b'E4E ')": 3,
"(34, b'FILM', b'GCOD', b'EB0 ')": 2,
"(34, b'FILM', b'GCOD', b'EEB ')": 22,
"(34, b'FILM', b'GCOD', b'EEE ')": 225,
"(34, b'FILM', b'GCOD', b'LLLL')": 1,
}
====================== Count of all table entries END =====================

GDEC:

======================== Count of all table entries =======================
{
"(34, b'FILM', b'GDEC', b'--- ')": 10,
"(34, b'FILM', b'GDEC', b'----')": 227,
"(34, b'FILM', b'GDEC', b'-1- ')": 2,
"(34, b'FILM', b'GDEC', b'-2- ')": 6,
"(34, b'FILM', b'GDEC', b'-2--')": 32,
"(34, b'FILM', b'GDEC', b'-3- ')": 3,
"(34, b'FILM', b'GDEC', b'-4- ')": 10,
"(34, b'FILM', b'GDEC', b'-4--')": 26,
"(34, b'FILM', b'GDEC', b'1111')": 1,
"(34, b'FILM', b'GDEC', b'EEE ')": 14,
}
====================== Count of all table entries END =====================

DEST:

======================== Count of all table entries =======================
{
"(34, b'FILM', b'DEST', b'NEIT')": 66,
"(34, b'FILM', b'DEST', b'PF1 ')": 124,
"(34, b'FILM', b'DEST', b'PF2 ')": 125,
"(34, b'FILM', b'DEST', b'PF5 ')": 1,
"(34, b'FILM', b'DEST', b'PF6 ')": 5,
"(34, b'FILM', b'DEST', b'PF8 ')": 1,
"(34, b'FILM', b'DEST', b'PFA ')": 1,
"(34, b'FILM', b'DEST', b'PFD ')": 2,
"(34, b'FILM', b'DEST', b'PFE ')": 3,
"(34, b'FILM', b'DEST', b'PFJ ')": 2,
"(34, b'FILM', b'DEST', b'PFK ')": 1,
}
====================== Count of all table entries END =====================

DSCA:

======================== Count of all table entries =======================
{
"(34, b'FILM', b'DSCA', b'D200')": 156,
"(34, b'FILM', b'DSCA', b'D500')": 17,
"(34, b'FILM', b'DSCA', b'DM  ')": 76,
"(34, b'FILM', b'DSCA', b'S5  ')": 82,
}
====================== Count of all table entries END =====================
exception TotalDepth.util.plot.FILMCfg.ExceptionFILMCfg

Specialisation of exception for this module.

exception TotalDepth.util.plot.FILMCfg.ExceptionPhysFilmCfg

Specialisation of exception for PhysFilmCfg.

exception TotalDepth.util.plot.FILMCfg.ExceptionFilmCfgLISRead

Specialisation of exception for FilmCfgLISRead in this module.

class TotalDepth.util.plot.FILMCfg.PhysFilmCfg(theName, theTracks, theDest, theX)

Contains the configuration equivalent to a single line in a FILM table.

theName is a hashable.

theTracks is a list of Track.Track objects.

theX is an integer scale.

__init__(theName, theTracks, theDest, theX)

Constructor. theName is a hashable. theTracks is a list of Track.Track objects. theX is an integer scale.

name

Name of the FILM.

xScale

The FILM X axis scale as a number.

__len__()

Number of Track.Track objects.

__getitem__(i)

Returns the Track.Track object at position i.

genTracks()

Generate all tracks.

interpretTrac(theTracStr)

Turns TRAC information into left/right positions as Cooord.Dim() objects and the number of half-tracks of the start and half-tracks covered. The later two values are used for stacking and packing the plot header and footer scales so that they take the minimum space.

e.g. b’T23 ‘ returns: (the left position of T2, right of T3, 4, 4).

e.g. b’T2 ‘ returns: (the left position of T2, right of T2, 4, 2).

Note: There is some fudging going on here

__weakref__

list of weak references to the object (if defined)

class TotalDepth.util.plot.FILMCfg.PhysFilmCfgLISRead(theRow)

Tracks from a LIS FILM table, essentially the pair of GCOD and GDEC defines the left-to-right layout of the plot.

Grid codes from analysis above: b’BBB ‘, b’E1E ‘, b’E20 ‘, b’E2E ‘, b’E3E ‘, b’E40 ‘, b’E4E ‘, b’EB0 ‘, b’EEB ‘, b’EEE ‘, b’LLLL’

The DSCA defines the top-to-bottom nature of the plot. DSCA codes from analysis above: b’D200’, b’D500’, b’DM ‘, b’S5 ‘

But we can guess some others...

DSCA_MAP = {b'D500': 500, b'S2 ': 600, b'S5 ': 240, b'D20 ': 20, b'D240 ': 240, b'D40 ': 40, b'D200': 200, b'DM ': 1000}

X axis scale from a LIS FILM table DSCA codes from analysis above: b’D200’, b’D500’, b’DM ‘, b’S5 ‘ But we can guess some others...

__init__(theRow)

Reads a LogiRec.TableRow object and populates a CurveCfg.

Example:

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
1     E20   -4--  PF1   D200
supportedFilmTracks()

A list of supported film (name, decade) pairs.

class TotalDepth.util.plot.FILMCfg.FilmCfg

Contains the configuration equivalent to a complete FILM table.

add(k, thePfc)

Add a PhysFilmCfg object to the map with key k, typically a FILM mnemonic in bytes such as Mnem.Mnem(b‘1 ‘) or some other ID such as a string, the filename of an XML file.

keys()

All FILM Mnemonics.

__len__()

Number of unique film destination names.

__getitem__(name)

Returns the PhysFilmCfg object corresponding to name - a Mnem() object. Will raise KeyError if not exact match. See retFilmDest() for an API that can handle curve destinations of BOTH, ALL etc.

__contains__(name)

Membership test.

retAllFILMDestS(curveDestID)

Returns an unordered list of FILM destinations for a curve destination. For example if curveDestID is b’BOTH’ this might return [b‘2 ‘, b‘1 ‘]

retFILMDest(filmDestID, curveDestID)

Returns a PhysFilmCfg object by matching curveDestID to the filmDestID. Returns None on failure. For LIS curveDestID can be 1, BOTH, ALL, NEIT etc. This is commonly used by the PRESCfg module so that interpretTrac() can be called on the result and thus build up a map of track positions for all possible logical film outputs.

interpretTrac(filmDestID, curveDestID, trackStr)

Given a film destination ID and a curve destination (which could be b’ALL’) and a track string (e.g. b’T23’) this returns the left/right positions as Cooord.Dim() objects and the number of half-tracks of the start and half-tracks covered (used for plot header and footer scales). Returns None if there is no match for the filmDestID/curveDestID (for example if curveDestID is b’NEIT’). e.g. (b‘1 ‘, b’BOTH’, b’T23 ‘) returns: (the left position of T2, right of T3, 4, 4).

__weakref__

list of weak references to the object (if defined)

class TotalDepth.util.plot.FILMCfg.FilmCfgLISRead(theLr)

Interprets a FILM table from a LIS Logical Record.

__init__(theLr)

Reads a LogiRec.Table object and creates a PhysFilmCfgLISRead for each row.

Typical FILM table:

MNEM  GCOD  GDEC  DEST  DSCA
-----------------------------
1     E20   -4--  PF1   D200
2     EEE   ----  PF2   D200
retAllFILMDestS(curveDestID)

Returns an unordered list of FILM destinations for a curve destination.

For example if curveDestID is b’BOTH’ this might return [b‘2 ‘, b‘1 ‘]

retFILMDest(filmDestID, curveDestID)

Returns a PhysFilmCfg object by matching curveDestID to the filmDestID. Returns None on failure. curveDestID can be 1, BOTH, ALL, NEIT etc.

This is commonly used by the PRESCfg module so that interpretTrac() can be called on the result and thus build up a map of track positions for all possible logical film outputs.

Previous topic

AREA Plotting Configuration

Next topic

FILM Plotting Configuration from XML files

This Page