[segyio] 276/376: Correctly adjust mex/t0 argument to milliseconds

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 84b95dd1c2289a5549ac63fa3d3c0eeb7fea06e3
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Thu Apr 20 12:36:50 2017 +0200

    Correctly adjust mex/t0 argument to milliseconds
    
    interpret_segycube expects its t0 argument in milliseconds, but the
    underlying C functionality uses microseconds (to have consistent units
    with sample rate).
---
 mex/SegySpec.m     | 2 +-
 mex/segyspec_mex.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mex/SegySpec.m b/mex/SegySpec.m
index a30eec2..039379a 100644
--- a/mex/SegySpec.m
+++ b/mex/SegySpec.m
@@ -33,7 +33,7 @@ classdef SegySpec
 
             obj.sample_format = uint32(SegySampleFormat(spec.sample_format));
             obj.trace_sorting_format = TraceSortingFormat(spec.trace_sorting_format);
-            obj.sample_indexes = spec.sample_indexes;
+            obj.sample_indexes = spec.sample_indexes / 1000.0;
             obj.crossline_indexes = uint32(spec.crossline_indexes);
             obj.inline_indexes = uint32(spec.inline_indexes);
             obj.offset_count = uint32(spec.offset_count);
diff --git a/mex/segyspec_mex.c b/mex/segyspec_mex.c
index 936bd9d..d55cf36 100644
--- a/mex/segyspec_mex.c
+++ b/mex/segyspec_mex.c
@@ -97,7 +97,7 @@ void mexFunction( int nlhs, mxArray *plhs[],
     double dt = mxGetScalar(prhs[4]);
 
     SegySpec spec;
-    int errc = segyCreateSpec(&spec, filename, il, xl, t0, dt);
+    int errc = segyCreateSpec(&spec, filename, il, xl, t0 * 1000.0, dt);
     if (errc != 0) {
         goto FAILURE;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list