OSDN Git Service

rm many file
authoriwasaki <iwaaya@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 25 Sep 2015 06:55:23 +0000 (08:55 +0200)
committeriwasaki <iwaaya@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 25 Sep 2015 06:55:23 +0000 (08:55 +0200)
36 files changed:
vem_fei/.druby_server.rb.un~ [deleted file]
vem_fei/.feicontrol.rb.un~ [deleted file]
vem_fei/.feiserver.rb.un~ [deleted file]
vem_fei/.test.rb.un~ [deleted file]
vem_fei/.vem.rb.un~ [deleted file]
vem_fei/feiserver.rb [deleted file]
vem_fei/vem/.feicontrol.rb.un~ [deleted file]
vem_fei/vem/.test.rb.un~ [deleted file]
vem_fei/vem/feicontrol.rb [deleted file]
vem_fei/vem/feicontrol.rb~ [deleted file]
vem_fei/vem/hitachicontrol.rb [deleted file]
vem_fei/vem/jeolcontrol.rb [deleted file]
vem_fei/vem/test.rb [deleted file]
vem_fei/vem/test.rb~ [deleted file]
vem_fei/vem/tool/.getCondition.js.swp [deleted file]
vem_fei/vem/tool/.setStageR.js.un~ [deleted file]
vem_fei/vem/tool/getCondition.js [deleted file]
vem_fei/vem/tool/setBeamTilt.js [deleted file]
vem_fei/vem/tool/setMagnification.js [deleted file]
vem_fei/vem/tool/setObj.js [deleted file]
vem_fei/vem/tool/setSpeed.js [deleted file]
vem_fei/vem/tool/setSpotSize.js [deleted file]
vem_fei/vem/tool/setStageA.js [deleted file]
vem_fei/vem/tool/setStageA.js~ [deleted file]
vem_fei/vem/tool/setStageR.js [deleted file]
vem_fei/vem/tool/setStageR.js~ [deleted file]
vem_fei/vem/vem.rb [deleted file]
vemapi/app/config.rb [deleted file]
vemapi/app/feicontrol.rb [deleted file]
vemapi/app/feicontrol_back.rb [deleted file]
vemapi/app/hitachicontrol.rb [deleted file]
vemapi/app/jeolcontrol.rb [deleted file]
vemapi/app/test/feiserver.rb [deleted file]
vemapi/app/test/test_feicontrol.rb [deleted file]
vemapi/app/test/vemapi_test.rb [deleted file]
vemapi/app/vem.rb [deleted file]

diff --git a/vem_fei/.druby_server.rb.un~ b/vem_fei/.druby_server.rb.un~
deleted file mode 100644 (file)
index 55ef1a2..0000000
Binary files a/vem_fei/.druby_server.rb.un~ and /dev/null differ
diff --git a/vem_fei/.feicontrol.rb.un~ b/vem_fei/.feicontrol.rb.un~
deleted file mode 100644 (file)
index 0d59f83..0000000
Binary files a/vem_fei/.feicontrol.rb.un~ and /dev/null differ
diff --git a/vem_fei/.feiserver.rb.un~ b/vem_fei/.feiserver.rb.un~
deleted file mode 100644 (file)
index ae98e9e..0000000
Binary files a/vem_fei/.feiserver.rb.un~ and /dev/null differ
diff --git a/vem_fei/.test.rb.un~ b/vem_fei/.test.rb.un~
deleted file mode 100644 (file)
index 94b28a4..0000000
Binary files a/vem_fei/.test.rb.un~ and /dev/null differ
diff --git a/vem_fei/.vem.rb.un~ b/vem_fei/.vem.rb.un~
deleted file mode 100644 (file)
index 8366bff..0000000
Binary files a/vem_fei/.vem.rb.un~ and /dev/null differ
diff --git a/vem_fei/feiserver.rb b/vem_fei/feiserver.rb
deleted file mode 100644 (file)
index c29bf81..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-require "socket"
-
-
-class FEIServer
-@@flag = true
-
-def initialize()
-       @server = TCPServer.open("2000")
-       puts @server.to_s
-       end
-
-       def listener
-       while @@flag 
-       Thread.start(@server.accept){|socket|
-               begin
-                       data = socket.gets.chomp
-                       data = JSON.parse(data)
-
-                       puts data
-
-                       method = data["method"]
-
-                       case method
-                       when "getCondition"
-                       o,s = Open3.capture2("cscript tool/getCondition.js")
-
-                       when "setStageA" 
-                       o,s = Open3.capture2("cscript tool/setStageA.js "+data["X"]+ " " +data["Y"]+ " " +data["Z"]+ " " +data["A"])
-
-                       when "setStageR" 
-                       o,s = Open3.capture2("cscript tool/setStageR.js "+data["X"]+ " " +data["Y"]+ " " +data["Z"]+ " " +data["A"])
-
-                       when "setSpotSize"
-                       o,s = Open3.capture2("cscript tool/setSpotSize.js " +data["SpotSizeIndex"])
-
-                       when "setMagnification" 
-                       o,s = Open3.capture2("cscript tool/setMagnification.js " +data["MagIndex"])
-
-                       when "setObj"
-                       o,s = Open3.capture2("cscript tool/setObj.js " +data["Obj"])
-
-                       when "setBeamTilt" 
-                       o,s = Open3.capture2("cscript tool/setBeamTilt.js " +data["BeamTiltX"]+ " " +data["BeamTiltY"] )
-
-                       when "setSpeed"
-                       puts "no implement"
-                       else 
-                               end
-
-                                       strAry = o.split("\n")
-
-                                       puts strAry[3]
-                                       socket.puts strAry[3]
-
-                                       ensure
-                                       socket.close
-                                       end
-       }
-end
-end
-end
-
-
-feiserver = FEIServer.new
-feiserver.listener
diff --git a/vem_fei/vem/.feicontrol.rb.un~ b/vem_fei/vem/.feicontrol.rb.un~
deleted file mode 100644 (file)
index 82af058..0000000
Binary files a/vem_fei/vem/.feicontrol.rb.un~ and /dev/null differ
diff --git a/vem_fei/vem/.test.rb.un~ b/vem_fei/vem/.test.rb.un~
deleted file mode 100644 (file)
index 10410e7..0000000
Binary files a/vem_fei/vem/.test.rb.un~ and /dev/null differ
diff --git a/vem_fei/vem/feicontrol.rb b/vem_fei/vem/feicontrol.rb
deleted file mode 100644 (file)
index 93fecc5..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-require "win32ole"
-require "open3"
-
-require "./vem"
-
-
-
-class FEIControl < VEM
-       def initialize
-               puts "FEI initialize"
-
-               @@tem = WIN32OLE.new('TEMScripting.Instrument')
-       end
-
-       def setStageA(x, y, z, a)
-               puts "FEI setStageA"
-
-               o,s = Open3.capture2("cscript tool/setStageA.js " + x.to_s + " " + y.to_s + " " + z.to_s + " " + a.to_s)
-               position = o.lines.to_a[3]
-               puts position
-               return position
-       end
-
-       def setStageR(x, y, z, a)
-
-               puts "FEI setStageR"
-               o,s = Open3.capture2("cscript 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
-       end
-
-       def setSpotSize(spsize)
-               puts "FEI setSpotSize"
-
-               ill    = @@tem.Illumination
-               ill.SpotsizeIndex = ill.SpotsizeIndex + spsize
-               return ill.SpotsizeIndex
-       end
-
-       def setMagnification(magsize)
-               puts "FEI setMagnification"
-
-               proj = @@tem.Projection
-               proj.MagnificationIndex = proj.MagnificationIndex + magsize
-               return proj.MagnificationIndex
-       end
-
-       def acquisition
-               puts "FEI acquition"
-
-               # get acquitision object
-               acq = @@tem.Acquisition
-
-               # acquire an image from "CCD" camera
-               acq.AddAcqDeviceByName("CCD")
-               imageCollection = acq.AcquireImages
-
-               img     = imageCollection.Item(0)
-               imgData = img.AsSafeArray
-               return imgData
-       end
-
-       def setObj(params)
-               puts "FEI setObj"
-       end
-
-       def setBeamTilt(params)
-               puts "FEI setBeamTilt"
-       end
-
-       def setSpeed(params)
-       end
-
-       def getCondition
-               puts "FEI getCondition"
-       end
-end
-
diff --git a/vem_fei/vem/feicontrol.rb~ b/vem_fei/vem/feicontrol.rb~
deleted file mode 100644 (file)
index 75ef7f4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-require "win32ole"
-require "open3"
-
-require "./vem"
-
-
-
-class FEIControl < VEM
-       def initialize
-               puts "FEI initialize"
-
-               @@tem = WIN32OLE.new('TEMScripting.Instrument')
-       end
-
-       def setStageA(x, y, z, a)
-               puts "FEI setStageA"
-
-               o,s = Open3.capture2("cscript tool/setStageA.js " + x.to_s + " " + y.to_s + " " + z.to_s + " " + a.to_s)
-               position = o.lines.to_a[3]
-               puts position
-               return position
-       end
-
-       def setStageR(x, y, z, a)
-
-               puts "FEI setStageR"
-               o,s = Open3.capture2("cscript 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
-       end
-
-       def setSpotSize(spsize)
-               puts "FEI setSpotSize"
-
-#              @@tem = WIN32OLE.new('TEMScripting.Instrument')
-               ill    = @@tem.Illumination
-               ill.SpotsizeIndex = ill.SpotsizeIndex + spsize
-               return ill.SpotsizeIndex
-       end
-
-       def setMagnification(magsize)
-               puts "FEI setMagnification"
-
-       
-               @@tem = WIN32OLE.new('TEMScripting.Instrument')
-               proj = @@tem.Projection
-               proj.MagnificationIndex = proj.MagnificationIndex + magsize
-               return proj.MagnificationIndex
-       end
-
-       def acquisition
-               puts "FEI acquition"
-
-               # get acquitision object
-               acq = @@tem.Acquisition
-
-               # acquire an image from "CCD" camera
-               acq.AddAcqDeviceByName("CCD")
-               imageCollection = acq.AcquireImages
-
-               img     = imageCollection.Item(0)
-               imgData = img.AsSafeArray
-               return imgData
-       end
-
-       def setObj(params)
-               puts "FEI setObj"
-       end
-
-       def setBeamTilt(params)
-               puts "FEI setBeamTilt"
-       end
-
-       def setSpeed(params)
-       end
-
-       def getCondition
-               puts "FEI getCondition"
-       end
-end
-
diff --git a/vem_fei/vem/hitachicontrol.rb b/vem_fei/vem/hitachicontrol.rb
deleted file mode 100644 (file)
index c3887f9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-require "./vem"
-
-class HITACHIControl < VEM
-    @@condition = {
-        "TEM"    => "HITACHI",
-        "GonioX" => 0,
-        "GonioY" => 0,
-        "GonioZ" => 0,
-        "GonioA" => 0,
-        "SpotSizeIndex" => 0,
-        "MagIndex" => 0,
-        "Obj" => 0,
-        "BeamTiltX" => 0,
-        "BeamTiltY" => 0,
-        "Speed" => 0
-    }
-
-    def initialize
-    end
-
-    def setStageA(params)
-        @@condition["GonioX"] = params["x"]
-        @@condition["GonioY"] = params["y"]
-        @@condition["GonioZ"] = params["z"]
-        @@condition["GonioA"] = params["a"]
-        return @@condition.to_json
-    end
-
-    def setStageR(params)
-    end
-
-    def setSpotSize(params)
-        @@condition["SpotSizeIndex"] = params["sps"]
-        return @@condition.to_json
-    end
-
-    def setMagnification(params)        
-        @@condition["MagIndex"] = params["mag"]
-        return @@condition.to_json
-    end
-
-    def setObj(params)
-        @@condition["Obj"] = params["obj"]
-        return @@condition.to_json
-    end
-
-    def setBeamTilt(params)
-        @@condition["BeamTiltX"] = params["btx"]
-        @@condition["BeamTiltY"] = params["bty"]
-        return @@condition.to_json
-    end
-
-    def setSpeed(params)
-        @@condition["Speed"] = params["sp"]
-        return @@condition.to_json
-    end
-
-    def getCondition
-        return @@condition.to_json
-    end
-end
-
diff --git a/vem_fei/vem/jeolcontrol.rb b/vem_fei/vem/jeolcontrol.rb
deleted file mode 100644 (file)
index 38c77c7..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-require "./vem"
-
-class JEOLControl < VEM
-     @@condition = {
-         "TEM" => "JEOL",
-        "GonioX" => 0,
-        "GonioY" => 0,
-        "GonioZ" => 0,
-        "GonioA" => 0,
-        "SpotSizeIndex" => 0,
-        "MagIndex" => 0,
-        "Obj" => 0,
-        "BeamTiltX" => 0,
-        "BeamTiltY" => 0,
-        "Speed" => 0
-    }
-
-    def initialize
-    end
-
-    def setStageA(params)
-        @@condition["GonioX"] = params["x"]
-        @@condition["GonioY"] = params["y"]
-        @@condition["GonioZ"] = params["z"]
-        @@condition["GonioA"] = params["a"]
-        return @@condition.to_json
-    end
-
-    def setStageR(params)
-    end
-
-    def setSpotSize(params)
-        @@condition["SpotSizeIndex"] = params["sps"]
-        return @@condition.to_json
-    end
-
-    def setMagnification(params)        
-        @@condition["MagIndex"] = params["mag"]
-        return @@condition.to_json
-    end
-
-    def setObj(params)
-        @@condition["Obj"] = params["obj"]
-        return @@condition.to_json
-    end
-
-    def setBeamTilt(params)
-        @@condition["BeamTiltX"] = params["btx"]
-        @@condition["BeamTiltY"] = params["bty"]
-        return @@condition.to_json
-    end
-
-    def setSpeed(params)
-        @@condition["Speed"] = params["sp"]
-        return @@condition.to_json
-    end
-
-    def getCondition
-        return @@condition.to_json
-    end
-end
-
diff --git a/vem_fei/vem/test.rb b/vem_fei/vem/test.rb
deleted file mode 100644 (file)
index 0a4407e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-require "./vem"
-require "./feicontrol"
-
-class TEST
-       def initialize
-               @@vem = VEM.create("fei")
-       end
-
-       def test_setStageA
-               @@vem.setStageA(2, 0, 0, 0)
-       end
-
-       def test_setStageR
-               @@vem.setStageR(1, 0, 0, 0)
-       end
-
-       def test_setSpotSize
-               @@vem.setSpotSize(1)
-       end
-
-       def test_acquisition
-               @@vem.acquisition
-       end
-end
-
-test = TEST.new
-test.test_setSpotSize
-
diff --git a/vem_fei/vem/test.rb~ b/vem_fei/vem/test.rb~
deleted file mode 100644 (file)
index c40fbf5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-require "./vem"
-require "./feicontrol"
-
-class TEST
-       def initialize
-               @@vem = VEM.create("fei")
-       end
-
-       def test_setStageA
-               @@vem.setStageA(2, 0, 0, 0)
-       end
-
-       def test_setStageR
-               @@vem.setStageR(1, 0, 0, 0)
-       end
-
-       def test_setSpotSize
-               @@vem.setSpotSize(1)
-       end
-
-       def test_acquisition
-               @@vem.acquisition
-       end
-end
-
-test = TEST.new
-test.test_acquisition
-
diff --git a/vem_fei/vem/tool/.getCondition.js.swp b/vem_fei/vem/tool/.getCondition.js.swp
deleted file mode 100644 (file)
index b59cb28..0000000
Binary files a/vem_fei/vem/tool/.getCondition.js.swp and /dev/null differ
diff --git a/vem_fei/vem/tool/.setStageR.js.un~ b/vem_fei/vem/tool/.setStageR.js.un~
deleted file mode 100644 (file)
index e959e65..0000000
Binary files a/vem_fei/vem/tool/.setStageR.js.un~ and /dev/null differ
diff --git a/vem_fei/vem/tool/getCondition.js b/vem_fei/vem/tool/getCondition.js
deleted file mode 100644 (file)
index d71a429..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-var m;
-var Proj;
-var Ill;
-
-m = new ActiveXObject("TEMScripting.Instrument");
-
-Proj = m.Projection;
-Ill = m.Illumination;
-
-var data = {
-X:m.Stage.Position.X*1000000,
-Y:m.Stage.Position.Y*1000000,
-Z:m.Stage.Position.Z*1000000,
-A:m.Stage.Position.A*3.14159/180.0,
-SpotSizeIndex:Ill.SpotsizeIndex,
-Mag:Proj.Magnification
-//Obj:,
-//BeamTiltX:,
-//BeamTiltY:
-};
-
-WScript.echo('{"X":'+data["X"]+', "Y":'+data["Y"]+', "Z":'+data["Z"]+', "A":'+data["A"]+', "SpotSizeIndex":'+data["SpotSizeIndex"]+', "Mag":'+data["Mag"]+'}');
-
diff --git a/vem_fei/vem/tool/setBeamTilt.js b/vem_fei/vem/tool/setBeamTilt.js
deleted file mode 100644 (file)
index c2a16db..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-var m;
-var proj;
-var magIndex;
-
-var objParm = WScript.arguments;
-
-magIndex = objParm(0);
-
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create Projection object
-proj = m.Projection;
-
-
-
-WScript.echo(proj.Magnification, proj.MagnificationIndex);
-
-//proj.MagnificationIndex = 30;
-
-//WScript.echo(proj.Magnification, proj.MagnificationIndex);
-
diff --git a/vem_fei/vem/tool/setMagnification.js b/vem_fei/vem/tool/setMagnification.js
deleted file mode 100644 (file)
index 1f0bdea..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-var m;
-var proj;
-var magIndex;
-
-var objParm = WScript.arguments;
-
-magIndex = objParm(0);
-
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create Projection object
-proj = m.Projection;
-proj.MagnificationIndex = magIndex;
-
-
-WScript.echo('{"Mag":'+proj.Magnification+', "MagIndex":'+proj.MagnificationIndex+'}');
-
-
diff --git a/vem_fei/vem/tool/setObj.js b/vem_fei/vem/tool/setObj.js
deleted file mode 100644 (file)
index c2a16db..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-var m;
-var proj;
-var magIndex;
-
-var objParm = WScript.arguments;
-
-magIndex = objParm(0);
-
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create Projection object
-proj = m.Projection;
-
-
-
-WScript.echo(proj.Magnification, proj.MagnificationIndex);
-
-//proj.MagnificationIndex = 30;
-
-//WScript.echo(proj.Magnification, proj.MagnificationIndex);
-
diff --git a/vem_fei/vem/tool/setSpeed.js b/vem_fei/vem/tool/setSpeed.js
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/vem_fei/vem/tool/setSpotSize.js b/vem_fei/vem/tool/setSpotSize.js
deleted file mode 100644 (file)
index bebe8bc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-var m;
-var ill;
-var spsize;
-
-var objParm = WScript.arguments;
-
-m = new ActiveXObject("TEMScripting.Instrument");
-
-ill = m.Illumination;
-
-spsize = objParm(0);
-
-ill.SpotsizeIndex = spsize;
-
-WScript.echo('{"SpotSizeIndex":'+ill.SpotsizeIndex+'}');
diff --git a/vem_fei/vem/tool/setStageA.js b/vem_fei/vem/tool/setStageA.js
deleted file mode 100644 (file)
index ea4506a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-var m;
-var Position;
-var x;
-var y;
-var z;
-var a;
-var b;
-
-var objParm = WScript.arguments;
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create StagePosition object
-Position = new m.StagePosition(0,0,0,0,0);
-
-x = objParm(0)*1e-7;
-y = objParm(1)*1e-7;
-z = objParm(2)*1e-7;
-a = objParm(3) * 3.14159/180.0;
-
-Position.X = x;
-Position.Y = y;
-Position.Z = z;
-Position.A = a;
-
-
-//move stage
-m.Stage.GoTo(Position, 15);
-
-var data = {
-x:m.Stage.Position.X * 1000000,
-y:m.Stage.Position.Y * 1000000,
-z:m.Stage.Position.Z * 1000000,
-a:m.Stage.Position.A * 180.0/3.14159
-};
-
-
-WScript.echo('{"X":'+data["x"]+', "Y":'+data["y"]+', "Z":'+data["z"]+', "A":'+data["a"]+'}');
diff --git a/vem_fei/vem/tool/setStageA.js~ b/vem_fei/vem/tool/setStageA.js~
deleted file mode 100644 (file)
index ea4506a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-var m;
-var Position;
-var x;
-var y;
-var z;
-var a;
-var b;
-
-var objParm = WScript.arguments;
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create StagePosition object
-Position = new m.StagePosition(0,0,0,0,0);
-
-x = objParm(0)*1e-7;
-y = objParm(1)*1e-7;
-z = objParm(2)*1e-7;
-a = objParm(3) * 3.14159/180.0;
-
-Position.X = x;
-Position.Y = y;
-Position.Z = z;
-Position.A = a;
-
-
-//move stage
-m.Stage.GoTo(Position, 15);
-
-var data = {
-x:m.Stage.Position.X * 1000000,
-y:m.Stage.Position.Y * 1000000,
-z:m.Stage.Position.Z * 1000000,
-a:m.Stage.Position.A * 180.0/3.14159
-};
-
-
-WScript.echo('{"X":'+data["x"]+', "Y":'+data["y"]+', "Z":'+data["z"]+', "A":'+data["a"]+'}');
diff --git a/vem_fei/vem/tool/setStageR.js b/vem_fei/vem/tool/setStageR.js
deleted file mode 100644 (file)
index 25ec306..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-var m;
-var Position;
-var x;
-var y;
-var z;
-var a;
-var b;
-
-var objParm = WScript.arguments;
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create StagePosition object
-Position = new m.StagePosition(0,0,0,0,0);
-
-x = objParm(0)*1e-7;
-y = objParm(1)*1e-7;
-z = objParm(2)*1e-7;
-a = objParm(3) * 3.14159/180.0;
-
-Position.X = m.Stage.Position.X + x;
-Position.Y = m.Stage.Position.Y + y;
-Position.Z = m.Stage.Position.Z + z;
-Position.A = m.Stage.Position.A + a;
-
-
-//move stage
-m.Stage.GoTo(Position, 15);
-
-var data = {
-x:m.Stage.Position.X*1000000,
-y:m.Stage.Position.Y*1000000,
-z:m.Stage.Position.Z*1000000,
-a:m.Stage.Position.A
-};
-
-
-WScript.echo(data["x"], data["y"], data["z"], data["a"]);
diff --git a/vem_fei/vem/tool/setStageR.js~ b/vem_fei/vem/tool/setStageR.js~
deleted file mode 100644 (file)
index 01a3480..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-var m;
-var Position;
-var x;
-var y;
-var z;
-var a;
-var b;
-
-var objParm = WScript.arguments;
-
-//create TEMScripting Scripting
-m = new ActiveXObject("TEMScripting.Instrument");
-
-//create StagePosition object
-Position = new m.StagePosition(0,0,0,0,0);
-
-x = objParm(0)*1e-6;
-y = objParm(1)*1e-6;
-z = objParm(2)*1e-6;
-a = objParm(3) * 3.14159/180.0;
-
-Position.X = m.Stage.Position.X + x;
-Position.Y = m.Stage.Position.Y + y;
-Position.Z = m.Stage.Position.Z + z;
-Position.A = m.Stage.Position.A + a;
-
-
-//move stage
-m.Stage.GoTo(Position, 15);
-
-var data = {
-x:m.Stage.Position.X*1000000,
-y:m.Stage.Position.Y*1000000,
-z:m.Stage.Position.Z*1000000,
-a:m.Stage.Position.A
-};
-
-
-WScript.echo(data["x"], data["y"], data["z"], data["a"]);
diff --git a/vem_fei/vem/vem.rb b/vem_fei/vem/vem.rb
deleted file mode 100644 (file)
index f4d7197..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-
-class VEM
-
-    def self.create (inst)
-        if inst == "hitachi" then
-            HITACHIControl.new()
-        elsif inst == "fei" then
-            FEIControl.new()
-        elsif inst == "jeol" then
-            JEOLControl.new()
-        end
-    end
-
-    def initialize
-    end
-
-    def setStageA(x, y, z, a)
-    end
-
-    def setStageR(x, y, z, a)
-    end
-
-    def setSpotSize(spsize)
-    end
-
-    def setMagnification(magsize)
-    end
-
-    def setObj(params)
-    end
-
-    def setBeamTilt(params)
-    end
-
-    def setSpeed(params)
-    end
-
-    def getCondition
-    end
-end
diff --git a/vemapi/app/config.rb b/vemapi/app/config.rb
deleted file mode 100644 (file)
index 3ae3b48..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# FEI Connection
-
-FEI_IP_ADDRESS = '192.168.4.145'
-FEI_TCP_PORT   = 2000
diff --git a/vemapi/app/feicontrol.rb b/vemapi/app/feicontrol.rb
deleted file mode 100644 (file)
index d9fb290..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-require "socket"
-require "json"
-require "./vem"
-
-require './config'
-
-
-
-class FEIControl < VEM
-
-=begin
-    @@condition = {
-        "TEM" => "FEI",
-        "GonioX" => 0,
-        "GonioY" => 0,
-        "GonioZ" => 0,
-        "GonioA" => 0,
-        "SpotSizeIndex" => 0,
-        "MagIndex" => 0,
-        "Obj" => 0,
-        "BeamTiltX" => 0,
-        "BeamTiltY" => 0,
-        "Speed" => 0
-    }
-=end
-
-    def initialize
-        @tcp_port = FEI_TCP_PORT
-        @ip_address = FEI_IP_ADDRESS
-        @port = TCPSocket.new(@ip_address, @tcp_port)
-    end
-
-    def setStageA(params)
-        puts "FEI setStageA"
-
-        send_buf = {
-            :method => "setStageA",
-            :X => params["x"],
-            :Y => params["y"],
-            :Z => params["z"],
-            :A => params["a"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-
-        data = JSON.parse(get_buf)
-
-        return data.to_json
-    end
-
-    def setStageR(params)
-        puts "FEI setStageR"
-
-        send_buf = {
-            :method => "setStageR",
-            :X => params["x"],
-            :Y => params["y"],
-            :Z => params["z"],
-            :A => params["a"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-
-        return get_buf.to_json
-    end
-
-    def setSpotSize(params)
-        puts "FEI setSpotSize"
-
-        send_buf = {
-            :method => "setSpotSize",
-            :SpotSizeIndex => params["sps"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-
-        data = JSON.parse(get_buf)
-
-        return data.to_json
-    end
-
-    def setMagnification(params)        
-        puts "FEI setMagnification"
-
-        send_buf = {
-            :method => "setMagnification",
-            :MagIndex => params["mag"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-        data = JSON.parse(get_buf)
-
-        return data.to_json
-    end
-
-    def setObj(params)
-        puts "FEI setObj"
-
-        send_buf = {
-            :method => "setObj",
-            :Obj => params["obj"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-
-        return get_buf.to_json
-   end
-
-    def setBeamTilt(params)
-        puts "FEI setBeamTilt"
-
-        send_buf = {
-            :method => "setBeamTilt",
-            :BeamTiltX => params["btx"],
-            :BeamTiltY => params["bty"]
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        sock.close
-
-        return get_buf.to_json
-   end
-
-    def setSpeed(params)
-   end
-
-    def getCondition
-        puts "FEI getCondition"
-
-        send_buf = {
-            :method => "getCondition"
-        }
-
-        sock = TCPSocket.open(@ip_address, @tcp_port)
-        sock.puts send_buf.to_json
-        get_buf = sock.gets.chomp
-
-        data = JSON.parse(get_buf)
-
-        return data.to_json
-    end
-end
-
diff --git a/vemapi/app/feicontrol_back.rb b/vemapi/app/feicontrol_back.rb
deleted file mode 100644 (file)
index 09ecbb9..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-require "socket"
-require "json"
-require "./app/vem"
-
-require 'config'
-
-
-
-class FEIControl < VEM
-
-    def initialize
-        @tcp_port = FEI_TCP_PORT
-        @ip_address = FEI_IP_ADDRESS
-        @port = TCPSocket.new(@ip_address, @tcp_port)
-    end
-
-    def stageseta(data)
-
-        puts "FEI StagesetA"
-        send_buf = {
-            :method => "stagesetA",
-            :X => data["x"],
-            :Y => data["y"],
-            :Z => data["z"],
-            :A => data["a"],
-            :B => data["b"]
-        }
-
-        socket = TCPSocket.open("192.168.4.129", 2000)
-        socket.puts send_buf.to_json
-        result = socket.gets.chomp
-        arr = result.split(" ")
-
-        current_buf = {
-            :X => arr[0],
-            :Y => arr[1],
-            :Z => arr[2],
-            :A => arr[3],
-            :B => arr[4]
-        }
-
-        return current_buf.to_json
-    end
-
-    def StagesetB(data)
-        puts "FEI StagesetB"
-        puts data
-    end
-
-    def magnification(data)
-    end
-
-    def spotsize(data)
-
-        puts "FEI spotsize"
-        send_buf = {
-            :method => "spotsize",
-            :spotsize => data["sp"]
-        }
-
-        socket = TCPSocket.open("192.168.4.129", 2000)
-        socket.puts send_buf.to_json
-        result = socket.gets.chomp
-
-        current_buf = {
-            :method => "spotsize",
-            :spotsize => result
-        }
-
-        return current_buf.to_json
-    end
-
-    def Brightnesset(data)
-        puts "FEI Brightnesset"
-        puts data
-    end
-
-    def Voltageset(data)
-        puts "FEI Voltageset"
-        puts data
-    end
-
-    def request
-
-        puts "FEI request"
-
-        send_buf = {
-            :method => request
-        }
-
-        socket = TCPSocket.open("192.168.4.129", 2000)
-        socket.puts send_buf.to_json
-        result = socket.gets.chomp
-
-        current_buf = {
-            :method => "spotsize",
-            :spotsize => result
-        }
-
-        return current_buf.to_json
-    end
-
-
-end
-
diff --git a/vemapi/app/hitachicontrol.rb b/vemapi/app/hitachicontrol.rb
deleted file mode 100644 (file)
index c3887f9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-require "./vem"
-
-class HITACHIControl < VEM
-    @@condition = {
-        "TEM"    => "HITACHI",
-        "GonioX" => 0,
-        "GonioY" => 0,
-        "GonioZ" => 0,
-        "GonioA" => 0,
-        "SpotSizeIndex" => 0,
-        "MagIndex" => 0,
-        "Obj" => 0,
-        "BeamTiltX" => 0,
-        "BeamTiltY" => 0,
-        "Speed" => 0
-    }
-
-    def initialize
-    end
-
-    def setStageA(params)
-        @@condition["GonioX"] = params["x"]
-        @@condition["GonioY"] = params["y"]
-        @@condition["GonioZ"] = params["z"]
-        @@condition["GonioA"] = params["a"]
-        return @@condition.to_json
-    end
-
-    def setStageR(params)
-    end
-
-    def setSpotSize(params)
-        @@condition["SpotSizeIndex"] = params["sps"]
-        return @@condition.to_json
-    end
-
-    def setMagnification(params)        
-        @@condition["MagIndex"] = params["mag"]
-        return @@condition.to_json
-    end
-
-    def setObj(params)
-        @@condition["Obj"] = params["obj"]
-        return @@condition.to_json
-    end
-
-    def setBeamTilt(params)
-        @@condition["BeamTiltX"] = params["btx"]
-        @@condition["BeamTiltY"] = params["bty"]
-        return @@condition.to_json
-    end
-
-    def setSpeed(params)
-        @@condition["Speed"] = params["sp"]
-        return @@condition.to_json
-    end
-
-    def getCondition
-        return @@condition.to_json
-    end
-end
-
diff --git a/vemapi/app/jeolcontrol.rb b/vemapi/app/jeolcontrol.rb
deleted file mode 100644 (file)
index 38c77c7..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-require "./vem"
-
-class JEOLControl < VEM
-     @@condition = {
-         "TEM" => "JEOL",
-        "GonioX" => 0,
-        "GonioY" => 0,
-        "GonioZ" => 0,
-        "GonioA" => 0,
-        "SpotSizeIndex" => 0,
-        "MagIndex" => 0,
-        "Obj" => 0,
-        "BeamTiltX" => 0,
-        "BeamTiltY" => 0,
-        "Speed" => 0
-    }
-
-    def initialize
-    end
-
-    def setStageA(params)
-        @@condition["GonioX"] = params["x"]
-        @@condition["GonioY"] = params["y"]
-        @@condition["GonioZ"] = params["z"]
-        @@condition["GonioA"] = params["a"]
-        return @@condition.to_json
-    end
-
-    def setStageR(params)
-    end
-
-    def setSpotSize(params)
-        @@condition["SpotSizeIndex"] = params["sps"]
-        return @@condition.to_json
-    end
-
-    def setMagnification(params)        
-        @@condition["MagIndex"] = params["mag"]
-        return @@condition.to_json
-    end
-
-    def setObj(params)
-        @@condition["Obj"] = params["obj"]
-        return @@condition.to_json
-    end
-
-    def setBeamTilt(params)
-        @@condition["BeamTiltX"] = params["btx"]
-        @@condition["BeamTiltY"] = params["bty"]
-        return @@condition.to_json
-    end
-
-    def setSpeed(params)
-        @@condition["Speed"] = params["sp"]
-        return @@condition.to_json
-    end
-
-    def getCondition
-        return @@condition.to_json
-    end
-end
-
diff --git a/vemapi/app/test/feiserver.rb b/vemapi/app/test/feiserver.rb
deleted file mode 100644 (file)
index d9aec36..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-require "socket"
-require "json"
-
-s0 = TCPServer.open(22222)
-sock = s0.accept
-result = sock.gets
-puts result
-sock.puts result
-sock.close
-s0.close
diff --git a/vemapi/app/test/test_feicontrol.rb b/vemapi/app/test/test_feicontrol.rb
deleted file mode 100644 (file)
index 25f88e6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-require './vem'
-require './feicontrol'
-
-class TestFEIControl
-    def test
-        @obj = FEIControl.new
-        puts @obj.getAllControlValues
-
-
-#        @obj.getCondition('GonioX')
-        @obj.setCondition('GonioX', 10)
-    end
-end
-
-obj = TestFEIControl.new
-obj.test
diff --git a/vemapi/app/test/vemapi_test.rb b/vemapi/app/test/vemapi_test.rb
deleted file mode 100644 (file)
index b673e34..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/ruby
-
-require 'sinatra/base'
-require './vem'
-require './hitachicontrol'
-require './feicontrol'
-require './jeolcontrol'
-
-
-class Vemapi < Sinatra::Base
-
-    get '/' do
-        'VEM API test'
-    end
-
-    get '/:emname/:parameter' do
-        @@vem = VEM.create("#{params[:emname]}");
-        result = @@vem.__send__("#{params[:parameter]}")
-        "#{result}"
-    end
-
-end
-
- Vemapi.run! :host => 'localhost', :port => 9090
diff --git a/vemapi/app/vem.rb b/vemapi/app/vem.rb
deleted file mode 100644 (file)
index f43741e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-class VEM
-
-    def self.create (inst)
-        if inst == "hitachi" then
-            HITACHIControl.new()
-        elsif inst == "fei" then
-            FEIControl.new()
-        elsif inst == "jeol" then
-            JEOLControl.new()
-        end
-    end
-
-    def initialize
-    end
-
-    def setStageA(params)
-    end
-
-    def setStageR(params)
-    end
-
-    def setSpotSize(params)
-    end
-
-    def setMagnification(params)
-    end
-
-    def setObj(params)
-    end
-
-    def setBeamTilt(params)
-    end
-
-    def setSpeed(params)
-    end
-
-    def getCondition
-    end
-end
-