photons.equipment.idq_time_controller module
Time Controller from ID Quantique.
- class photons.equipment.idq_time_controller.Clock(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- INTERNAL = 'INTERNAL'
- EXTERNAL = 'EXTERNAL'
- INT = 'INTERNAL'
- EXT = 'EXTERNAL'
- class photons.equipment.idq_time_controller.Coupling(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- AC = 'AC'
- DC = 'DC'
- class photons.equipment.idq_time_controller.Edge(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- RISING = 'RISING'
- FALLING = 'FALLING'
- class photons.equipment.idq_time_controller.Mode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- ACCUMULATE = 'ACCUM'
- ACCUM = 'ACCUM'
- CYCLE = 'CYCLE'
- NIM = 'NIM'
- TTL = 'TTL'
- HIGH_SPEED = 'LOWRES'
- HIGH_RESOLUTION = 'HIRES'
- LOW_SPEED = 'HIRES'
- LOW_RESOLUTION = 'LOWRES'
- FAST = 'LOWRES'
- SLOW = 'HIRES'
- class photons.equipment.idq_time_controller.ResyncPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- AUTO = 'AUTO'
- MANUAL = 'MANUAL'
- class photons.equipment.idq_time_controller.Select(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum- LOOP = 'LOOP'
- OUTPUT = 'OUTPUT'
- SHAPED = 'SHAPED'
- UNSHAPED = 'UNSHAPED'
- class photons.equipment.idq_time_controller.Histogram(hist1, hist2, hist3, hist4)[source]
Bases:
object
- class photons.equipment.idq_time_controller.HistogramSettings(channel, ref, stop, enabler, minimum, maximum, bin_count, bin_width)[source]
Bases:
object
- class photons.equipment.idq_time_controller.InputSettings(channel, coupling, edge, enabled, delay, duration, mode, resync_policy, select, threshold)[source]
Bases:
object-
resync_policy:
ResyncPolicy
-
resync_policy:
- class photons.equipment.idq_time_controller.StartSettings(coupling, edge, enabled, delay, duration, mode, select, threshold)[source]
Bases:
object
- class photons.equipment.idq_time_controller.IDQTimeController(record, **kwargs)[source]
Bases:
BaseEquipmentTime Controller from ID Quantique.
- Parameters:
record (
EquipmentRecord) – The equipment record.**kwargs – Keyword arguments. Can be specified as attributes of an XML element in a configuration file (with the tag of the element equal to the alias of record).
- class Clock(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- INTERNAL = 'INTERNAL'
- EXTERNAL = 'EXTERNAL'
- INT = 'INTERNAL'
- EXT = 'EXTERNAL'
- class Coupling(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- AC = 'AC'
- DC = 'DC'
- class Edge(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- RISING = 'RISING'
- FALLING = 'FALLING'
- class Mode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- ACCUMULATE = 'ACCUM'
- ACCUM = 'ACCUM'
- CYCLE = 'CYCLE'
- NIM = 'NIM'
- TTL = 'TTL'
- HIGH_SPEED = 'LOWRES'
- HIGH_RESOLUTION = 'HIRES'
- LOW_SPEED = 'HIRES'
- LOW_RESOLUTION = 'LOWRES'
- FAST = 'LOWRES'
- SLOW = 'HIRES'
- class ResyncPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- AUTO = 'AUTO'
- MANUAL = 'MANUAL'
- class Select(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum- LOOP = 'LOOP'
- OUTPUT = 'OUTPUT'
- SHAPED = 'SHAPED'
- UNSHAPED = 'UNSHAPED'
-
connection:
ConnectionZeroMQ
-
counts_changed:
SignalInstance
- configure_delay(*, block, address, value=0)[source]
Configure the settings for a DELAY block.
- Parameters:
- Return type:
- Returns:
The DELAY settings that were read from the device after the settings were written.
- configure_device(*, clock, mode)[source]
Configure the DEVICE settings.
- Parameters:
- Return type:
- Returns:
The DEVICE settings that were read from the device after the settings were written.
- configure_histogram(*, channel, ref, stop=None, enabler='TSGE8', minimum=0, maximum=1e-06, bin_count=None, bin_width=1e-10)[source]
Configure a HISTOGRAM channel.
- Parameters:
channel (
int) – The HISTOGRAM channel number (1, 2, 3 or 4).ref (
int|str|None) – The INPUT channel number (0[START], 1, 2, 3 or 4) or the name of the reference channel (e.g., ‘TSCO5’)stop (
int|str|None) – The INPUT channel number (0[START], 1, 2, 3 or 4) or the name of the stop channel (e.g., ‘TSCO5’). If not specified, then the value of ref is used.enabler (
str) – The timestamp-generator block that determines when data acquisition begins and ends.minimum (
float) – Minimum time value, in seconds.maximum (
float) – Maximum time value, in seconds.bin_count (
int|None) – The number of time bins. If specified, then maximum is ignored. Must be between 1 and 16384.bin_width (
float) – The time-bin width, in seconds.
- Return type:
- Returns:
The HISTOGRAM settings that were read from the device after the settings were written.
- configure_input(*, channel, coupling=Coupling.DC, delay=0, duration=1, edge=Edge.RISING, enabled=False, mode=Mode.CYCLE, resync_policy=ResyncPolicy.AUTO, select=Select.UNSHAPED, threshold=1)[source]
Configure an INPUT channel.
- Parameters:
channel (
int) – The input channel number (1, 2, 3 or 4).delay (
float) – The delay, in seconds, to add to the timestamp when an edge is detected. Must be between 0 and 1 second.duration (
float) – The number of seconds to count edges (integration time). Must be between 0.001 and 65.535 seconds.edge (
Edge|str) – The discriminator edge, either RISING or FALLING.enabled (
bool) – Whether the channel is enabled or disabled.mode (
Mode|str) – The counter mode (either CYCLE or ACCUMULATE).resync_policy (
ResyncPolicy|str) – The resync policy.threshold (
float) – The discriminator threshold value, in volts.
- Return type:
- Returns:
The INPUT settings that were read from the device after the settings were written.
- configure_start(*, coupling=Coupling.DC, delay=0, edge=Edge.RISING, enabled=False, duration=1, mode=Mode.CYCLE, select=Select.UNSHAPED, threshold=1)[source]
Configure the START channel.
- Parameters:
delay (
float) – The delay, in seconds, to add to the timestamp when an edge is detected. Must be between 0 and 1 second.edge (
Edge|str) – The discriminator edge, either RISING or FALLING.enabled (
bool) – Whether the channel is enabled or disabled.duration (
float) – The number of seconds to count edges (integration time). Must be between 0.001 and 65.535 seconds.mode (
Mode|str) – The counter mode (either CYCLE or ACCUMULATE).threshold (
float) – The discriminator threshold value, in volts.
- Return type:
- Returns:
The START settings that were read from the device after the settings were written.
- count_edges(*, channel, allow_zero=False, nsamples=1)[source]
Count the number of edges per second.
- Parameters:
channel (
int) – The input channel number (e.g., 0[START], 1, 2, 3 or 4).allow_zero (
bool) – Whether to allow zero edges per second to be counted. Querying the COUNTER? value from the device immediately returns the value that is stored in the device’s memory. After resetting the device (i.e., the value returned by COUNTER? is 0) Python sleeps for duration seconds (seeconfigure_input()) before querying COUNTER?. Since the computer clock and the device clock are not synced it is possible that COUNTER? is queried before the device writes a value to memory. If zero edges are detected and allow_zero isFalsethen this method will block until at least 1 edge is detected.nsamples (
int) – The number of samples to acquire.
- Return type:
- Returns:
The number of edges per second.
- settings_delay(block)[source]
Get the settings of a DELAY block.
- Parameters:
block (
int) – The DELAY block number (1 through 8).- Return type:
- settings_histogram(channel)[source]
Get the settings of a HISTOGRAM channel.
- Parameters:
channel (
int) – The HISTOGRAM channel number (1, 2, 3 or 4).- Return type:
- settings_input(channel)[source]
Get the settings of an INPUT channel.
- Parameters:
channel (
int) – The INPUT channel number (1, 2, 3 or 4).- Return type:
- start_stop(*, clear=True, duration=30, enabler='TSGE8', min_events=0, timeout=None)[source]
Acquire a start-stop histogram of the duration between two edges.
- Parameters:
clear (
bool) – Whether to clear the histogram data before acquiring data.duration (
float) – The number of seconds to acquire data for.enabler (
str) – The timestamp-generator block that determines when data acquisition begins and ends.min_events (
Union[int,Sequence[int]]) – The minimum number of start-stop events, on each histogram channel, that must occur before returning to the calling program. If specified, then iteratively acquires data for duration seconds until the specified number of events has occurred.timeout (
float|None) – The maximum number of seconds to wait for min_events to occur. If a timeout occurs, the data that has been acquired is returned (an error is not raised).
- Return type:
- Returns:
The histogram data.