Ejemplo n.º 1
0
def get_counts(ctime,count_list):
  global CNT

  oldcount = beamline_support.get_count_time()
  CNT = beamline_support.get_counts(ctime)    
  for i in xrange(len(count_list)):    
    count_list[i] = CNT[i]
  countdwell(oldcount)
Ejemplo n.º 2
0
def get_counts(ctime, count_list):
    global CNT

    oldcount = beamline_support.get_count_time()
    CNT = beamline_support.get_counts(ctime)
    for i in range(len(count_list)):
        count_list[i] = CNT[i]
    countdwell(oldcount)
Ejemplo n.º 3
0
def read_intensity(time_to_count):
  global CNT
  local_count = []
  
#  CNT = beamline_support.get_counts(time_to_count)
  local_count = beamline_support.get_counts(time_to_count)  #index0=timer,1=chan2,...
  for i in xrange(1,number_of_counter_readouts+1):
    CNT[i] = local_count[i-1]       
    update_s = "channel %d: %d" % (i,CNT[i])
    daq_utils.broadcast_output(update_s)
  if (daq_lib.ringfile == "wire"):
    current = daq_utils.ring_current_from_wire(CNT[6],beamline_support.get_count_time())
  else:
    current = daq_utils.ring_current()
  if (beamline_support.get_count_time() > 0 and current > 0):
    daq_lib.set_field("beamline_merit",int((CNT[2]/beamline_support.get_count_time())/current))
  else:
    daq_lib.set_field("beamline_merit",0)
Ejemplo n.º 4
0
def ri_actual(time_to_count):
    global CNT
    local_count = []

    local_count = beamline_support.get_counts(
        beamline_support.get_count_time())  #index0=timer,1=chan2,...
    for i in range(1, number_of_counter_readouts + 1):
        CNT[i] = local_count[i - 1]
        update_s = "channel %d: %d" % (i, CNT[i])
        daq_utils.broadcast_output(update_s)
    if (daq_lib.ringfile == "wire"):
        current = daq_utils.ring_current_from_wire(
            CNT[6], beamline_support.get_count_time())
    else:
        current = daq_utils.ring_current()
    if (beamline_support.get_count_time() > 0 and current > 0):
        daq_lib.set_field(
            "beamline_merit",
            int((CNT[2] / beamline_support.get_count_time()) / current))
    else:
        daq_lib.set_field("beamline_merit", 0)
Ejemplo n.º 5
0
def ri():
    ri_actual(beamline_support.get_count_time())