This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
from ijutils import *
|
||||
import java.util.Arrays as Arrays
|
||||
|
||||
ret = grab_frames(image, 3, roi=None, wait_next=True)
|
||||
av = average_frames(ret)
|
||||
|
||||
div = ret[0].copy()
|
||||
div.div(ret[1])
|
||||
|
||||
save_as_tiff(ret[0], "{images}/0.tif", check=True)
|
||||
save_as_tiff(ret[1], "{images}/1.tif", check=True)
|
||||
save_as_tiff(ret[2], "{images}/2.tif", check=True)
|
||||
save_as_tiff(av, "{images}/av.tif", check=True)
|
||||
save_as_tiff(div, "{images}/div.tif", check=True)
|
||||
|
||||
|
||||
plot([ret[0].matrix, ret[1].matrix, ret[2].matrix, av.matrix, div.matrix], name=["1","2","3","av", "div"])
|
||||
|
||||
|
||||
|
||||
i0=open_image("{images}/0.tif")
|
||||
a0 = get_ip_array(i0)
|
||||
i1=open_image("{images}/0.tif")
|
||||
a1 = get_ip_array(i1)
|
||||
i2=open_image("{images}/0.tif")
|
||||
a2 = get_ip_array(i2)
|
||||
ia=open_image("{images}/av.tif")
|
||||
aa = get_ip_array(ia)
|
||||
|
||||
plot([a0,a1,a2,aa], name=["1","2","3","av"], title="Read")
|
||||
|
||||
|
||||
a = get_ip_array(load_array(ret[0].matrix))
|
||||
print Arrays.deepEquals(a, a0)
|
||||
|
||||
|
||||
a0 = get_ip_array(open_image("{images}/0.tif"))
|
||||
a1 = get_ip_array(open_image("{images}/1.tif"))
|
||||
a2 = get_ip_array(open_image("{images}/2.tif"))
|
||||
|
||||
|
||||
|
||||
measures = [i0,i1,i2]
|
||||
av2=average_ips (measures, roi=None, as_float=True)
|
||||
save_as_tiff(av2, "{images}/av2.tif", check=True)
|
||||
|
||||
|
||||
|
||||
arr1=av.matrix
|
||||
arr2=get_ip_array(av2)
|
||||
print Arrays.deepEquals(arr1,arr2)
|
||||
plot([arr1[0], arr2[0]], name =["arr1", "arr2"], title = "Cmp")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+11
-3
@@ -1,5 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0">
|
||||
<data/>
|
||||
<scan/>
|
||||
<configuration xmlns="http://www.psi.ch/~ebner/models/scan/1.0" failOnSensorError="true">
|
||||
<data fileName="fda"/>
|
||||
<scan>
|
||||
<dimension zigzag="false" dataGroup="false">
|
||||
<positioner xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PseudoPositioner" id="id683170">
|
||||
<counts>10</counts>
|
||||
</positioner>
|
||||
<detector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Timestamp" id="id691479"/>
|
||||
</dimension>
|
||||
</scan>
|
||||
<visualization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinePlot" x="id683170" y="id691479"/>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user