Skip to content

Commit

Permalink
Fix covariance calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-wagner committed Jul 3, 2024
1 parent 0e224d3 commit 4678a1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions code/scripts/synthetic_case/7_calc_model_covariance.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import matplotlib.pyplot as plt
import numpy as np

import pybert as pb
import pygimli as pg
import pygimli.meshtools as mt
from fpinv import FourPhaseModel
from pybert.manager import ERTManager
from pygimli.physics import ERTManager
from pygimli.physics import ert
from pygimli.physics import Refraction
from pygimli.physics.traveltime import createRAData
from pygimli.physics.traveltime import createRAData, simulate

ertSIM = ert.simulate
srtSIM = simulate

def forward4PM(meshERT, meshRST, schemeERT, schemeSRT, Fx):
"""Forward response of fx."""
ert = ERTManager()
srt = Refraction()
phi = 1 - Fx[-1]
fpm = FourPhaseModel(phi=phi)
rho = fpm.rho(*Fx)
Expand All @@ -23,8 +23,8 @@ def forward4PM(meshERT, meshRST, schemeERT, schemeSRT, Fx):
rhoVec = rho[meshERT.cellMarkers()] # needs to be copied!
sloVec = slo[meshRST.cellMarkers()]

dataERT = ert.simulate(meshERT, rhoVec, schemeERT)
dataSRT = srt.simulate(meshRST, sloVec, schemeSRT)
dataERT = ertSIM(meshERT, schemeERT, rhoVec)
dataSRT = srtSIM(meshRST, schemeSRT, sloVec)
return dataERT, dataSRT


Expand Down
2 changes: 1 addition & 1 deletion code/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DESCRIPTION = "Joint inversion of seismic refraction and electrical resistivity data to estimate water, ice, and air contents."
LONG_DESCRIPTION = DESCRIPTION

VERSION = '1.0'
VERSION = '1.1'

PACKAGES = find_packages()
SCRIPTS = []
Expand Down

0 comments on commit 4678a1d

Please sign in to comment.