OSDN Git Service

syncro for iwasaki_mac
authoriwasaki <iwaaya@yasunaga-lab.bio.kyutech.ac.jp>
Mon, 30 Nov 2015 08:11:47 +0000 (17:11 +0900)
committeriwasaki <iwaaya@yasunaga-lab.bio.kyutech.ac.jp>
Mon, 30 Nov 2015 08:11:47 +0000 (17:11 +0900)
vem/.feicontrol.rb.un~
vem/feicontrol.rb
vem/feicontrol.rb~
vemapi/app/.vemapi.rb.un~
vemapi/app/vemapi.rb
vemapi/app/vemapi.rb~

index b5f0980..e2c9776 100644 (file)
Binary files a/vem/.feicontrol.rb.un~ and b/vem/.feicontrol.rb.un~ differ
index 4c9c82a..e8e4f6e 100644 (file)
@@ -25,7 +25,7 @@ class FEIControl < VEM
   def setStageR(x, y, z, a)
 
     puts "FEI setStageR"
-    o,s = Open3.capture2("cscript vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
+    o,s = Open3.capture2("cscript ../../vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
     position = o.lines.to_a[3]
     puts position
     return position
@@ -96,7 +96,7 @@ class FEIControl < VEM
     # exposuretime
     ccdCamerasAcqParams.ExposureTime = 0.07
     # imagesize
-    ccdCamerasAcqParams.ImageSize = 2
+    ccdCamerasAcqParams.ImageSize = 0
 
     # ---end
 
@@ -119,14 +119,15 @@ class FEIControl < VEM
 
     img255 = Array.new(imgLength){ Array.new(imgLength) }
 
-    imgLength.times do |y|
-      imgLength.times do |x|
-        img255[y][x] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
+    imgLength.times do |x|
+      imgLength.times do |y|
+        img255[y][x] = ((imgData[x][y]-imgMin.to_f)*conversion).to_i
       end
     end
     
     # ---end
     
+    puts imgLength
 
     return img255.to_json
   end
index 72702e7..b05fd4f 100644 (file)
@@ -25,7 +25,7 @@ class FEIControl < VEM
   def setStageR(x, y, z, a)
 
     puts "FEI setStageR"
-    o,s = Open3.capture2("cscript vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
+    o,s = Open3.capture2("cscript ../../vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
     position = o.lines.to_a[3]
     puts position
     return position
@@ -76,7 +76,7 @@ class FEIControl < VEM
     return imgData.to_json
   end
 
-  def acquisitiona255
+  def acquisition255
     puts "FEI acquisition"
 
     WIN32OLE.ole_initialize    
@@ -96,7 +96,7 @@ class FEIControl < VEM
     # exposuretime
     ccdCamerasAcqParams.ExposureTime = 0.07
     # imagesize
-    ccdCamerasAcqParams.ImageSize = 2
+    ccdCamerasAcqParams.ImageSize = 0
 
     # ---end
 
@@ -119,15 +119,15 @@ class FEIControl < VEM
 
     img255 = Array.new(imgLength){ Array.new(imgLength) }
 
-    imgLength.times do |y|
-      imgLength.times do |x|
-        img255[y][x] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
+    imgLength.times do |x|
+      imgLength.times do |y|
+        img255[x][y] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
       end
     end
     
     # ---end
     
-    puts "flag"
+    puts imgLength
 
     return img255.to_json
   end
index e0fc6b8..2635cc9 100644 (file)
Binary files a/vemapi/app/.vemapi.rb.un~ and b/vemapi/app/.vemapi.rb.un~ differ
index 2c50f2a..083bd34 100644 (file)
@@ -36,7 +36,7 @@ set :environment, :production
        # "#{result}"
     end
 
-    get '/:emname/set/setstager' do
+    get '/:emname/set/stager' do
          headers \
             "Access-Control-Allow-origin" => "*"
         @@vem = VEM.create("#{params[:emname]}");
index 85367c6..2c50f2a 100644 (file)
@@ -1,11 +1,11 @@
 #!/usr/bin/env ruby -I c:/Users/iwasaki/gem/sinatra-master/lib -I lib
 
 require 'sinatra/base'
-require './vem/vem'
+require '../../vem/vem'
 #require './vem/hitachicontrol'
-require './vem/feicontrol'
+require '../../vem/feicontrol'
 #require 'vem/jeolcontrol'
-require './vem/test'
+require '../../vem/test'
 
 class Vemapi < Sinatra::Base