damaris.experiments.Experiment

class damaris.experiments.Experiment(gating: float | None = None, rf_sources: list[int] = [], rf_gates: list[int] = [])[source]

Class holding the complete state tree for a single experiment. This state tree represents one program on the pulse card. It is written in a single file and picked up by the backend.

Parameters:
  • gating (Gating) – gate length in s

  • rf_sources (list) – list of rf sources ttl channels

  • rf_gates (list) – list of rf gates ttl channels len(rf_gates) == len(rf_sources)

__init__(gating: float | None = None, rf_sources: list[int] = [], rf_gates: list[int] = []) → None[source]

Methods

__init__([gating, rf_sources, rf_gates])

get_job_id()

Returns the job-id of the current experiment

get_length()

loop_end()

Closes a l:func:loop_start statement.

loop_start(iterations)

creates a loop of given number of iterations and has to be closed by loop_end().

record(samples, frequency[, timelength, ...])

Records data with a given number of samples, sampling frequency, and sensitivity.

rf_pulse([length, phase, source])

Make an rf pulse, including gating and phase switching.

set_dac(dac_value[, dac_id, length, is_seq, ...])

Sets the value for the DAC (Digital-to-Analog Converter) and optionally additional TTL lines.

set_description(key, value)

Sets a description key-value pair in the experiment description dictionary.

set_frequency(frequency, phase[, ttls])

Sets the frequency and phase of the frequency source and optionally further channels.

set_pfg([dac_value, length, shape, trigger, ...])

This sets the value for the PFG, it also sets it back to dac_value=0 automatically.

set_phase(phase[, ttls])

Sets the phase of the RF source to the specified value.

set_pts_local()

Sets the PTS310/PTS500 frequency source to local mode.

state_end()

Closes a previous state_start()

state_start(time)

Starts a state in the pulse programs with duration time.

ttl_pulse(length[, channel, value])

Creates a state with length length and switches requested bits of the pulse programmer to HIGH.

ttls([length, value])

Same as ttl_pulse, but no channel keyword

wait(time[, ttls, gating])

Waits for a specified amount of time without performing any actions.

write_quit_job()

Returns a xml quit-job :returns: XML quit-job

write_xml_string()

Returns the current program as a string

Attributes

job_id