petrel - Writing to a seismic cube in ocean using using 3D array -



petrel - Writing to a seismic cube in ocean using using 3D array -

i read samples seismic cube using

int numi = inputscube.numsamplesijk.i; int numj = inputscube.numsamplesijk.j; int numk = inputscube.numsamplesijk.k; double[, ,] inputseismiccubedata = new double[numi, numj, numk]; (int = 0; < numi; i++) { (int j = 0; j < numj; j++) { itrace trace = inputscube.gettrace(i, j); (int k = 0; k < numk; k++) { inputseismiccubedata[i, j, k] = trace[k]; } } }

after applying algorithms generated output seismic info 3d array of same size inputseismiccubedata

and worte info cube as

using (itransaction trans1 = datamanager.newtransaction()) { seismiccollection sc = inputscube.seismiccollection; trans1.lock(sc); if (sc.cancreateseismiccube(inputscube)) { seismiccube newcube = sc.createseismiccube(inputscube, inputscube.template); if (!newcube.iswritable) { petrellogger.errorbox("unable write cloned cube"); return; } (int = 0; < numi; i++) { (int j = 0; j < numj; j++) { itrace trace = newcube.gettrace(i, j); (int k = 0; k < trace.length; k++) { trace[k] = (float)outputseismiccubedata[i, j, k]; } } } trans1.commit(); arguments.outputscube = newcube; } }

code compiling , running doesn't makes sense, seems if samples jumbled. help appriciated

i not see issue code have in place. there tools in ocean api seismiccube may help , create more performant.

first, have @ method getsubcube( index3, index3 ). creates in memory portion of seismiccube. has method, toarray, provide 3 dimensional array of cube samples doing. method, copyfrom, re-create samples 3 dimensional array isubcube. if original seismiccube (the output in case), locked, isubcube info values placed seismiccube.

so processing downwards through generating info output same. after creating output cube create isubcube (0,0,0) (numi-1, numj-1, numk-1). utilize copyfrom method re-create output array isubcube , since output seismiccube locked when created info in isubcube should placed in it.

ocean petrel

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -