pisces.schema.antelope#
Antelope v4.11 Datascope database schema
- class pisces.schema.antelope.Affiliation(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- endtime = Column(None, Float(precision=53), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- net = Column(None, String(length=8), table=None)#
- sta = Column(None, String(length=6), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- class pisces.schema.antelope.Amplitude(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- amp = Column(None, Float(precision=24), table=None)#
- ampid = Column(None, Integer(), table=None, nullable=False)#
- amptime = Column(None, Float(precision=53), table=None)#
- amptype = Column(None, String(length=8), table=None)#
- arid = Column(None, Integer(), table=None)#
- auth = Column(None, String(length=15), table=None)#
- chan = Column(None, String(length=8), table=None)#
- clip = Column(None, String(length=1), table=None)#
- deltaf = Column(None, Float(precision=24), table=None)#
- duration = Column(None, Float(precision=24), table=None)#
- 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 = Column(None, String(length=1), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- parid = Column(None, Integer(), table=None)#
- per = Column(None, Float(precision=24), table=None)#
- snr = Column(None, Float(precision=24), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- units = Column(None, String(length=12), table=None)#
- class pisces.schema.antelope.Arrival(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- amp = Column(None, Float(precision=24), table=None)#
- arid = Column(None, Integer(), table=None)#
- auth = Column(None, String(length=15), table=None)#
- azimuth = Column(None, Float(precision=24), table=None)#
- chan = Column(None, String(length=8), table=None)#
- chanid = Column(None, Integer(), table=None)#
- clip = Column(None, String(length=1), table=None)#
- commid = Column(None, Integer(), table=None)#
- delaz = Column(None, Float(precision=24), table=None)#
- delslo = Column(None, Float(precision=24), table=None)#
- deltim = Column(None, Float(precision=24), table=None)#
- ema = Column(None, Float(precision=24), table=None)#
- fm = Column(None, String(length=2), table=None)#
- 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 = Column(None, String(length=8), table=None)#
- jdate = Column(None, Integer(), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- logat = Column(None, Float(precision=24), table=None)#
- per = Column(None, Float(precision=24), table=None)#
- qual = Column(None, String(length=1), table=None)#
- rect = Column(None, Float(precision=24), table=None)#
- slow = Column(None, Float(precision=24), table=None)#
- snr = Column(None, Float(precision=24), table=None)#
- sta = Column(None, String(length=6), table=None)#
- stassid = Column(None, Integer(), table=None)#
- stype = Column(None, String(length=1), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- class pisces.schema.antelope.Assoc(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- arid = Column(None, Integer(), table=None)#
- azdef = Column(None, String(length=1), table=None)#
- azres = Column(None, Float(precision=24), table=None)#
- belief = Column(None, Float(precision=24), table=None)#
- commid = Column(None, Integer(), table=None)#
- delta = Column(None, Float(precision=24), table=None)#
- emares = Column(None, Float(precision=24), table=None)#
- esaz = Column(None, Float(precision=24), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- orid = Column(None, Integer(), table=None)#
- phase = Column(None, String(length=8), table=None)#
- seaz = Column(None, Float(precision=24), table=None)#
- slodef = Column(None, String(length=1), table=None)#
- slores = Column(None, Float(precision=24), table=None)#
- sta = Column(None, String(length=6), table=None)#
- timedef = Column(None, String(length=1), table=None)#
- timeres = Column(None, Float(precision=24), table=None)#
- vmodel = Column(None, String(length=15), table=None)#
- wgt = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Event(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth = Column(None, String(length=15), table=None)#
- commid = Column(None, Integer(), table=None)#
- evid = Column(None, Integer(), table=None)#
- evname = Column(None, String(length=15), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- prefor = Column(None, Integer(), table=None)#
- class pisces.schema.antelope.Gregion(*args, **kwargs)[source]#
Bases:
Base
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 = Column(None, Integer(), table=None)#
- grname = Column(None, String(length=40), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- class pisces.schema.antelope.Instrument(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- band = Column(None, String(length=1), table=None)#
- dfile = Column(None, String(length=32), table=None)#
- digital = Column(None, String(length=1), table=None)#
- dir = Column(None, String(length=64), table=None)#
- 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 = Column(None, Integer(), table=None)#
- insname = Column(None, String(length=50), table=None)#
- instype = Column(None, String(length=6), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- ncalib = Column(None, Float(precision=24), table=None)#
- ncalper = Column(None, Float(precision=24), table=None)#
- rsptype = Column(None, String(length=6), table=None)#
- samprate = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Lastid(*args, **kwargs)[source]#
Bases:
Base
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 = Column(None, String(length=15), table=None)#
- keyvalue = Column(None, Integer(), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- class pisces.schema.antelope.Netmag(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth = Column(None, String(length=15), table=None)#
- commid = Column(None, Integer(), table=None)#
- evid = Column(None, Integer(), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- magid = Column(None, Integer(), table=None, nullable=False)#
- magnitude = Column(None, Float(precision=24), table=None)#
- magtype = Column(None, String(length=6), table=None)#
- net = Column(None, String(length=8), table=None)#
- nsta = Column(None, Integer(), table=None)#
- orid = Column(None, Integer(), table=None)#
- uncertainty = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Network(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- auth = Column(None, String(length=15), table=None)#
- commid = Column(None, Integer(), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- net = Column(None, String(length=8), table=None)#
- netname = Column(None, String(length=80), table=None)#
- nettype = Column(None, String(length=4), table=None)#
- class pisces.schema.antelope.Origerr(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- commid = Column(None, Integer(), table=None)#
- conf = Column(None, Float(precision=24), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- orid = Column(None, Integer(), table=None)#
- sdepth = Column(None, Float(precision=24), table=None)#
- sdobs = Column(None, Float(precision=24), table=None)#
- smajax = Column(None, Float(precision=24), table=None)#
- sminax = Column(None, Float(precision=24), table=None)#
- stime = Column(None, Float(precision=24), table=None)#
- strike = Column(None, Float(precision=24), table=None)#
- stt = Column(None, Float(precision=24), table=None)#
- stx = Column(None, Float(precision=24), table=None)#
- sty = Column(None, Float(precision=24), table=None)#
- stz = Column(None, Float(precision=24), table=None)#
- sxx = Column(None, Float(precision=24), table=None)#
- sxy = Column(None, Float(precision=24), table=None)#
- sxz = Column(None, Float(precision=24), table=None)#
- syy = Column(None, Float(precision=24), table=None)#
- syz = Column(None, Float(precision=24), table=None)#
- szz = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Origin(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- algorithm = Column(None, String(length=15), table=None)#
- auth = Column(None, String(length=15), table=None)#
- commid = Column(None, Integer(), table=None)#
- depdp = Column(None, Float(precision=24), table=None)#
- depth = Column(None, Float(precision=24), table=None)#
- dtype = Column(None, String(length=1), table=None)#
- etype = Column(None, String(length=2), table=None)#
- evid = Column(None, Integer(), table=None)#
- 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 = Column(None, Integer(), table=None)#
- jdate = Column(None, Integer(), table=None)#
- lat = Column(None, Float(precision=53), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- lon = Column(None, Float(precision=53), table=None)#
- mb = Column(None, Float(precision=24), table=None)#
- mbid = Column(None, Integer(), table=None)#
- ml = Column(None, Float(precision=24), table=None)#
- mlid = Column(None, Integer(), table=None)#
- ms = Column(None, Float(precision=24), table=None)#
- msid = Column(None, Integer(), table=None)#
- nass = Column(None, Integer(), table=None)#
- ndef = Column(None, Integer(), table=None)#
- ndp = Column(None, Integer(), table=None)#
- orid = Column(None, Integer(), table=None)#
- review = Column(None, String(length=4), table=None)#
- srn = Column(None, Integer(), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- class pisces.schema.antelope.Remark(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- commid = Column(None, Integer(), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- lineno = Column(None, Integer(), table=None)#
- remark = Column(None, String(length=80), table=None)#
- class pisces.schema.antelope.Sensor(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- calper = Column(None, Float(precision=24), table=None)#
- calratio = Column(None, Float(precision=24), table=None)#
- chan = Column(None, String(length=8), table=None)#
- chanid = Column(None, Integer(), table=None)#
- endtime = Column(None, Float(precision=53), table=None)#
- 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 = Column(None, Integer(), table=None)#
- instant = Column(None, String(length=1), table=None)#
- jdate = Column(None, Integer(), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- sta = Column(None, String(length=6), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- tshift = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Site(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- deast = Column(None, Float(precision=24), table=None)#
- dnorth = Column(None, Float(precision=24), table=None)#
- elev = Column(None, Float(precision=24), table=None)#
- 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 = Column(None, Float(precision=53), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- lon = Column(None, Float(precision=53), table=None)#
- offdate = Column(None, Integer(), table=None)#
- ondate = Column(None, Integer(), table=None)#
- refsta = Column(None, String(length=6), table=None)#
- sta = Column(None, String(length=6), table=None)#
- staname = Column(None, String(length=50), table=None)#
- statype = Column(None, String(length=4), table=None)#
- class pisces.schema.antelope.Sitechan(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- chan = Column(None, String(length=8), table=None)#
- chanid = Column(None, Integer(), table=None)#
- ctype = Column(None, String(length=4), table=None)#
- descrip = Column(None, String(length=50), table=None)#
- edepth = Column(None, Float(precision=24), table=None)#
- 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 = Column(None, Float(precision=24), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- offdate = Column(None, Integer(), table=None)#
- ondate = Column(None, Integer(), table=None)#
- sta = Column(None, String(length=6), table=None)#
- vang = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Sregion(*args, **kwargs)[source]#
Bases:
Base
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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- srn = Column(None, Integer(), table=None)#
- srname = Column(None, String(length=40), table=None)#
- class pisces.schema.antelope.Stamag(*args, **kwargs)[source]#
Bases:
Base
Methods
from_string
(line[, default_on_error])Construct a mapped table instance from correctly formatted flat file line.
- arid = Column(None, Integer(), table=None)#
- auth = Column(None, String(length=15), table=None)#
- commid = Column(None, Integer(), table=None)#
- evid = Column(None, Integer(), table=None)#
- 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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- magid = Column(None, Integer(), table=None, nullable=False)#
- magnitude = Column(None, Float(precision=24), table=None)#
- magtype = Column(None, String(length=6), table=None)#
- orid = Column(None, Integer(), table=None)#
- phase = Column(None, String(length=8), table=None)#
- sta = Column(None, String(length=6), table=None)#
- uncertainty = Column(None, Float(precision=24), table=None)#
- class pisces.schema.antelope.Wfdisc(*args, **kwargs)[source]#
Bases:
Base
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 = Column(None, Float(precision=24), table=None)#
- calper = Column(None, Float(precision=24), table=None)#
- chan = Column(None, String(length=8), table=None)#
- chanid = Column(None, Integer(), table=None)#
- clip = Column(None, String(length=1), table=None)#
- commid = Column(None, Integer(), table=None)#
- datatype = Column(None, String(length=2), table=None)#
- dfile = Column(None, String(length=32), table=None)#
- dir = Column(None, String(length=64), table=None)#
- endtime = Column(None, Float(precision=53), table=None)#
- foff = Column(None, Integer(), table=None)#
- 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 = Column(None, String(length=6), table=None)#
- jdate = Column(None, Integer(), table=None)#
- lddate = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- nsamp = Column(None, Integer(), table=None)#
- samprate = Column(None, Float(precision=24), table=None)#
- segtype = Column(None, String(length=1), table=None)#
- sta = Column(None, String(length=6), table=None)#
- time = Column(None, Float(precision=53), table=None)#
- to_trace()[source]#
Read the wfdisc line into a Trace instance. Minimal header.
- Returns:
- obspy.Trace
- wfid = Column(None, Integer(), table=None)#
- class pisces.schema.antelope.Wftag(*args, **kwargs)[source]#
Bases:
Base
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 = Column(None, DateTime(), table=None, nullable=False, onupdate=CallableColumnDefault(<function datetime.now>))#
- tagid = Column(None, Integer(), table=None)#
- tagname = Column(None, String(length=8), table=None)#
- wfid = Column(None, Integer(), table=None)#