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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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#