Beispiel #1
0
    def read_chunk(self):
        ''' read a chunk of data '''
        # read the chunk
        triplet_count=counted_file_parser.read_chunk()

        # if this chunk was aborted, return nothing
        if counted_file_parser.get_aborted(): return 0
        
        # get the step and loop
        step=counted_file_parser.get_scan_step()
        loop=counted_file_parser.get_scan_loop()
        self.max_step=max(step+1, self.max_step)
        self.max_loop=max(loop+1, self.max_loop)
        self.all_triplets+=triplet_count
        self.progress=self.all_triplets*3*4/float(self.filesize)
        
        # write down the count rates
        for pattern_index, pattern in enumerate(self.patterns):
            self.counts[pattern_index, step, loop]=self.get_count_rate(pattern)
            
        # write down the positions
        for motor_index in range(self.scan_motors_count):
            position=counted_file_parser.get_motor_controller_position(motor_index)
            self.positions[motor_index, step, loop]=position
        return triplet_count
Beispiel #2
0
    def read_chunk(self):
        ''' read a chunk of data '''
        # read the chunk
        triplet_count = counted_file_parser.read_chunk()

        # if this chunk was aborted, return nothing
        if counted_file_parser.get_aborted(): return 0

        # get the step and loop
        step = counted_file_parser.get_scan_step()
        loop = counted_file_parser.get_scan_loop()
        self.max_step = max(step + 1, self.max_step)
        self.max_loop = max(loop + 1, self.max_loop)
        self.all_triplets += triplet_count
        self.progress = self.all_triplets * 3 * 4 / float(self.filesize)

        # write down the count rates
        for pattern_index, pattern in enumerate(self.patterns):
            self.counts[pattern_index, step,
                        loop] = self.get_count_rate(pattern)

        # write down the positions
        for motor_index in range(self.scan_motors_count):
            position = counted_file_parser.get_motor_controller_position(
                motor_index)
            self.positions[motor_index, step, loop] = position
        return triplet_count
Beispiel #3
0
def get_scan_step():
  return _counted_file_parser.get_scan_step()
Beispiel #4
0
def get_scan_step():
    return _counted_file_parser.get_scan_step()