Example #1
0
 def _update_samples_per_record(self, sample_rate, int_time, int_delay):
     """
     Keeps non settable samples_per_record up to date with int_time int_delay.
     """
     total_time = (int_time or 0) + (int_delay or 0)
     samples_needed = total_time * sample_rate
     samples_per_record = helpers.roundup(
         samples_needed, self.samples_divisor)
     logger.info("need {} samples round up to {}".format(samples_needed, samples_per_record))
     self.samples_per_record._save_val(samples_per_record)
 def _update_samples_per_record(self, sample_rate, int_time, int_delay):
     """
     Keeps non settable samples_per_record up to date with int_time int_delay
     and updates setpoints as needed.
     """
     total_time = (int_time or 0) + (int_delay or 0)
     samples_needed = total_time * sample_rate
     log.info(
         "needing {} samples at total time {} with sample rate {}".format(
             samples_needed, total_time, sample_rate))
     samples_per_record = helpers.roundup(samples_needed,
                                          self.samples_divisor)
     log.info(
         "rounding up samples pr record to {}".format(samples_per_record))
     self.samples_per_record._save_val(samples_per_record)
     self.acquisition.set_setpoints_and_labels()