Source code for pygeopressure.basic.indexes

# -*- coding: utf-8 -*-
"""
class for survey index definition

created on Jun 10th 2017
"""
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

__author__ = "yuhao"


[docs]class SurveyIndex(object): def __init__(self, value): self.value = int(value)
[docs]class InlineIndex(SurveyIndex): pass
[docs]class CrlineIndex(SurveyIndex): pass
[docs]class DepthIndex(SurveyIndex): def __init__(self, value): self.value = value
[docs]class CdpIndex(SurveyIndex): def __init__(self, cdp): try: self.inline, self.crline = [int(_) for _ in cdp] self.value = (self.inline, self.crline) except TypeError: raise TypeError("Expected tuple, got {}".format(type(cdp)))