Microscope

A physical scanning SQUID microscope is represented by an instance of the microscope.microscope.Microscope class (or liklely one of its subclasses, like microscope.susceptometer.SusceptometerMicroscope). A Microscope is a qcodes.station.Station, to which we can attach components (instances of qcodes.Instrument or its subclasses) whose metadata we would like to save during a measurement.

../_images/microscope.jpg

During a typical measurment (scan or capacitive touchdown), all settings/parameters of all instruments attached to the microscope are automatically queried and recorded, forming a “snapshot” of the microscope at the time of the measurement. This snapshot is saved along with a raw data file and a MATLAB .mat file containing data converted to real units. See Scan surface example for a demonstration of scanning a sample surface with a microscope.susceptometer.SusceptometerMicroscope.

class microscope.microscope.Microscope(config_file: str, temp: str, ureg: Any = <pint.registry.UnitRegistry object>, log_level: Any = 20, log_name: str = None, **kwargs)[source]

Base class for scanning SQUID microscope.

Parameters
  • config_file – Path to microscope configuration JSON file.

  • temp – ‘LT’ or ‘RT’, depending on whether the microscope is cold or not. Sets the voltage limits for the scanner and Attocubes.

  • ureg – pint UnitRegistry for managing physical units.

  • log_level – e.g. logging.DEBUG or logging.INFO

  • log_name – Log file will be saved as logs/{log_name}.log. Default is the name of the microscope configuration file.

  • **kwargs – Keyword arguments to be passed to Station constructor.

approach(tdc_params: Dict[str, Any], attosteps: int = 100) → None[source]

Approach the sample by iteratively stepping z Attocube and performing td_cap().

Parameters
  • tdc_params – Dict of capacitive touchdown parameters as defined in measurement configuration file.

  • attosteps – Number of z atto steps to perform per iteration. Default 100.

get_surface(x_vec: numpy.ndarray, y_vec: numpy.ndarray, tdc_params: Dict[str, Any]) → None[source]

Performs touchdowns on a grid and fits a plane to the resulting surface.

Parameters
  • x_vec – 1D array of x positions (must be same length as y_vec).

  • y_vec – 1D array of y positions (must be same length as x_vec).

  • tdc_params – Dict of capacitive touchdown parameters as defined in measurement configuration file.

remove_component(name: str) → None[source]

Remove a component (instrument) from the microscope.

Parameters

name – Name of component to remove.

set_lockins(measurement: Dict[str, Any]) → None[source]

Initialize lockins for given measurement.

Parameters

measurement – Dict of measurement parameters as defined in measurement configuration file.

td_cap(tdc_params: Dict[str, Any], update_snap: bool = True) → Tuple[Any][source]

Performs a capacitive touchdown.

Parameters
  • tdc_params – Dict of capacitive touchdown parameters as defined in measurement configuration file.

  • update_snap – Whether to update the microscope snapshot. Default True. (You may want this to be False when getting a plane or approaching.)

Returns

data, tdc_plot

DataSet and plot generated by the touchdown Loop.

Return type

Tuple[qcodes.DataSet, plots.TDCPlot]

class microscope.susceptometer.SusceptometerMicroscope(config_file: str, temp: str, ureg: Any = <pint.registry.UnitRegistry object>, log_level: Any = 20, log_name: str = None, **kwargs)[source]

Scanning SQUID susceptometer microscope class.

Parameters
  • config_file – Path to microscope configuration JSON file.

  • temp – ‘LT’ or ‘RT’, depending on whether the microscope is cold or not. Sets the voltage limits for the scanner and Attocubes.

  • ureg – pint UnitRegistry for managing physical units.

  • log_level – e.g. logging.DEBUG or logging.INFO

  • log_name – Log file will be saved as logs/{log_name}.log. Default is the name of the microscope configuration file.

  • **kwargs – Keyword arguments to be passed to Station constructor.

get_prefactors(measurement: Dict[str, Any], update: bool = True) → Dict[str, Any][source]

For each channel, calculate prefactors to convert DAQ voltage into real units.

Parameters
  • measurement – Dict of measurement parameters as defined in measurement configuration file.

  • update – Whether to query instrument parameters or simply trust the latest values (should this even be an option)?

Returns

prefactors

Dict of {channel_name: prefactor} where prefactor is a pint Quantity.

Return type

Dict[str, pint.Quantity]

scan_surface(scan_params: Dict[str, Any]) → None[source]

Scan the current surface while acquiring data in the channels defined in measurement configuration file (e.g. MAG, SUSCX, SUSCY, CAP).

Parameters

scan_params – Dict of scan parameters as defined in measuremnt configuration file.

Returns

None

class microscope.sampler.SamplerMicroscope(config_file: str, temp: str, ureg: Any = <pint.registry.UnitRegistry object>, log_level: Any = 20, log_name: str = None, **kwargs)[source]

Scanning SQUID sampler microscope class.

iv_mod_tek(ivm_params: Dict[str, Any]) → Tuple[Dict[str, Any]][source]

Measures IV characteristic at different mod coil voltages.

Parameters

ivm_params – Dict of measurement parameters as definted in config_measurements json file.

Returns

data_dict, metadict

Dictionaries containing data arrays and instrument metadata.

Return type

Tuple[Dict]

iv_tek_mod_daq(ivm_params: Dict[str, Any]) → None[source]

Performs digital feedback on mod coil to measure flux vs. delay.

AFG ch1 is used for pulse generator bias. AFG ch2 is used for comparator bias. DG ch1 is used for pulse generator trigger.

Parameters

ivm_params – Dict of measurement parameters as definted in config_measurements json file.

Returns

data_dict, metadict

Dictionaries containing data arrays and instrument metadata.

Return type

Tuple[Dict]