Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
changed initial position of the horizon slider
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-bougher committed Oct 25, 2015
1 parent 1ee56f6 commit 3a4e5a9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
$scope.twt = 0;
$scope.twtStr = "0";
$scope.gain = 1;
$scope.twt = 0;
$scope.gainStr = "1";
$scope.maxGain = "10";
$scope.frequency = 20;
Expand Down Expand Up @@ -174,6 +175,12 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
var payload = JSON.stringify(data);
$http.get($scope.server + '/data.json?type=seismic&script=convolution_model.py&payload=' + payload)
.then(function(response){

// set better horizon defaults
if($scope.updateClicked === undefined){

$scope.twt = (response.data.seismic.length / 2) * response.data.dt;
};
console.log(response.data);
$scope.plot(response.data);
$scope.maxTrace = String(response.data.seismic.length - 1);
Expand Down Expand Up @@ -821,6 +828,7 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
$scope.colorDomain = [-max, 0, max];
}


$scope.colorScale = d3.scale.linear().domain($scope.colorDomain).range($scope.colorRange);
$scope.plotSeismic(data, height, max);
$scope.plotOffset(data, height, max);
Expand Down
8 changes: 8 additions & 0 deletions static/js/controllers/2DCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
$scope.twt = 0;
$scope.twtStr = "0";
$scope.gain = 1;
$scope.twt = 0;
$scope.gainStr = "1";
$scope.maxGain = "10";
$scope.frequency = 20;
Expand Down Expand Up @@ -164,6 +165,12 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
var payload = JSON.stringify(data);
$http.get($scope.server + '/data.json?type=seismic&script=convolution_model.py&payload=' + payload)
.then(function(response){

// set better horizon defaults
if($scope.updateClicked === undefined){

$scope.twt = (response.data.seismic.length / 2) * response.data.dt;
};
console.log(response.data);
$scope.plot(response.data);
$scope.maxTrace = String(response.data.seismic.length - 1);
Expand Down Expand Up @@ -811,6 +818,7 @@ app.controller('2DCtrl', function ($scope, $http, $alert, $timeout) {
$scope.colorDomain = [-max, 0, max];
}


$scope.colorScale = d3.scale.linear().domain($scope.colorDomain).range($scope.colorRange);
$scope.plotSeismic(data, height, max);
$scope.plotOffset(data, height, max);
Expand Down

0 comments on commit 3a4e5a9

Please sign in to comment.