コード例 #1
0
    def __init__(self, data=None, verbose=False, debug=False, **kwargs):
        """Init function with optional data load"""
        MethodManager.__init__(self, verbose=verbose, debug=debug, **kwargs)
        self.figs = {}
        self.axs = {}

        self.doSave = kwargs.pop('doSave', False)
        self.errIsAbsolute = True

        # should be forwarded so it can be accessed from outside
        self.mesh = None
        self.poly = None
        self.error = None
        self.velocity = None
        self.response = None
        # self.start = []
        self.pd = None

        #CR!, check if this should be better a static member
        self.dataToken_ = 't'

        if isinstance(data, str):
            self.loadData(data)
        elif isinstance(data, pg.DataContainer):
            self.setDataContainer(data)
            self.basename = kwargs.pop('name', 'new')
コード例 #2
0
    def __init__(self, managers, trans, verbose=False, debug=False, **kwargs):
        """TODO."""
        MethodManager.__init__(self, verbose=verbose, debug=debug, **kwargs)

        self.managers = managers
        self.trans = trans
        self.fops = []
        self.dataVals = pg.RVector(0)
        self.dataErrs = pg.RVector(0)
        self.mod = pg.RVector(0)  # resulting model
        self.data = None

        self.tD = pg.RTransCumulative()
        self.tM = managers[0].tM

        for mgr in self.managers:
            fop = mgr.createFOP(verbose)
            fop.setVerbose(verbose=verbose)
            self.fops.append(fop)

        self.fop.setFopsAndTrans(self.fops, self.trans)
コード例 #3
0
ファイル: refraction.py プロジェクト: ziogibom/gimli
def main():
    """Main"""
    parser = MethodManager.createArgParser(dataSuffix='sgt')
    options = parser.parse_args()

    ra = Refraction(verbose=not options.quiet, debug=pg.debug())

    ra.loadData(options.dataFileName)

    ra.showData()
    ra.showVA()
    ra.createMesh(depth=options.depth)
    ra.showMesh()
    ra.invert(lam=options.lam, max_iter=options.maxIter,
              robustData=options.robustData, blockyModel=options.blockyModel)
    ra.showResult()
コード例 #4
0
ファイル: refraction.py プロジェクト: gimli-org/gimli
def main():
    """Main"""
    parser = MethodManager.createArgParser(dataSuffix='sgt')
    options = parser.parse_args()

    ra = Refraction(verbose=not options.quiet, debug=pg.debug())

    ra.loadData(options.dataFileName)

    ra.showData()
    ra.showVA()
    ra.createMesh(depth=options.depth)
    ra.showMesh()
    ra.invert(lam=options.lam, max_iter=options.maxIter,
              robustData=options.robustData, blockyModel=options.blockyModel)
    ra.showResult()