Python: Rename example directory to PythonExamples

* This is so that when we add the folder to the Script Path it will look more sensible to the user.
This commit is contained in:
Gaute Lindkvist
2019-08-15 08:07:43 +02:00
parent 4d8ce1e399
commit 824ec5cef6
20 changed files with 33 additions and 23 deletions

View File

@@ -0,0 +1,24 @@
import rips
import time
def createResult(poroChunks, permxChunks):
for (poroChunk, permxChunk) in zip(poroChunks, permxChunks):
resultChunk = []
for (poro, permx) in zip(poroChunk.values, permxChunk.values):
resultChunk.append(poro * permx)
yield resultChunk
resInsight = rips.Instance.find()
start = time.time()
case = resInsight.project.case(id=0)
poroChunks = case.properties.activeCellPropertyAsync('STATIC_NATIVE', 'PORO', 0)
permxChunks = case.properties.activeCellPropertyAsync('STATIC_NATIVE', 'PERMX', 0)
case.properties.setActiveCellPropertyAsync(createResult(poroChunks, permxChunks),
'GENERATED', 'POROPERMXAS', 0)
end = time.time()
print("Time elapsed: ", end - start)
print("Transferred all results back")