pisces.tables.css3#
Concrete canonical tables for CSS3.0 schema.
- class pisces.tables.css3.Affiliation(*args, **kwargs)[source]#
Bases:
Affiliation
- net (net)String(length=8)
No docstring.
- sta (sta)String(length=6)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8.8s} {1:6.6s} {2:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE affiliation (
net VARCHAR(8) NOT NULL, sta VARCHAR(6) NOT NULL, lddate DATETIME NOT NULL, PRIMARY KEY (net, sta)
)
- Attributes:
- lddate
- net
- sta
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- net#
- sta#
- class pisces.tables.css3.Amplitude(*args, **kwargs)[source]#
Bases:
Amplitude
- ampid (ampid)Integer()
No docstring.
- arid (arid)Integer()
No docstring.
- parid (parid)Integer()
No docstring.
- chan (chan)String(length=8)
No docstring.
- amp (amp)Float(precision=24)
No docstring.
- per (per)Float(precision=24)
No docstring.
- snr (snr)Float(precision=24)
No docstring.
- amptime (amptime)Float(precision=53)
No docstring.
- time (time)Float(precision=53)
No docstring.
- duration (duration)Float(precision=24)
No docstring.
- deltaf (deltaf)Float(precision=24)
No docstring.
- amptype (amptype)String(length=8)
No docstring.
- units (units)String(length=15)
No docstring.
- clip (clip)String(length=1)
No docstring.
- inarrival (inarrival)String(length=1)
No docstring.
- auth (auth)String(length=15)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:9d} {1:8d} {2:9d} {3:8.8s} {4:10.1f} {5:7.2f} {6:10.2f} {7:17.5f} {8:17.5f} {9:7.2f} {10:7.3f} {11:8.8s} {12:15.15s} {13:1.1s} {14:1.1s} {15:15s} {16:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE amplitude (
ampid INTEGER NOT NULL, arid INTEGER, parid INTEGER, chan VARCHAR(8), amp FLOAT, per FLOAT, snr FLOAT, amptime FLOAT, time FLOAT, duration FLOAT, deltaf FLOAT, amptype VARCHAR(8), units VARCHAR(15), clip VARCHAR(1), inarrival VARCHAR(1), auth VARCHAR(15), lddate DATETIME NOT NULL, PRIMARY KEY (ampid)
)
- Attributes:
- amp
- ampid
- amptime
- amptype
- arid
- auth
- chan
- clip
- deltaf
- duration
- inarrival
- lddate
- parid
- per
- snr
- time
- units
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- amp#
- ampid#
- amptime#
- amptype#
- arid#
- auth#
- chan#
- clip#
- deltaf#
- duration#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- inarrival#
- lddate#
- parid#
- per#
- snr#
- time#
- units#
- class pisces.tables.css3.Arrival(*args, **kwargs)[source]#
Bases:
Arrival
- sta (sta)String(length=6)
No docstring.
- time (time)Float(precision=53)
No docstring.
- arid (arid)Integer()
No docstring.
- jdate (jdate)Integer()
No docstring.
- stassid (stassid)Integer()
No docstring.
- chanid (chanid)Integer()
No docstring.
- chan (chan)String(length=8)
No docstring.
- iphase (iphase)String(length=8)
No docstring.
- stype (stype)String(length=1)
No docstring.
- deltim (deltim)Float(precision=24)
No docstring.
- azimuth (azimuth)Float(precision=24)
No docstring.
- delaz (delaz)Float(precision=24)
No docstring.
- slow (slow)Float(precision=24)
No docstring.
- delslo (delslo)Float(precision=24)
No docstring.
- ema (ema)Float(precision=24)
No docstring.
- rect (rect)Float(precision=24)
No docstring.
- amp (amp)Float(precision=24)
No docstring.
- per (per)Float(precision=24)
No docstring.
- logat (logat)Float(precision=24)
No docstring.
- clip (clip)String(length=1)
No docstring.
- fm (fm)String(length=2)
No docstring.
- snr (snr)Float(precision=24)
No docstring.
- qual (qual)String(length=1)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:6.6s} {1:17.5f} {2:8d} {3:8d} {4:8d} {5:8d} {6:8.8s} {7:8.8s} {8:1.1s} {9:6.3f} {10:7.2f} {11:7.2f} {12:7.2f} {13:7.2f} {14:7.2f} {15:7.3f} {16:10.1f} {17:7.2f} {18:7.2f} {19:1.1s} {20:2.2s} {21:10.2f} {22:1.1s} {23:15s} {24:8d} {25:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE arrival (
sta VARCHAR(6), time FLOAT, arid INTEGER NOT NULL, jdate INTEGER, stassid INTEGER, chanid INTEGER, chan VARCHAR(8), iphase VARCHAR(8), stype VARCHAR(1), deltim FLOAT, azimuth FLOAT, delaz FLOAT, slow FLOAT, delslo FLOAT, ema FLOAT, rect FLOAT, amp FLOAT, per FLOAT, logat FLOAT, clip VARCHAR(1), fm VARCHAR(2), snr FLOAT, qual VARCHAR(1), auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (arid), UNIQUE (sta, time, chan, iphase, auth)
)
- Attributes:
- amp
- arid
- auth
- azimuth
- chan
- chanid
- clip
- commid
- delaz
- delslo
- deltim
- ema
- fm
- iphase
- jdate
- lddate
- logat
- per
- qual
- rect
- slow
- snr
- sta
- stassid
- stype
- time
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- amp#
- arid#
- auth#
- azimuth#
- chan#
- chanid#
- clip#
- commid#
- delaz#
- delslo#
- deltim#
- ema#
- fm#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- iphase#
- jdate#
- lddate#
- logat#
- per#
- qual#
- rect#
- slow#
- snr#
- sta#
- stassid#
- stype#
- time#
- class pisces.tables.css3.Assoc(*args, **kwargs)[source]#
Bases:
Assoc
- arid (arid)Integer()
No docstring.
- orid (orid)Integer()
No docstring.
- sta (sta)String(length=6)
No docstring.
- phase (phase)String(length=8)
No docstring.
- belief (belief)Float(precision=24)
No docstring.
- delta (delta)Float(precision=24)
No docstring.
- seaz (seaz)Float(precision=24)
No docstring.
- esaz (esaz)Float(precision=24)
No docstring.
- timeres (timeres)Float(precision=24)
No docstring.
- timedef (timedef)String(length=1)
No docstring.
- azres (azres)Float(precision=24)
No docstring.
- azdef (azdef)String(length=1)
No docstring.
- slores (slores)Float(precision=24)
No docstring.
- slodef (slodef)String(length=1)
No docstring.
- emares (emares)Float(precision=24)
No docstring.
- wgt (wgt)Float(precision=24)
No docstring.
- vmodel (vmodel)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:8d} {2:6.6s} {3:8.8s} {4:4.2f} {5:8.3f} {6:7.2f} {7:7.2f} {8:8.3f} {9:1.1s} {10:7.1f} {11:1.1s} {12:7.2f} {13:1.1s} {14:7.1f} {15:6.3f} {16:15.15s} {17:8d} {18:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE assoc (
arid INTEGER NOT NULL, orid INTEGER NOT NULL, sta VARCHAR(6), phase VARCHAR(8), belief FLOAT, delta FLOAT, seaz FLOAT, esaz FLOAT, timeres FLOAT, timedef VARCHAR(1), azres FLOAT, azdef VARCHAR(1), slores FLOAT, slodef VARCHAR(1), emares FLOAT, wgt FLOAT, vmodel VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (arid, orid), UNIQUE (arid)
)
- Attributes:
- arid
- azdef
- azres
- belief
- commid
- delta
- emares
- esaz
- lddate
- orid
- phase
- seaz
- slodef
- slores
- sta
- timedef
- timeres
- vmodel
- wgt
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- arid#
- azdef#
- azres#
- belief#
- commid#
- delta#
- emares#
- esaz#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- orid#
- phase#
- seaz#
- slodef#
- slores#
- sta#
- timedef#
- timeres#
- vmodel#
- wgt#
- class pisces.tables.css3.Event(*args, **kwargs)[source]#
Bases:
Event
- evid (evid)Integer()
No docstring.
- evname (evname)String(length=15)
No docstring.
- prefor (prefor)Integer()
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:15.15s} {2:8d} {3:15s} {4:8d} {5:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE event (
evid INTEGER NOT NULL, evname VARCHAR(15), prefor INTEGER, auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (evid), UNIQUE (prefor)
)
- Attributes:
- auth
- commid
- evid
- evname
- lddate
- prefor
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth#
- commid#
- evid#
- evname#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- prefor#
- class pisces.tables.css3.Gregion(*args, **kwargs)[source]#
Bases:
Gregion
- grn (grn)Integer()
No docstring.
- grname (grname)String(length=40)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:40.40s} {2:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE gregion (
grn INTEGER NOT NULL, grname VARCHAR(40), lddate DATETIME NOT NULL, PRIMARY KEY (grn)
)
- Attributes:
- grn
- grname
- lddate
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- grn#
- grname#
- lddate#
- class pisces.tables.css3.Instrument(*args, **kwargs)[source]#
Bases:
Instrument
- inid (inid)Integer()
No docstring.
- insname (insname)String(length=50)
No docstring.
- instype (instype)String(length=6)
No docstring.
- band (band)String(length=1)
No docstring.
- digital (digital)String(length=1)
No docstring.
- samprate (samprate)Float(precision=24)
No docstring.
- ncalib (ncalib)Float(precision=24)
No docstring.
- ncalper (ncalper)Float(precision=24)
No docstring.
- dir (dir)String(length=64)
No docstring.
- dfile (dfile)String(length=32)
No docstring.
- rsptype (rsptype)String(length=6)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:50.50s} {2:6.6s} {3:1.1s} {4:1.1s} {5:11.7f} {6:16.6f} {7:16.6f} {8:64.64s} {9:32.32s} {10:6.6s} {11:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE instrument (
inid INTEGER NOT NULL, insname VARCHAR(50), instype VARCHAR(6), band VARCHAR(1), digital VARCHAR(1), samprate FLOAT, ncalib FLOAT, ncalper FLOAT, dir VARCHAR(64), dfile VARCHAR(32), rsptype VARCHAR(6), lddate DATETIME NOT NULL, PRIMARY KEY (inid)
)
- Attributes:
- band
- dfile
- digital
- dir
- inid
- insname
- instype
- lddate
- ncalib
- ncalper
- rsptype
- samprate
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- band#
- dfile#
- digital#
- dir#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- inid#
- insname#
- instype#
- lddate#
- ncalib#
- ncalper#
- rsptype#
- samprate#
- class pisces.tables.css3.Lastid(*args, **kwargs)[source]#
Bases:
Lastid
- keyname (keyname)String(length=15)
No docstring.
- keyvalue (keyvalue)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:15.15s} {1:8d} {2:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE lastid (
keyname VARCHAR(15) NOT NULL, keyvalue INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (keyname), UNIQUE (keyname, keyvalue)
)
- Attributes:
- keyname
- keyvalue
- lddate
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- keyname#
- keyvalue#
- lddate#
- class pisces.tables.css3.Netmag(*args, **kwargs)[source]#
Bases:
Netmag
- magid (magid)Integer()
No docstring.
- net (net)String(length=8)
No docstring.
- orid (orid)Integer()
No docstring.
- evid (evid)Integer()
No docstring.
- magtype (magtype)String(length=6)
No docstring.
- nsta (nsta)Integer()
No docstring.
- magnitude (magnitude)Float(precision=24)
No docstring.
- uncertainty (uncertainty)Float(precision=24)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:8.8s} {2:8d} {3:8d} {4:6.6s} {5:8d} {6:7.2f} {7:7.2f} {8:15s} {9:8d} {10:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE netmag (
magid INTEGER NOT NULL, net VARCHAR(8), orid INTEGER, evid INTEGER, magtype VARCHAR(6), nsta INTEGER, magnitude FLOAT, uncertainty FLOAT, auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (magid), UNIQUE (magid, orid)
)
- Attributes:
- auth
- commid
- evid
- lddate
- magid
- magnitude
- magtype
- net
- nsta
- orid
- uncertainty
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth#
- commid#
- evid#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- magid#
- magnitude#
- magtype#
- net#
- nsta#
- orid#
- uncertainty#
- class pisces.tables.css3.Network(*args, **kwargs)[source]#
Bases:
Network
- net (net)String(length=8)
No docstring.
- netname (netname)String(length=80)
No docstring.
- nettype (nettype)String(length=4)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8.8s} {1:80.80s} {2:4.4s} {3:15s} {4:8d} {5:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE network (
net VARCHAR(8) NOT NULL, netname VARCHAR(80), nettype VARCHAR(4), auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (net)
)
- Attributes:
- auth
- commid
- lddate
- net
- netname
- nettype
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth#
- commid#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- net#
- netname#
- nettype#
- class pisces.tables.css3.Origerr(*args, **kwargs)[source]#
Bases:
Origerr
- orid (orid)Integer()
No docstring.
- sxx (sxx)Float(precision=24)
No docstring.
- syy (syy)Float(precision=24)
No docstring.
- szz (szz)Float(precision=24)
No docstring.
- stt (stt)Float(precision=24)
No docstring.
- sxy (sxy)Float(precision=24)
No docstring.
- sxz (sxz)Float(precision=24)
No docstring.
- syz (syz)Float(precision=24)
No docstring.
- stx (stx)Float(precision=24)
No docstring.
- sty (sty)Float(precision=24)
No docstring.
- stz (stz)Float(precision=24)
No docstring.
- sdobs (sdobs)Float(precision=24)
No docstring.
- smajax (smajax)Float(precision=24)
No docstring.
- sminax (sminax)Float(precision=24)
No docstring.
- strike (strike)Float(precision=24)
No docstring.
- sdepth (sdepth)Float(precision=24)
No docstring.
- stime (stime)Float(precision=24)
No docstring.
- conf (conf)Float(precision=24)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:15.4f} {2:15.4f} {3:15.4f} {4:15.4f} {5:15.4f} {6:15.4f} {7:15.4f} {8:15.4f} {9:15.4f} {10:15.4f} {11:9.4f} {12:9.4f} {13:9.4f} {14:6.2f} {15:9.4f} {16:8.2f} {17:5.3f} {18:8d} {19:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE origerr (
orid INTEGER NOT NULL, sxx FLOAT, syy FLOAT, szz FLOAT, stt FLOAT, sxy FLOAT, sxz FLOAT, syz FLOAT, stx FLOAT, sty FLOAT, stz FLOAT, sdobs FLOAT, smajax FLOAT, sminax FLOAT, strike FLOAT, sdepth FLOAT, stime FLOAT, conf FLOAT, commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (orid)
)
- Attributes:
- commid
- conf
- lddate
- orid
- sdepth
- sdobs
- smajax
- sminax
- stime
- strike
- stt
- stx
- sty
- stz
- sxx
- sxy
- sxz
- syy
- syz
- szz
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- commid#
- conf#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- orid#
- sdepth#
- sdobs#
- smajax#
- sminax#
- stime#
- strike#
- stt#
- stx#
- sty#
- stz#
- sxx#
- sxy#
- sxz#
- syy#
- syz#
- szz#
- class pisces.tables.css3.Origin(*args, **kwargs)[source]#
Bases:
Origin
- lat (lat)Float(precision=24)
No docstring.
- lon (lon)Float(precision=24)
No docstring.
- depth (depth)Float(precision=24)
No docstring.
- time (time)Float(precision=53)
No docstring.
- orid (orid)Integer()
No docstring.
- evid (evid)Integer()
No docstring.
- jdate (jdate)Integer()
No docstring.
- nass (nass)Integer()
No docstring.
- ndef (ndef)Integer()
No docstring.
- ndp (ndp)Integer()
No docstring.
- grn (grn)Integer()
No docstring.
- srn (srn)Integer()
No docstring.
- etype (etype)String(length=7)
No docstring.
- depdp (depdp)Float(precision=24)
No docstring.
- dtype (dtype)String(length=1)
No docstring.
- mb (mb)Float(precision=24)
No docstring.
- mbid (mbid)Integer()
No docstring.
- ms (ms)Float(precision=24)
No docstring.
- msid (msid)Integer()
No docstring.
- ml (ml)Float(precision=24)
No docstring.
- mlid (mlid)Integer()
No docstring.
- algorithm (algorithm)String(length=15)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:9.4f} {1:9.4f} {2:9.4f} {3:17.5f} {4:8d} {5:8d} {6:8d} {7:4d} {8:4d} {9:4d} {10:8d} {11:8d} {12:7.7s} {13:9.4f} {14:1.1s} {15:7.2f} {16:8d} {17:7.2f} {18:8d} {19:7.2f} {20:8d} {21:15.15s} {22:15s} {23:8d} {24:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE origin (
lat FLOAT, lon FLOAT, depth FLOAT, time FLOAT, orid INTEGER NOT NULL, evid INTEGER, jdate INTEGER, nass INTEGER, ndef INTEGER, ndp INTEGER, grn INTEGER, srn INTEGER, etype VARCHAR(7), depdp FLOAT, dtype VARCHAR(1), mb FLOAT, mbid INTEGER, ms FLOAT, msid INTEGER, ml FLOAT, mlid INTEGER, algorithm VARCHAR(15), auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (orid), UNIQUE (lat, lon, depth, time, auth)
)
- Attributes:
- algorithm
- auth
- commid
- depdp
- depth
- dtype
- etype
- evid
- grn
- jdate
- lat
- lddate
- lon
- mb
- mbid
- ml
- mlid
- ms
- msid
- nass
- ndef
- ndp
- orid
- srn
- time
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- algorithm#
- auth#
- commid#
- depdp#
- depth#
- dtype#
- etype#
- evid#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- grn#
- jdate#
- lat#
- lddate#
- lon#
- mb#
- mbid#
- ml#
- mlid#
- ms#
- msid#
- nass#
- ndef#
- ndp#
- orid#
- srn#
- time#
- class pisces.tables.css3.Remark(*args, **kwargs)[source]#
Bases:
Remark
- commid (commid)Integer()
No docstring.
- lineno (lineno)Integer()
No docstring.
- remark (remark)String(length=80)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:8d} {2.commid:8d} {2.lineno:8d} {2.remark:80.80s} {2.lddate:%y-%m-%d %H:%M:%S} {3:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE remark (
commid INTEGER NOT NULL, lineno INTEGER NOT NULL, remark VARCHAR(80), lddate DATETIME NOT NULL, PRIMARY KEY (commid, lineno)
)
- Attributes:
- commid
- lddate
- lineno
- remark
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- commid#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- lineno#
- remark#
- class pisces.tables.css3.Sensor(*args, **kwargs)[source]#
Bases:
Sensor
- sta (sta)String(length=6)
No docstring.
- chan (chan)String(length=8)
No docstring.
- time (time)Float(precision=53)
No docstring.
- endtime (endtime)Float(precision=53)
No docstring.
- inid (inid)Integer()
No docstring.
- chanid (chanid)Integer()
No docstring.
- jdate (jdate)Integer()
No docstring.
- calratio (calratio)Float(precision=24)
No docstring.
- calper (calper)Float(precision=24)
No docstring.
- tshift (tshift)Float(precision=24)
No docstring.
- instant (instant)String(length=1)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:6.6s} {1:8.8s} {2:17.5f} {3:17.5f} {4:8d} {5:8d} {6:8d} {7:16.6f} {8:16.6f} {9:6.2f} {10:1.1s} {11:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE sensor (
sta VARCHAR(6) NOT NULL, chan VARCHAR(8) NOT NULL, time FLOAT NOT NULL, endtime FLOAT NOT NULL, inid INTEGER, chanid INTEGER, jdate INTEGER, calratio FLOAT, calper FLOAT, tshift FLOAT, instant VARCHAR(1), lddate DATETIME NOT NULL, PRIMARY KEY (sta, chan, time, endtime)
)
- Attributes:
- calper
- calratio
- chan
- chanid
- endtime
- inid
- instant
- jdate
- lddate
- sta
- time
- tshift
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- calper#
- calratio#
- chan#
- chanid#
- endtime#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- inid#
- instant#
- jdate#
- lddate#
- sta#
- time#
- tshift#
- class pisces.tables.css3.Site(*args, **kwargs)[source]#
Bases:
Site
- sta (sta)String(length=6)
No docstring.
- ondate (ondate)Integer()
No docstring.
- offdate (offdate)Integer()
No docstring.
- lat (lat)Float(precision=24)
No docstring.
- lon (lon)Float(precision=24)
No docstring.
- elev (elev)Float(precision=24)
No docstring.
- staname (staname)String(length=50)
No docstring.
- statype (statype)String(length=4)
No docstring.
- refsta (refsta)String(length=6)
No docstring.
- dnorth (dnorth)Float(precision=24)
No docstring.
- deast (deast)Float(precision=24)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:6.6s} {1:8d} {2:8d} {3:9.4f} {4:9.4f} {5:9.4f} {6:50.50s} {7:4.4s} {8:6.6s} {9:9.4f} {10:9.4f} {11:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE site (
sta VARCHAR(6) NOT NULL, ondate INTEGER NOT NULL, offdate INTEGER, lat FLOAT, lon FLOAT, elev FLOAT, staname VARCHAR(50), statype VARCHAR(4), refsta VARCHAR(6), dnorth FLOAT, deast FLOAT, lddate DATETIME NOT NULL, PRIMARY KEY (sta, ondate)
)
- Attributes:
- deast
- dnorth
- elev
- lat
- lddate
- lon
- offdate
- ondate
- refsta
- sta
- staname
- statype
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- deast#
- dnorth#
- elev#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lat#
- lddate#
- lon#
- offdate#
- ondate#
- refsta#
- sta#
- staname#
- statype#
- class pisces.tables.css3.Sitechan(*args, **kwargs)[source]#
Bases:
Sitechan
- sta (sta)String(length=6)
No docstring.
- chan (chan)String(length=8)
No docstring.
- ondate (ondate)Integer()
No docstring.
- chanid (chanid)Integer()
No docstring.
- offdate (offdate)Integer()
No docstring.
- ctype (ctype)String(length=4)
No docstring.
- edepth (edepth)Float(precision=24)
No docstring.
- hang (hang)Float(precision=24)
No docstring.
- vang (vang)Float(precision=24)
No docstring.
- descrip (descrip)String(length=50)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:6.6s} {1:8.8s} {2:8d} {3:8d} {4:8d} {5:4.4s} {6:9.4f} {7:6.1f} {8:6.1f} {9:50.50s} {10:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE sitechan (
sta VARCHAR(6), chan VARCHAR(8), ondate INTEGER, chanid INTEGER NOT NULL, offdate INTEGER, ctype VARCHAR(4), edepth FLOAT, hang FLOAT, vang FLOAT, descrip VARCHAR(50), lddate DATETIME NOT NULL, PRIMARY KEY (chanid), UNIQUE (sta, chan, ondate)
)
- Attributes:
- chan
- chanid
- ctype
- descrip
- edepth
- hang
- lddate
- offdate
- ondate
- sta
- vang
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- chan#
- chanid#
- ctype#
- descrip#
- edepth#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- hang#
- lddate#
- offdate#
- ondate#
- sta#
- vang#
- class pisces.tables.css3.Sregion(*args, **kwargs)[source]#
Bases:
Sregion
- srn (srn)Integer()
No docstring.
- srname (srname)String(length=40)
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:40.40s} {2:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE sregion (
srn INTEGER NOT NULL, srname VARCHAR(40), lddate DATETIME NOT NULL, PRIMARY KEY (srn)
)
- Attributes:
- lddate
- srn
- srname
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- srn#
- srname#
- class pisces.tables.css3.Stamag(*args, **kwargs)[source]#
Bases:
Stamag
- magid (magid)Integer()
No docstring.
- sta (sta)String(length=6)
No docstring.
- arid (arid)Integer()
No docstring.
- orid (orid)Integer()
No docstring.
- evid (evid)Integer()
No docstring.
- phase (phase)String(length=8)
No docstring.
- delta (delta)Float(precision=24)
No docstring.
- magtype (magtype)String(length=6)
No docstring.
- magnitude (magnitude)Float(precision=24)
No docstring.
- uncertainty (uncertainty)Float(precision=24)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:6.6s} {2:8d} {3:8d} {4:8d} {5:8.8s} {6:8.3f} {7:6.6s} {8:7.2f} {9:7.2f} {10:15s} {11:8d} {12:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE stamag (
magid INTEGER NOT NULL, sta VARCHAR(6) NOT NULL, arid INTEGER, orid INTEGER, evid INTEGER, phase VARCHAR(8), delta FLOAT, magtype VARCHAR(6), magnitude FLOAT, uncertainty FLOAT, auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (magid, sta)
)
- Attributes:
- arid
- auth
- commid
- delta
- evid
- lddate
- magid
- magnitude
- magtype
- orid
- phase
- sta
- uncertainty
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- arid#
- auth#
- commid#
- delta#
- evid#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- magid#
- magnitude#
- magtype#
- orid#
- phase#
- sta#
- uncertainty#
- class pisces.tables.css3.Stassoc(*args, **kwargs)[source]#
Bases:
Stassoc
- stassid (stassid)Integer()
No docstring.
- sta (sta)String(length=6)
No docstring.
- etype (etype)String(length=7)
No docstring.
- location (location)String(length=32)
No docstring.
- dist (dist)Float(precision=24)
No docstring.
- azimuth (azimuth)Float(precision=24)
No docstring.
- lat (lat)Float(precision=24)
No docstring.
- lon (lon)Float(precision=24)
No docstring.
- depth (depth)Float(precision=24)
No docstring.
- time (time)Float(precision=53)
No docstring.
- imb (imb)Float(precision=24)
No docstring.
- ims (ims)Float(precision=24)
No docstring.
- iml (iml)Float(precision=24)
No docstring.
- auth (auth)String(length=15)
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8d} {1:6.6s} {2:7.7s} {3:32.32s} {4:7.2f} {5:7.2f} {6:9.4f} {7:9.4f} {8:9.4f} {9:17.5f} {10:7.2f} {11:7.2f} {12:7.2f} {13:15s} {14:8d} {15:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE stassoc (
stassid INTEGER NOT NULL, sta VARCHAR(6), etype VARCHAR(7), location VARCHAR(32), dist FLOAT, azimuth FLOAT, lat FLOAT, lon FLOAT, depth FLOAT, time FLOAT, imb FLOAT, ims FLOAT, iml FLOAT, auth VARCHAR(15), commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (stassid)
)
- Attributes:
- auth
- azimuth
- commid
- depth
- dist
- etype
- imb
- iml
- ims
- lat
- lddate
- location
- lon
- sta
- stassid
- time
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth#
- azimuth#
- commid#
- depth#
- dist#
- etype#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- imb#
- iml#
- ims#
- lat#
- lddate#
- location#
- lon#
- sta#
- stassid#
- time#
- class pisces.tables.css3.Wfdisc(*args, **kwargs)[source]#
Bases:
Wfdisc
- sta (sta)String(length=6)
No docstring.
- chan (chan)String(length=8)
No docstring.
- time (time)Float(precision=53)
No docstring.
- wfid (wfid)Integer()
No docstring.
- chanid (chanid)Integer()
No docstring.
- jdate (jdate)Integer()
No docstring.
- endtime (endtime)Float(precision=53)
No docstring.
- nsamp (nsamp)Integer()
No docstring.
- samprate (samprate)Float(precision=24)
No docstring.
- calib (calib)Float(precision=24)
No docstring.
- calper (calper)Float(precision=24)
No docstring.
- instype (instype)String(length=6)
No docstring.
- segtype (segtype)String(length=1)
No docstring.
- datatype (datatype)String(length=2)
No docstring.
- clip (clip)String(length=1)
No docstring.
- dir (dir)String(length=64)
No docstring.
- dfile (dfile)String(length=32)
No docstring.
- foff (foff)Integer()
No docstring.
- commid (commid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:6.6s} {1:8.8s} {2:17.5f} {3:8d} {4:8d} {5:8d} {6:17.5f} {7:8d} {8:11.7f} {9:16.6f} {10:16.6f} {11:6.6s} {12:1.1s} {13:2.2s} {14:1.1s} {15:64.64s} {16:32.32s} {17:10d} {18:8d} {19:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE wfdisc (
sta VARCHAR(6), chan VARCHAR(8), time FLOAT, wfid INTEGER NOT NULL, chanid INTEGER, jdate INTEGER, endtime FLOAT, nsamp INTEGER, samprate FLOAT, calib FLOAT, calper FLOAT, instype VARCHAR(6), segtype VARCHAR(1), datatype VARCHAR(2), clip VARCHAR(1), dir VARCHAR(64), dfile VARCHAR(32), foff INTEGER, commid INTEGER, lddate DATETIME NOT NULL, PRIMARY KEY (wfid), UNIQUE (wfid, dir, dfile)
)
- Attributes:
- calib
- calper
- chan
- chanid
- clip
- commid
- datatype
- dfile
- dir
- endtime
- foff
- instype
- jdate
- lddate
- nsamp
- samprate
- segtype
- sta
- time
- wfid
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
to_trace
()Read the wfdisc line into a Trace instance.
- calib#
- calper#
- chan#
- chanid#
- clip#
- commid#
- datatype#
- dfile#
- dir#
- endtime#
- foff#
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- instype#
- jdate#
- lddate#
- nsamp#
- samprate#
- segtype#
- sta#
- time#
- wfid#
- class pisces.tables.css3.Wftag(*args, **kwargs)[source]#
Bases:
Wftag
- tagname (tagname)String(length=8)
No docstring.
- tagid (tagid)Integer()
No docstring.
- wfid (wfid)Integer()
No docstring.
- lddate (lddate)DateTime()
No docstring.
FORMAT STRING: {0:8.8s} {1:8d} {2:8d} {3:%y-%m-%d %H:%M:%S}
SQL CREATE STATEMENT:
- CREATE TABLE wftag (
tagname VARCHAR(8) NOT NULL, tagid INTEGER NOT NULL, wfid INTEGER NOT NULL, lddate DATETIME NOT NULL, PRIMARY KEY (tagname, tagid, wfid)
)
- Attributes:
- lddate
- tagid
- tagname
- wfid
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- classmethod from_string(line, default_on_error=None)#
Construct a mapped table instance from correctly formatted flat file line.
Works with fixed-length fields, separated by a single whitespace.
- Parameters:
- line: str
Flat file line (best to remove newline, but maybe not a problem).
- default_on_error: list, optional
Supply a list of column names that return default values if they produce an error during parsing (e.g. lddate).
- Raises:
- ValueError: Can’t properly parse the line.
Notes
default_on_error is useful for malformed fields, but it will also mask other problems with line parsing. It’s better to pre-process tables to match the table specifications or catch exceptions and isolate these lines.
Examples
>>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line) or >>> with open('TA.site','r') as ffsite: for line in ffsite: isite = Site.from_string(line, default_on_error=['lddate'])
- lddate#
- tagid#
- tagname#
- wfid#