Skip to content

Commit

Permalink
add gitomo examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ronpandolfi committed May 8, 2024
1 parent 3f1d097 commit 4db1521
Show file tree
Hide file tree
Showing 3 changed files with 556 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tsuchinoko/examples/gi_tomo_analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# this is just to mock an analysis element. It effectively just relay's the
# measured value here
from tsuchinoko.utils.zmq_queue import Queue_analyze

q = Queue_analyze()

if __name__ == '__main__':
while True: # The loop that waits for new instructions...

data = q.get() # Get analysis command

print("'Analyzing' data:", data)

q.publish(data) # Send new analysis results to gpCAM
17 changes: 17 additions & 0 deletions tsuchinoko/examples/gi_tomo_measure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import numpy as np

from tsuchinoko.examples.gi_tomo_phantom import projection_operator, l_x, n_sinograms, domain_maps, bilinear_sample
from tsuchinoko.utils.zmq_queue import Queue_measure

measure_queue = Queue_measure()



if __name__ == "__main__":
while True: # The loop that waits for new instructions...

pos = measure_queue.get() # Get measurement command
print('received:', pos)
measurement = bilinear_sample(pos, domain_maps)
print('sending:', measurement)
measure_queue.publish(measurement) # Send new results for analysis
Loading

0 comments on commit 4db1521

Please sign in to comment.