Basic objects

A striplog depends on a hierarchy of objects. This notebook shows the objects and their basic functionality.

  • Lexicon: A dictionary containing the words and word categories to use for rock descriptions.
  • Component: A set of attributes.
  • Interval: One element from a Striplog — consists of a top, base, a description, one or more Components, and a source.

Striplogs (a set of Intervals) are described in a separate notebook.

Decors and Legends are also described in another notebook.


In [10]:
import striplog
striplog.__version__


Out[10]:
'0.5.6'

Lexicon


In [11]:
from striplog import Lexicon
print(Lexicon.__doc__)


    A Lexicon is a dictionary of 'types' and regex patterns.

    Most commonly you will just load the default one.

    Args:
        params (dict): The dictionary to use. For an example, refer to the
            default lexicon in ``defaults.py``.
    

In [12]:
lexicon = Lexicon.default()
lexicon


Out[12]:
{'lithology': ['overburden', 'sandstone', 'siltstone', 'shale', 'mudstone', 'limestone', 'dolomite', 'salt', 'halite', 'anhydrite', 'gypsum', 'sylvite', 'clay', 'mud', 'silt', 'sand', 'gravel', 'boulders'], 'grainsize': ['vf(?:-)?', 'f(?:-)?', 'm(?:-)?', 'c(?:-)?', 'vc', 'very fine(?: to)?', 'fine(?: to)?', 'medium(?: to)?', 'coarse(?: to)?', 'very coarse', 'v fine(?: to)?', 'med(?: to)?', 'med.(?: to)?', 'v coarse', 'grains?', 'granules?', 'pebbles?', 'cobbles?', 'boulders?'], 'colour': ['red(?:dish)?', 'gray(?:ish)?', 'grey(?:ish)?', 'black(?:ish)?', 'whit(?:e|ish)', 'blu(?:e|ish)', 'purpl(?:e|ish)', 'yellow(?:ish)?', 'green(?:ish)?', 'brown(?:ish)?', 'light', 'dark', 'sandy'], 'abbreviations': {'Rpl': 'ripple', 'ox': 'oxidized', 'Macrofos': 'macrofossil', 'or': 'orangish', 'op': 'open', 'mrl': 'marly', 'Peld': 'pelletoid', 'hornbd': 'hornblend', 'Deer': 'decrease', 'euhed': 'euhedral', 'oo': 'ooidal', 'mtx': 'matrix', 'prly': 'pearly', 'magn': 'magnetic', 'Scs': 'scarce', 'sa-c': 'salt castic', 'gil': 'gilsonite', 'Repl': 'replaced', 'deer': 'decreasing', 'min': 'mineralized', 'mic': 'micro', 'r': 'rare', 's&p': 'salt & pepper', 'sat': 'saturated', 'ptg': 'parting', 'Lut': 'lutite', 'contm': 'contaminated', 'fl': 'filled', 'pres': 'preservation', 'apr': 'apparent', 'bcm': 'becoming', 'app': 'appear', 'Brk': 'break', 'V.op': 'valve open', 'apprx': 'approximate', 'pk': 'pink', 'FDL': 'formation density log', 'PPM': 'parts per million', 'GAP': 'good air blow', 'pred': 'predominantly', 'OC': 'oil cut', 'O&SW': 'oil and salt water', 'Tent': 'tentaculites*', 'flky': 'flaky', 'aph': 'aphanitic', 'thk': 'thick', 'dist': 'distillate', 'DLL': 'dual laterolog', 'ireg': 'irregular', 'zeo': 'zeolite', 'fen': 'fenestraal', 'Len': 'lens', 'bioh': 'biohermal', 'Frg': 'fringe', 'biot': 'biotite', 'intrlam': 'interlaminated', 'dism': 'disseminated', 'Stach': 'stachyodes*', 'fluor': 'fluoresceincent', 'Ren': 'renalcis*', 'OCM': 'oil cut mud', 'lrg': 'larger', 'sil': 'siliceous', 'med.': 'medium', 'Bry': 'bryozoa', 'Tub': 'tube', 'abt': 'about', 'Oyst': 'oyster', 'abv': 'above', 'sid': 'sideritic', 'Nod': 'nodules', 'Rec': 'recovery', 'rf': 'reefoid', 'abs': 'absent', 'BHSIP': 'bottom hole shut in pressure', 'TSTM': 'too small to measure', 'fnt': 'faintly', 'abd': 'abundant', 't.s.': 'thin section', 'rr': 'rare', 'pap': 'papery', 'Res': 'residue', 'Elev': 'elevation', 'imp': 'impression', 'rad': 'radiating', 'syn': 'syntaxial', 'hkl': 'hackly', 'xln': 'crystalline', 'm': 'medium', 'elg': 'elongate', 'chit': 'chitinous', 'SO&W': 'show of oil and water', 'poly': 'polygonal', 'intrapar': 'intraparticle', 'Wkst': 'wackestone', 'Contam': 'contamination', 'SNP': 'sidewall neutron porosity log', 'od': 'odor', 'phr': 'phreatic', 'brn': 'brown', 'Musc': 'muscovite', 'spr': 'sparry', 'sps': 'sparsly', 'rng': 'range', 'purp': 'purple', 'IP': 'initial production', 'detr': 'detrital', 'fibr': 'fibrous', 'prom': 'prominently', 'Rbl': 'rubble', 'spl': 'sample', 'Spfool': 'superficial olite', 'sph': 'spherules', 'WAB': 'weak air blow', 'Rk': 'rock', 'psdo': 'pseudo', 'bd': 'bed', 'AOF': 'absolute open flow', 'Rf': 'reef', 'Calc': 'calcite', 'In': 'inch', 'xbdg': 'cross-bedding', 'srtg': 'Sorteding', 'Ig': 'igneous rock', 'Spic': 'spicule', 'spher': 'spherulitic', 'Min': 'mineral', 'mnr': 'minor', 'Mid': 'middle', 'Mic': 'micaceous', 'Microspr': 'microspar', 'contam': 'contaminated', 'Alg': 'algal', 'Evap': 'evapourite', 'cl': 'clastic', 'gvl': 'gravel', 'LL': 'laterolog', 'Ls': 'limestone', 'Vnlet': 'veinlet', 'med': 'medium', 'intcl': 'intraclasts', 'men': 'meniscus', 'cren': 'crenulated', 'Hal': 'halitiferous', 'Uc': 'underclay', 'chty': 'cherty', 'thn': 'thin', 'Fspr': 'feldspar', 'Microol': 'micro-oolite', 'oom': 'oomoldic', 'Moll': 'mollusc', 'xbd': 'cross-bedded', 'bor': 'boreding', 'rndd': 'rounded', 'Intr': 'intrusive', 'S': 'sonic, acoustilog', 'blsh': 'bluish', 'boudg': 'boudinage', 'SGCW': 'slight gas cut water', 'Jasp': 'jasper', 'ctc': 'contact', 'ctd': 'coated', 'Port por': 'porosity', 'Assem': 'Assem', 'SO&G': 'show of oil and gas', 'fis': 'fissile', 'ex': 'excellent', 'rec': 'recovered', 'olv': 'olive', 'n.v.p.': 'no visible porosity', 'pyrcl': 'pyroclastic', 'SI': 'shut in', 'aprox': 'approximately', 'fib': 'fibrous', 'Satm sat': 'saturation', 'sft': 'soft', 'W.R.': 'washed residue', 'dru': 'drusy', 'volc': 'volcanics', 'Stylio': 'styliolina*', 'mat': 'material, matter', 'Gr': 'grains', 'Gyp': 'gypsumiferous', 'aft': 'after', 'Rad': 'radial', 'Gt': 'grit', 'Grap': 'graptolite', 'micgr': 'micrograined', 'pel': 'pellet', 'x-strat': 'cross-stratified', 'Wtr': 'water', 'sml': 'small', 'frg': 'fringing', 'lchd': 'leached', 'pet': 'petroleumiferous', 'Clslt': 'calcisiltite', 'fri': 'friable', 'devit': 'devitrified', 'vert': 'vertical', 'Clcsp': 'calcisphere', 'C': 'coal', 'Clus': 'cluster', 'qtz': 'quartz', 'GR': 'gamma ray', 'bas': 'basaltic', 'vug': 'vugular', 'stn': 'staining', 'hor': 'horizontal', 'Allo': 'allochem', 'Clcrd': 'calcirudite', 'litt': 'littoral', 's': 'small', 'aglm': 'agglomerate', 'Clst': 'claystone', 'lith': 'lithographic', 'intclas': 'intraclastic', 'Piso': 'pisoid', 'rmn': 'remainant', 'str': 'streak', 'GTS': 'gas to surface', 'OWWO': 'old well worked over', 'PL': 'proximity log', 'c': 'coarsely', 'GL': 'guard log', 'Dist': 'distillate', 'ls': 'limestone', 'grdg': 'grading', 'Clclt': 'calcilutite', 'lt': 'lighter', 'cmt': 'cemented', 'up': 'upper', 'slily': 'slightly', 'fenst': 'fenestral', 'Bioh': 'bioherm', 'brec': 'brecciated', 'gen': 'generally', 'Biot': 'biotite', 'sltst': 'siltstone', 'lg': 'long', 'Arag': 'aragonite', 'suc': 'sucrosic', 'Dol': 'dolomite', 'Girv': 'girvanella*', 'dtrl': 'detritalus', 'crm': 'cream', 'glos': 'glossy', 'Casph': 'calcisphaera*', 'wthrd': 'weathered', 'Mrl': 'marl', 'Oomol': 'oomold', 'Plag': 'plagioclase', 'Pybit': 'pyrobitumen', 'Fluor': 'fluoresceince', 'Iran': 'granule', 'Cub': 'cube', 'Bnd': 'band', 'G&OCM': 'gas and oil cut mud', 'Mat': 'material', 'cht': 'chert', 'dess': 'dessiccation', 'w/': 'with', 'elong': 'elongate', 'embd': 'embedded', 'rsns': 'resinous', 'Glauc': 'glauconite', 'chlor': 'chlorite', 'stal': 'stalactitic', 'chk': 'chalky', 'depau': 'depauperate', 'Perm': 'permeability', 'cotg': 'coateding', 'BHT': 'bottom hole temperature', 'BHP': 'bottom hole pressure', 'Rhb': 'rhomb', 'v': 'very', 'altg': 'alternating', 'qtzc': 'quartzitic', 'mrly': 'marly', 'len': 'lentilcular', 'fr': 'fair', 'choc': 'chocolate', 'p.d': 'pressure deformation', 'f': 'finely', 's & p': 'salt and pepper', 'Foram': 'foraminifera', 'kao': 'kaolin', 'MCFG': 'thousand cubic feet of gas', 'wg': 'vuggy', 'wk': 'weak', 'bent': 'bentonitic', 'wi': 'with', 'hom': 'homogeneous', 'Fen': 'fenestra', 'brt': 'bright', 'brk': 'brackish', 'bri': 'bright', 'splty': 'splintery', 'cntrt': 'contorted', 'uncons.': 'unconsolidated', 'conspic': 'conspicuous', 'Tas': 'tasmanites*', 'brd': 'bored', 'Intvl': 'interval', 'Scaph': 'scaphopod', 'musc': 'muscovite', 'Crin': 'crinoidal', 'deb': 'debris', 'yel': 'yellow', 'exp': 'exposed', 'crpxln': 'crystocrystalline', 'Var': 'variation', 'WCM': 'water cut mud', 'Para': 'paraparchites*', 'ti': 'tight', 'Phos': 'phosphate', 'des': 'descript', 'aren': 'arenaceous', 'Vad': 'vadose', '&': 'and', 'biost': 'biostromal', 'Pelec': 'pelecypod', 'amm': 'ammonite', 'bld': 'bladed', 'magnt': 'magnetite', 'Bas': 'basalt', 'blk': 'black', 'Gns': 'gneiss', 'calc': 'calcitareous', 'Su': 'sulphur', 'Cl': 'clay', 'Phyl': 'phyllite', 'cche': 'caliche', 'sept': 'septate', 'dend': 'dendritic', 'mag': 'magnetic', 'zn': 'zone', 'calctc': 'calcitic', 'pkish': 'pinkish', 'FIt': 'fault', 'x-bd': 'cross-bedded', 'Novac': 'novaculite', 'Spr': 'spore', 'Gil': 'gilsonite', 'hetr': 'heterogeneous', 'DIL': 'dual induction laterolog', 'Poln': 'pollen', 'OWDD': 'oil well drilled deeper', 'CN': 'compensated neutron', 'Spg': 'sponge', 'intpt': 'interpretation', 'Spl': 'sampole', 'Oo': 'ooid', 'psool': 'pseudo oolitic', 'IAB': 'initial air blow', 'Spk': 'speck', 'bioturb': 'bioturbated', 'GOR': 'gas-to-oil ratio', 'Dia': 'diameter', 'intxln': 'intercrystalline', 'Shlt por': 'shelter porosity', 'WIP': 'weak initial puff', 'fol': 'foliated', 'lse': 'loose', 'chal': 'chalcedony', 'fos': 'fossiliferous', 'shy': 'shaly', 'mnut': 'minute', 'hi': 'high', 'Bent': 'bentonite', 'amb': 'amber', 'imbd': 'imbedded', 'Tham': 'thamnopora*', 'nac': 'nacerous', 'Zr': 'zircon', 'Ctgs': 'cuttings', 'Strk': 'streak', 'MMCFG': 'million cubic feet of gas', 'freq': 'frequent', 't.b.': 'thin-bedded', 'rexlzd': 'recrystallized', 'Clvg': 'cleavage', 'Pst': 'pumice-stone', 'perf': 'perforated', 'Gran': 'granule', 'fnly': 'finly', 'perm': 'permeability', 'DL': 'density log', 'pbl': 'pebble (4-64 mm)', 'Zn': 'zone', 'SIP': 'shut in pressure', 'slky': 'silky', 'clr': 'clear', 'wthd': 'weathered', 'tr': 'trace', 'cly': 'clayey', 'microxln': 'microcrystalline', 'sim': 'similar', 'tt': 'tightly', 'stmg': 'streaming', 'Inoc': 'inoceramus*', 'tn': 'tan', 'Shw': 'show', 'vrvd': 'varved', 'Chara': 'charophytes', 'sphal': 'sphalerite', 'cln': 'clean', 'Bubl': 'bubble', 'Kao': 'kaolin', 'pisol': 'pisolitic', 'Biost': 'biostrom', 'org': 'organic', 'lav': 'lavender', 'Bot': 'botryoid', 'Scol': 'scolecodonts', 'Bor': 'bored', 'cp': 'compare', 'l': 'lower', 'lac': 'lacustrine', 'ck': 'choke', 'asph': 'asphaltic', 'Ctc': 'contact', 'lam': 'laminated', 'wvy': 'wavy', 'Fvst': 'favosites*', 'OWPB': 'oil well plugged back', 'Intst': 'intersticies', 'grnt': 'granite', 'SOCM': 'slight oil cut mud', 'rdsh': 'redish', 'plag': 'plagioclase', 'rd': 'rounded', 'Lyr': 'layer', 'Orth': 'orthoclase', 'Exv': 'extrusive rock', 'intercal': 'intercalated', 'skel': 'skeletal', 'mass': 'massive', 'Euryamph': 'euryamphipora*', 'Syring': 'syringopora*', 'Fus': 'fusulinid', 'pris': 'prismatic', 'piso': 'pisolitic', 'Microstyl': 'microstylolite', 'plas': 'plastic', 'grnl': 'granule (2-4 mm)', 'Sil': 'silica', 'intbd': 'interbedded', 'marn': 'marine', 'rhmb': 'rhombic', 'Tr': 'trace', 'biocl': 'bioclastic', 'mrlst': 'marlstone', 'fac': 'faceted', 'cb': 'carbonized', 'vit': 'vitreous', 'brhg': 'branching', 'vis': 'visible', 'thru': 'throughout', 'crbnt': 'carbonate', 'fau': 'fauna', 'Tf': 'tuffaceous', 'mdy': 'muddy', 'Qtz': 'quartz', '(D)': 'development', 'bulb': 'bulbous', 'fros': 'frosted', 'mnrl': 'mineralized', 'W': 'west', 'sm': 'smooth', 'ang': 'angular', 'Asph': 'assemblage', 'anhy': 'anhydritic', 'rexl': 'recrystallization', 'incl': 'inclusion', 'Qtzt': 'quartzite', 'Str': 'structure', 'cpct': 'compact', 'ig': 'igneous', 'ferr': 'ferruginous', 'o': 'oil', 'Fm': 'formation', 'tuf': 'tuffaceous', 'Ivan': 'ivanovia*', 'drlg': 'drilling', 'tub': 'tubular', 'Cmt': 'cement', 'Fe': 'iron-ferruginous', 'w': 'well', 'undly': 'underlying', 'flor': 'fluorescence', 'grd': 'graded', 'drlr': 'driller', 'prim': 'primary', 'cbl': 'cobble (64-256 mm)', 'gry': 'greyish', 'Glas': 'glass', 'bot': 'botryoidal', 'Ft': 'foot', 'frmwk': 'framework', 'Fp': 'flowing pressure', 'res': 'residuual', 'rep': 'replacedment', 'sed': 'sedimentary', 'peld': 'pelletoidal', 'slb': 'slabby', 'Splin': 'splintery', 'MCW': 'mud cut water', 'clas': 'clastic', 'sli': 'slightly', 'sln': 'solution', 'sblit': 'sublithic', 'F.Q.G.': 'frosted quartz  grains', 'Ech': 'echinoid', 'sy-Ca': 'sparry calcite', 'cntr': 'centered', 'MCO': 'mud cut oil', 'Pbl': 'pebble', 'metaph': 'metamorphosed', 'O str': 'Ostracod', 'clus': 'cluster', 'O-Qtz': 'orthoquartzite', 'micr': 'micritic', 'loc': 'location', 'Meta': 'metamorphic rock', 'bdeye': 'birdseye', 'u': 'upper', 'Mdst': 'mudstone', 'indst': 'indistinct', 'wtr': 'water', 'Amph': 'amphipora*', 'rbl': 'rubblbly', 'carb': 'carbonaceous', 'n.s.': 'no sample', 'Aglm': 'agglomerate', 'amor': 'amorphous', 'fld': 'feldsparthic', 'flg': 'flaggy', 'lent': 'lenticular', 'pl': 'plant', 'gyp': 'gypsumiferous', 'Brac': 'brachiopod', 'Circ': 'circulate', 'flk': 'flake', 'gns': 'gneiss', 'flt': 'faulted', 'pt': 'partly', 'ps': 'pseudo-', 'fls': 'flesh', 'pyrbit': 'pyrobitumen', 'Solen': 'solenopora*', 'Hem': 'hematite', 'sks': 'slickensided', 'hem': 'hematitic', 'DST': 'drill stem test', 'Gab': 'gabbro', 'SOCW': 'slight oil cut water', 'intgwn': 'intergrown', 'Col': 'color', 'LSD': 'legal subdivision', 'hex': 'hexagonal', 'irr': 'irregular', 'Belm': 'belemnites*', 'sbang': 'subangular', 'pch': 'patchy', 'PD': 'per day', 'PB': 'plugged back', 'lim': 'itic', 'Deb': 'debris', 'num': 'numerous', 'conch': 'conchoidal', 'srt': 'sorting', 'lmy': 'limy', 'PH': 'per hour', 'fuc': 'fucoidal', 'sacc': 'saccharoidal', 'Biosp': 'biosparite', 'incr': 'increasing', 'plty': 'platy', 'lmn': 'limonitic', 'OSR': 'oil source rock', 'Unconf': 'unconformity', 'assoc': 'associated', 'I.P.': 'in part', 'Pyr': 'pyrite', 'HO': 'heavy oil', '₵': 'core', 'IES': 'induction electric', 'sug': 'sugary', 'Typ': 'type', 'Pt': 'part', 'orth': 'orthoclase', 'SSO': 'slight show of oil', 'Gal': 'galeolaria*', 'intfrag': 'interfragmental', 'Tp': 'top', 'Sid': 'siderite', 'strk': 'streaked', 'Spo': 'spore', 'stri': 'striated', 'Pend': 'pendularous', 'strg': 'stringer', 'irid': 'iridescent', '(W)': 'wildcat', 'FAB': 'fair air blow', 'gran': 'granular', 'Intclas': 'intraclast', 'Pent': 'pentamerus*', 'grad': 'grading', 'strat': 'strataified', 'SAB': 'strong air blow', 'Shl': 'shell', 'Lstr': 'lustre', 'brit': 'brittle', 'ark': 'arkosic', 'dd': 'dead', 'bur': 'burrowed', 'shad': 'shadow', 'arg': 'argillaceous', 'mky': 'milky', 'grapst': 'grapestone', 'Mol': 'mollusca', 'bdd': 'bedded', 'bdg': 'bedding', 'Hyde': 'hydrocarbon', 'Cav': 'cavernous', 'rnd': 'rounded', 'swbd': 'swabbed', 'cvg': 'cavings', 'crnk': 'crinkled', 'sch': 'schist', 'ss': 'sandstone', 'T.D.': 'total depth', 'BHFP': 'bottom hole flow pressure', 'dkr': 'darker', 'Cal': 'caliper', 'Bd': 'bed', 'Ltl': 'little', 'styl': 'stylotitic', 'Spher': 'spherule', 'ool': 'oolitic', 'GCW': 'gas cut water', 'GIP': 'good initial puff', 'Rem': 'remains', 'onc': 'oncolites', 'Cht': 'chert', 'mar': 'maroon', 'Surf': 'surface', 'Sst': 'sandstone', 'BW': 'barrels of water', 'clyst': 'claystone', 'Anhy': 'anhydrite', 'Chk': 'chalk', 'GCM': 'gas cut mud', 'Bur': 'burrow', 'Bm': 'basement', 'Stn': 'stain', 'Lat': 'laterite', 'volat': 'volatile', 'sol': 'solitary', 'Ooc': 'oolicast', 'Chit': 'chitinous', 'intr': 'intrusionive', 'Micropor': 'micropore', 'Styl': 'stylolite', 'tstg': 'testing', '@': 'at', 'Pch': 'patch', 'vcol': 'varicolored', 'chky': 'chalky', 'cncn': 'concentric', 'prphy': 'porphyry', 'Ptg': 'parting', 'Prod': 'production', 'RT': 'rotary table', 'p': 'poorly', 'intxl': 'intercrystalline', 'lig': 'lignitic', 'consol': 'consolidated', 'grnt.w': 'granite wash', 'gept': 'geopetal', 'lit': 'lithic', 'uni': 'uniform', 'Slst': 'siltstone', 'eux': 'euxinic', 'cov': 'covered', 'coq': 'coquina', 'KB': 'kelly bushing', 'rhb': 'rhombic', 'Plcy': 'palecypod', 'Fac': 'facet', 'Ool': 'oolite', 'Stri': 'striae', 'Invtb': 'invertebrate', 'qtzt': 'quartzite', 'com': 'common', 'col': 'colored', 'orsh': 'orangish', 'Fau': 'fauna', 'ahd': 'anhedral', 'Vn': 'vein', 'intst': 'intersticitial', 'crpxl': 'cryptocrystalline', 'Bld': 'boulder', 'olvn': 'olivine', 'lmpy': 'lumpy', 'tab': 'tabular', 'Tex': 'texture', 'bu': 'buff', 'intgn': 'inter grown', 'uncons': 'unconsolidated', 'tgh': 'tough', 'bl': 'bluish', 'qtzs': 'quartzose', 'bo': 'bophaceous', 'Rud': 'rudist', 'Microfos': 'microfossilferous', 'hd': 'hard', 'bf': 'buff', 'vi': 'violet', 'ves': 'vesicular', 'ea': 'earthy', 'sbrndd': 'sub rounded', 'csg': 'casing', 'extr': 'extremely', 'Cbl': 'cobble', 'blky': 'blocky', 'ptch': 'patches', 'Sel': 'selenite', 'Psool': 'pseudo oolite', 'psi': 'pounds per square inch', 'Grv': 'gravel', 'G': 'gas', 'Grt': 'granite', 'Chtz': 'chitinozoa', 'BOPH': 'barrels of oil per hour', 'dns': 'denser', 'hvy': 'heavy', 'och': 'ochre', 'Wd': 'wood', 'Foss': 'fossiliferous', 'BOPD': 'barrels of oil per day', 'occ': 'occasional', 'Wl': 'well', 'Micr': 'micrite', 'Slt': 'silt', 'k': 'permeabilityable', 'Slick slick': 'slickenside', 'Gwke': 'graywacke', 'repl': 'replacement', 'Exclas': 'extraclast', 'Mbr': 'member', 'wh': 'white', 'Onc': 'oncolite', 'Sphaer': 'sphaerocodium*', 'Pkst': 'packstone', 'BO': 'barrels of oil', 'bit': 'bitumeninous', 'dissem': 'disseminated', 'scat': 'scattered', 'Smwt': 'somewhat', 'authg': 'authigenic', 'amt': 'amount', 'ES': 'electric', 'Strat': 'strata', 'Mbl': 'marble', 'BWPD': 'barrels of water per day', 'sdy': 'sandy', 'coln': 'colonial', 'Ceph': 'cephalopod', 'resd': 'residual', 'MLL': 'microlaterolog', 'glau': 'glauconitic', 'gty': 'gravity', 'BWPH': 'barrels of water per hour', 'frac': 'fractured', 'dolst': 'dolostone', 'frag': 'fragmental', 'xlam': 'cross-laminated', 'intpar': 'interparticle', 'glas': 'glassy', 'Av': 'average', 'Imp': 'impression', 'gnsh': 'greenish', 'Phlog': 'phloaopite', 'FTAB': 'faint air blow', 'oomol': 'oomoldic', 'Pisol': 'pisolite', 'N': 'Neutron', 'fl/': 'flowing', 'S.W.C.': 'sidewall core', 'Het': 'Heterostegina', 'gr': 'grained', 'gywk': 'graywacke', 'mas': 'massive', 'gt': 'gritty', 'struc': 'structure', 'gy': 'gray', 'max': 'maximum', 'Fe-mag': 'ferro-magnesian', 'Fuc': 'fucoid', 'ga': 'gauged', 'n': 'no, none, non', 'Agg': 'aggregate', 'coqid': 'coquinaoid', 'gd': 'good', 'decr': 'decreasing', 'Equiv': 'equivalent', 'pkr': 'packer', 'gn': 'green', 'gl': 'glassy', 'Xl': 'crystal', 'r.f.p': 'rounded frosted pitted', 'meta': 'metamorphic', 'Pol': 'polish', 'sel': 'selenite', 'crpld': 'crumpled', 'sec': 'secondary', 'intlam': 'interlaminated', 'cotd gn': 'coated grains', 'Frac': 'fracture', 'bldr': 'boulder', 'Frag': 'fragment', 'g': 'good', 'foram': 'foraminiferal', 'x-lam': 'cross-laminated', 'intgran': 'intergranular', 'Diagn': 'diagenesis', 'phen': 'phenocrysts', 'varic': 'varicolored', 'conc': 'concretionary', 'spec': 'speckled', 'Brach': 'brachiopod', 'G.W.': 'granite wash', 'n/s': 'no show', 'Pap': 'paper', 'Par': 'particle', 'cons': 'considerable', 'SO': 'show of oil', 'Vug': 'vug', 'pyr': 'pyritized', 'Ark': 'arkose', 'diagn': 'diagenesisetic', 'exv': 'extrusive', 'frs': 'fresh', 'surf': 'surface', 'sqz': 'squeezed', 'typ': 'typical', 'mot': 'mottled', 'venn': 'vermillon', 'SW': 'salt water', 'O&G': 'oil and gas', 'trnsp': 'transparent', 'Bdg': 'bedding', 'SP': 'spontaneous potential', 'yelsh': 'ish', 'Sl': 'slate', 'brak': 'brackish', 'Cvg': 'caving', 'Grst': 'grainstone', 'Sh': 'shale', 'LL8': 'laterolog-8', 'Mtrx': 'matrix', 'Sd': 'sand', 'nod': 'nodule', 'circ': 'circulation', 'Sa': 'salt', 'Lam': 'laminations', 'wxy': 'waxy', 'unident': 'unidentifiable', 'Jt': 'joint', 'ab': 'above', 'acic': 'acicular', 'E': 'east', 'lithgr': 'lithographic', 'p-p': 'pin point', 'est': 'estimated', 'p.p.': 'pin-poin', 'prob': 'probably', 'wtr cush': 'water cushion', 'Cgl': 'conglomerate', 'Anthr': 'anthracite', 'Ost': 'ostracod', 'porcel': 'porcelaneous', 'Stromlt': 'stromatolite', 'msm': 'metasomatic', 'Fe-st': 'ironstone', 'orng': 'orange', 'intstl': 'interstitial', 'Schm': 'schist', 'cgl': 'conglomerate', 'Cyp': 'cypridopsis*', 'xl': 'crystalline', 'Glob': 'globigerina*', 'Clcar': 'calcarenite', 'w/o': 'without w/o', 'gsy': 'grasy', 'Flo': 'flora', 'rthy': 'earthy', 'Milid': 'miliolid', 'lge': 'large', 'Flk': 'flake', 'Db': 'diabase', 'eqnt': 'equant', 'hrtl': 'horizontal', 'strgr': 'stringer', 'Incl': 'inclusion', 'slt': 'silt', 'pit': 'pitted', 'vgt': 'varigated', 'SGCM': 'slight gas cut mud', 'trnsl': 'translucent', 'DI': 'dual induction log', 'Lim': 'limonite', 'cotd': 'coateding', 'D & A': 'dry and abandoned', 'DF': 'derrick floor', 'Lig': 'lignite', 'mott': 'mottled', 'Lith': 'lithology', 'Mag': 'magnetite', 'blksh': 'blackish', 'phos': 'phosphatic', 'cub': 'cubic', 'bnd': 'banded', 'Coq': 'coquina', 'recem': 'recemented', 'alt': 'altering', 'Cor': 'coral', 'BHCS': 'bore hole compensated sonic', 'spkld': 'speckled', 'Bdst': 'boundstone', 'Char': 'charophyte', 'pol': 'polished', 'crs': 'coarse', 'Brec': 'breccia', 'pos': 'possibility', 'Chal': 'chalcedony', 'alg': 'algal', "'' or do": 'ditto', 'Gast': 'gastropod', 'Glos': 'gloss', 'lstr': 'lustre', 'mica': 'micaeous', 'sl': 'slightly', 'grysh': 'greyish', 'comp': 'completion', 'sh': 'shale', 'sd': 'sand (1/16-2 mm)', 'sc': 'scales', 'sb': 'sub', 'sa': 'salt', 'Plt': 'plant', 'S.W.': 'salt water', 'Orbit': 'Orbitolina', 'fspr': 'feldsparathic', 'jt': 'jointing', 'sz': 'size', 'su': 'sulphurous', 'spsly': 'sparsly', 'sp': 'spotty', 'ovgth': 'overgrowth', 'hydc': 'hydrocarbon', 'drsy': 'drusy', 'Pel': 'pellet', 'OFM': 'oil flecked mud', 'Pet': 'petroleum', 'crinal': 'crinoidal', 'vps': 'very poor samples', 'stromlt': 'stromatolite', 'phyl': 'phyllitic', 'V.P.S.': 'very poor sample V.P.S.', 'ter': 'terriginous', 'intv': 'interval', 'Endo': 'endothyra*', 'tex': 'texture', 'argl': 'argillate', 'vn': 'vein', 'md': 'muddy', 'vrtb': 'vertebrate', 'vrtl': 'vertical', 'rug': 'rugosa', 'Strom': 'stromatoporoid', 'x': 'cross', 'insl': 'insoluble', 'Chaet': 'chaetetes*', 'Tril': 'trilobite', 'Bit': 'bitumen', 'spic': 'spicular', 'Trip': 'tripoli', 'tns': 'tension', 'fltg': 'floating', 'evap': 'evapourititic', 'micropor': 'microporosity', 'slty': 'silty', 'ind': 'indurated', 'Sedm': 'sediment', 'OTD': 'old total depth', 'dk': 'darker', 'Cono': 'conodont', 'mos': 'mosaic', 'euhd': 'euhedral', 'exclas': 'extraclastic', 'sptd': 'spottedy', 'crd': 'cored', 'corln': 'coralline', 'Bdeye': 'birdseye', 'ooc': 'oocastic', 'Pyrxn': 'pyroxene', 'Conc': 'concretion', 'mod': 'moderate', 'spty': 'spottedy', 'OTS': 'oil to surface', 'Cont': 'content', 'Btm': 'bottom', 'Volc': 'volcanic', 'mol': 'moldic', 'ML': 'microlog, minilog', 'ap': 'appears', 'bar': 'baritic', 'Biomi': 'biomicrite', 'abnt': 'abundant', 'anhed': 'anhedral', 'trip': 'tripolic', 'Sol': 'Soution', 'Descr': 'description', 'var': 'variable', 'por': 'poroussity', '/': 'with', 'posa': 'possible', 'a.a.': 'same as above sample', 'Chlor': 'chlorite', 'Radax': 'radiaxial', 'dol': 'dolomitic', 'dom': 'dominant', 'Sphal': 'sphalerite', 'Mn': 'manganese'}, 'parts_of_speech': {'noun': ['lithology'], 'adjective': ['colour', 'grainsize'], 'subordinate': ['amount']}, 'synonyms': {'Salt': ['Halite', 'Sylvite'], 'Anhydrite': ['Gypsum'], 'Overburden': ['Drift']}, 'amount': ['streaks?', 'veins?', 'stringers?', 'interbed(?:s|ded)?', 'blotch(?:es)?', 'bands?', 'fragments?', 'impurit(?:y|ies)', 'minor', 'some', 'abundant', 'rare', 'flakes?', '[-\\.\\d]+%']}

In [13]:
lexicon.synonyms


Out[13]:
{'Anhydrite': ['Gypsum'],
 'Overburden': ['Drift'],
 'Salt': ['Halite', 'Sylvite']}

Most of the lexicon works 'behind the scenes' when processing descriptions into Rock components.


In [14]:
lexicon.find_synonym('Halite')


Out[14]:
'salt'

In [15]:
s = "grysh gn ss w/ sp gy sh"
lexicon.expand_abbreviations(s)


Out[15]:
'greyish green sandstone with spotty gray shale'

Component

A set of attributes. All are optional.


In [16]:
from striplog import Component

In [17]:
print(Component.__doc__)


    Initialize with a dictionary of properties. You can use any
    properties you want e.g.:

        - lithology: a simple one-word rock type
        - colour, e.g. 'grey'
        - grainsize or range, e.g. 'vf-f'
        - modifier, e.g. 'rippled'
        - quantity, e.g. '35%', or 'stringers'
        - description, e.g. from cuttings

    You can include as many other things as you want, e.g.

        - porosity
        - cementation
        - lithology code
    

We define a new rock with a Python dict object:


In [18]:
r = {'colour': 'grey',
     'grainsize': 'vf-f',
     'lithology': 'sand'}
rock = Component(r)
rock


Out[18]:
colourgrey
lithologysand
grainsizevf-f

The Rock has a colour:


In [19]:
rock.colour


Out[19]:
'grey'

And it has a summary, which is generated from its attributes.


In [20]:
rock.summary()


Out[20]:
'Grey, sand, vf-f'

We can format the summary if we wish:


In [21]:
rock.summary(fmt="My rock: {lithology} ({colour}, {GRAINSIZE})")


Out[21]:
'My rock: sand (grey, VF-F)'

We can compare rocks with the usual == operator:


In [22]:
rock2 = Component({'grainsize': 'VF-F',
              'colour': 'Grey',
              'lithology': 'Sand'})
rock == rock2


Out[22]:
True

In order to create a Component object from text, we need a lexicon to compare the text against. The lexicon describes the language we want to extract, and what it means.


In [23]:
rock3 = Component.from_text('Grey fine sandstone.', lexicon)
rock3


Out[23]:
colourgrey
lithologysandstone
grainsizefine

In [24]:
rock4 = Component.from_text('Grey, sandstone, vf-f ', lexicon)
rock4


Out[24]:
colourgrey
lithologysandstone
grainsizevf-f

Interval

Intervals are where it gets interesting. An interval can have:

  • a top
  • a base
  • a description (in natural language)
  • a list of Components

Intervals don't have a 'way up', it's implied by the order of top and base.


In [25]:
from striplog import Interval
print(Interval.__doc__)


    Used to represent a lithologic or stratigraphic interval, or single point,
    such as a sample location.

    Initialize with a top (and optional base) and a description and/or
    an ordered list of components.

    Args:
        top (float): Required top depth. Required.
        base (float): Base depth. Optional.
        lexicon (dict): A lexicon. See documentation. Optional unless you only
            provide descriptions, because it's needed to extract components.
        max_component (int): The number of components to extract. Default 1.
        abbreviations (bool): Whether to parse for abbreviations.

    

I might make an Interval explicitly from a Component...


In [26]:
Interval(10, 20, components=[rock])


Out[26]:
Interval(top: 10.0, base: 20.0, description: '', components: [Component("colour":"grey", "lithology":"sand", "grainsize":"vf-f")])

... or I might pass a description and a lexicon and Striplog will parse the description and attempt to extract structured Component objects from it.


In [27]:
Interval(20, 40, "Grey sandstone with shale flakes.", lexicon=lexicon)


Out[27]:
Interval(top: 20.0, base: 40.0, description: 'Grey sandstone with shale flakes.', components: [Component("colour":"grey", "lithology":"sandstone")])

Notice I only got one Component, even though the description contains a subordinate lithology. This is the default behaviour, we have to ask for more components:


In [28]:
interval = Interval(20, 40, "Grey sandstone with black shale flakes.", lexicon=lexicon, max_component=2)
interval


Out[28]:
Interval(top: 20.0, base: 40.0, description: 'Grey sandstone with black shale flakes.', components: [Component("colour":"grey", "lithology":"sandstone"), Component("lithology":"shale", "colour":"black", "amount":"flakes")])

Intervals have a primary attribute, which holds the first component, no matter how many components there are.


In [29]:
interval.primary


Out[29]:
colourgrey
lithologysandstone

Ask for the summary to see the thickness and a Rock summary of the primary component. Note that the format code only applies to the Rock part of the summary.


In [30]:
interval.summary(fmt="{colour} {lithology} {amount}")


Out[30]:
'20.00 m of grey sandstone  with black shale flakes'

We can compare intervals, based on their thickness. Let's make one which is 5 m thicker than the prvious one.


In [31]:
interval_2 = Interval(40, 65, "Red sandstone.", lexicon=lexicon)

Technical aside: The Interval class is a functools.total_ordering, so providing __eq__ and one other comparison (such as __lt__) in the class definition means that instances of the class have implicit order. So you can use sorted on a Striplog, for example.

It wasn't clear to me whether this should compare tops (say), so that '>' might mean 'deeper', or if it should be keyed on thickness. I chose the latter, and implemented other comparisons instead.


In [32]:
print(interval_2 == interval)
print(interval_2 > interval)
print(max(interval, interval_2).summary())


False
True
25.00 m of sandstone, red

We can combine intervals with the + operator. (However, you cannot subtract intervals.)


In [33]:
interval_2 + interval


Out[33]:
Interval(top: 20.0, base: 65.0, description: '55.6% Red sandstone with 44.4% Grey sandstone with black shale flakes', components: [Component("lithology":"sandstone", "colour":"red"), Component("colour":"grey", "lithology":"sandstone"), Component("lithology":"shale", "colour":"black", "amount":"flakes")])

If we add a number to an interval, it adds thickness to the base.


In [34]:
interval + 5


Out[34]:
Interval(top: 20.0, base: 45.0, description: 'Grey sandstone with black shale flakes.', components: [Component("colour":"grey", "lithology":"sandstone"), Component("lithology":"shale", "colour":"black", "amount":"flakes")])

Adding a rock adds a (minor) component and adds to the description.


In [35]:
interval + rock3


Out[35]:
Interval(top: 20.0, base: 40.0, description: 'Grey sandstone with black shale flakes. with Grey, sandstone, fine', components: [Component("colour":"grey", "lithology":"sandstone"), Component("lithology":"shale", "colour":"black", "amount":"flakes"), Component("colour":"grey", "lithology":"sandstone", "grainsize":"fine")])

©2015 Agile Geoscience. Licensed CC-BY. striplog.py