def get_constraints(self):
        """ Return a constraints class for the slow counter."""
        constraints = SlowCounterConstraints()
        constraints.min_count_frequency = 5e-5
        constraints.max_count_frequency = 5e5
        constraints.counting_mode = [
            CountingMode.CONTINUOUS, CountingMode.GATED,
            CountingMode.FINITE_GATED
        ]

        return constraints
Exemplo n.º 2
0
    def get_constraints(self):
        """ Return a constraints class for the slow counter."""
        constraints = SlowCounterConstraints()
        constraints.min_count_frequency = 5e-5
        constraints.max_count_frequency = 5e5
        constraints.counting_mode = [
            CountingMode.CONTINUOUS,
            CountingMode.GATED,
            CountingMode.FINITE_GATED]

        return constraints
Exemplo n.º 3
0
    def get_constraints(self):
        """ Get hardware limits of NI device.

        @return SlowCounterConstraints: constraints class for slow counter

        FIXME: ask hardware for limits when module is loaded
        """
        constraints = SlowCounterConstraints()
        constraints.max_detectors = 4
        constraints.min_count_frequency = 1e-3
        constraints.max_count_frequency = 10e9
        constraints.counting_mode = [CountingMode.FINITE_GATED]
        return constraints
Exemplo n.º 4
0
    def get_constraints(self):
        """ Get hardware limits the device

        @return SlowCounterConstraints: constraints class for slow counter

        FIXME: ask hardware for limits when module is loaded
        """
        constraints = SlowCounterConstraints()
        constraints.max_detectors = 2
        constraints.min_count_frequency = 1e-3
        constraints.max_count_frequency = 10e9
        constraints.counting_mode = [CountingMode.CONTINUOUS]
        return constraints
Exemplo n.º 5
0
    def __init__(self,
                 digital_channels=None,
                 analog_channels=None,
                 analog_sample_rate=None,
                 digital_sample_rate=None,
                 combined_sample_rate=None,
                 read_block_size=None,
                 streaming_modes=None,
                 data_type=None,
                 allow_circular_buffer=None):
        SlowCounterConstraints.__init__(self)
        DataInStreamConstraints.__init__(self, digital_channels,
                                         analog_channels, analog_sample_rate,
                                         digital_sample_rate,
                                         combined_sample_rate, read_block_size,
                                         streaming_modes, data_type,
                                         allow_circular_buffer)

        # ==== SlowCounterConstraints ====
        # from slow_counter_dummy
        self.min_count_frequency = 5e-5
        self.max_count_frequency = 5e5
        self.counting_mode = [
            CountingMode.CONTINUOUS, CountingMode.GATED,
            CountingMode.FINITE_GATED
        ]
        # ==== End SlowCounterConstraints ====

        # ==== DataInStreamConstraints ====
        # from data_instream_dummy
        self.analog_sample_rate.min = 1
        self.analog_sample_rate.max = 2**31 - 1
        self.analog_sample_rate.step = 1
        self.analog_sample_rate.unit = 'Hz'
        self.digital_sample_rate.min = 1
        self.digital_sample_rate.max = 2**31 - 1
        self.digital_sample_rate.step = 1
        self.digital_sample_rate.unit = 'Hz'
        self.combined_sample_rate = self.analog_sample_rate

        self.read_block_size.min = 1
        self.read_block_size.max = 1000000
        self.read_block_size.step = 1

        # TODO: Implement FINITE streaming mode
        self.streaming_modes = (StreamingMode.CONTINUOUS,
                                )  # , StreamingMode.FINITE)
        self.data_type = np.float64
        self.allow_circular_buffer = True
Exemplo n.º 6
0
    def get_constraints(self):
        """ Get hardware limits the device

        @return SlowCounterConstraints: constraints class for slow counter

        FIXME: ask hardware for limits when module is loaded
        """
        constraints = SlowCounterConstraints()
        constraints.max_detectors = 2
        constraints.min_count_frequency = 1e-3
        constraints.max_count_frequency = 10e9
        constraints.counting_mode = [CountingMode.CONTINUOUS]
        return constraints
Exemplo n.º 7
0
    def get_constraints(self):
        """ Get hardware limits of NI device.

        @return SlowCounterConstraints: constraints class for slow counter

        FIXME: ask hardware for limits when module is loaded
        """
        constraints = SlowCounterConstraints()
        constraints.max_detectors = 4
        constraints.min_count_frequency = 1e-3
        constraints.max_count_frequency = 10e9
        constraints.counting_mode = [CountingMode.FINITE_GATED]
        return constraints
    def get_constraints(self):
        """ Get hardware limits the device

        @return SlowCounterConstraints: constraints class for slow counter

        FIXME: ask hardware for limits when module is loaded
        """
        # TODO: See if someone needs this method, at the moment it is not being used.

        constraints = SlowCounterConstraints()
        constraints.max_detectors = 2
        constraints.min_count_frequency = 1e-3
        constraints.max_count_frequency = 10e9
        constraints.counting_mode = [CountingMode.CONTINUOUS]
        return constraints
Exemplo n.º 9
0
    def get_constraints(self):
        """
        Retrieve the hardware constrains from the counter device.

        :return: (SlowCounterConstraints) object with constraints for the counter
        """

        constraints = SlowCounterConstraints()
        # TODO: check values
        constraints.min_count_frequency = 1
        constraints.max_count_frequency = 10e9
        constraints.max_detectors = 8
        constraints.counting_mode = [CountingMode.CONTINUOUS]

        return constraints
Exemplo n.º 10
0
    def get_constraints(self):
        """ Returns hardware limits on qutau's counting ability.

        @return SlowCounterConstraints: object with constraints.
        """
        c = SlowCounterConstraints()
        c.max_detectors = 8

        # Highest count frequency limited by min exposure time (1 ms)
        c.max_count_frequency = 1 / 1e-3

        # Lowest count frequency limited by max exposure time (65536 ms)
        # or preset timeout, whichever is lower
        c.min_count_frequency = 1 / min(65.5, self._timeout)

        c.counting_mode = [CountingMode.CONTINUOUS]

        return c