hexsha stringlengths 40 40 | repo stringlengths 7 114 | path stringlengths 4 124 | license listlengths 1 9 | language stringclasses 1
value | identifier stringlengths 1 71 | return_type stringlengths 1 749 ⌀ | original_string stringlengths 76 22.7k | original_docstring stringlengths 16 7.61k | docstring stringlengths 16 2.47k | docstring_tokens listlengths 6 477 | code stringlengths 14 10.2k | code_tokens listlengths 6 996 | short_docstring stringlengths 2 644 | short_docstring_tokens listlengths 1 116 | comment listlengths 1 89 | parameters listlengths 0 64 | docstring_params dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | clear_buffer | None | def clear_buffer(self) -> None:
"""
Clear the data in the buffer
"""
self.write(f":TRACe:CLEar '{self.buffer_name}'") |
Clear the data in the buffer
| Clear the data in the buffer | [
"Clear",
"the",
"data",
"in",
"the",
"buffer"
] | def clear_buffer(self) -> None:
self.write(f":TRACe:CLEar '{self.buffer_name}'") | [
"def",
"clear_buffer",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"f\":TRACe:CLEar '{self.buffer_name}'\"",
")"
] | Clear the data in the buffer | [
"Clear",
"the",
"data",
"in",
"the",
"buffer"
] | [
"\"\"\"\n Clear the data in the buffer\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | auto_zero_once | None | def auto_zero_once(self) -> None:
"""
This command causes the instrument to refresh the reference and zero
measurements once.
"""
self.write(":SENSe:AZERo:ONCE") |
This command causes the instrument to refresh the reference and zero
measurements once.
| This command causes the instrument to refresh the reference and zero
measurements once. | [
"This",
"command",
"causes",
"the",
"instrument",
"to",
"refresh",
"the",
"reference",
"and",
"zero",
"measurements",
"once",
"."
] | def auto_zero_once(self) -> None:
self.write(":SENSe:AZERo:ONCE") | [
"def",
"auto_zero_once",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"\":SENSe:AZERo:ONCE\"",
")"
] | This command causes the instrument to refresh the reference and zero
measurements once. | [
"This",
"command",
"causes",
"the",
"instrument",
"to",
"refresh",
"the",
"reference",
"and",
"zero",
"measurements",
"once",
"."
] | [
"\"\"\"\n This command causes the instrument to refresh the reference and zero\n measurements once.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | sweep_start | None | def sweep_start(self) -> None:
"""
Start a sweep and return when the sweep has finished.
Note: This call is blocking
"""
cmd_args = dict(self._sweep_arguments)
cmd_args["function"] = self._proper_function
cmd = ":SOURce:SWEep:{function}:LINear {start},{stop}," \
... |
Start a sweep and return when the sweep has finished.
Note: This call is blocking
| Start a sweep and return when the sweep has finished.
Note: This call is blocking | [
"Start",
"a",
"sweep",
"and",
"return",
"when",
"the",
"sweep",
"has",
"finished",
".",
"Note",
":",
"This",
"call",
"is",
"blocking"
] | def sweep_start(self) -> None:
cmd_args = dict(self._sweep_arguments)
cmd_args["function"] = self._proper_function
cmd = ":SOURce:SWEep:{function}:LINear {start},{stop}," \
"{step_count},{delay},{sweep_count},{range_mode}," \
"{fail_abort},{dual},'{buffer_name}'".form... | [
"def",
"sweep_start",
"(",
"self",
")",
"->",
"None",
":",
"cmd_args",
"=",
"dict",
"(",
"self",
".",
"_sweep_arguments",
")",
"cmd_args",
"[",
"\"function\"",
"]",
"=",
"self",
".",
"_proper_function",
"cmd",
"=",
"\":SOURce:SWEep:{function}:LINear {start},{stop}... | Start a sweep and return when the sweep has finished. | [
"Start",
"a",
"sweep",
"and",
"return",
"when",
"the",
"sweep",
"has",
"finished",
"."
] | [
"\"\"\"\n Start a sweep and return when the sweep has finished.\n Note: This call is blocking\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | abort | None | def abort(self) -> None:
"""
This command stops all trigger model commands on the instrument.
"""
self.write(":ABORt") |
This command stops all trigger model commands on the instrument.
| This command stops all trigger model commands on the instrument. | [
"This",
"command",
"stops",
"all",
"trigger",
"model",
"commands",
"on",
"the",
"instrument",
"."
] | def abort(self) -> None:
self.write(":ABORt") | [
"def",
"abort",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"\":ABORt\"",
")"
] | This command stops all trigger model commands on the instrument. | [
"This",
"command",
"stops",
"all",
"trigger",
"model",
"commands",
"on",
"the",
"instrument",
"."
] | [
"\"\"\"\n This command stops all trigger model commands on the instrument.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | clear_event_register | None | def clear_event_register(self) -> None:
"""
This function clears event registers.
"""
self.write(":STATus:CLEar") |
This function clears event registers.
| This function clears event registers. | [
"This",
"function",
"clears",
"event",
"registers",
"."
] | def clear_event_register(self) -> None:
self.write(":STATus:CLEar") | [
"def",
"clear_event_register",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"\":STATus:CLEar\"",
")"
] | This function clears event registers. | [
"This",
"function",
"clears",
"event",
"registers",
"."
] | [
"\"\"\"\n This function clears event registers.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4117846d9af69b2d577476b2bdd70cc04cf5e83c | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2450.py | [
"MIT"
] | Python | clear_event_log | None | def clear_event_log(self) -> None:
"""
This command clears the event log.
"""
self.write(":SYSTem:CLEar") |
This command clears the event log.
| This command clears the event log. | [
"This",
"command",
"clears",
"the",
"event",
"log",
"."
] | def clear_event_log(self) -> None:
self.write(":SYSTem:CLEar") | [
"def",
"clear_event_log",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"\":SYSTem:CLEar\"",
")"
] | This command clears the event log. | [
"This",
"command",
"clears",
"the",
"event",
"log",
"."
] | [
"\"\"\"\n This command clears the event log.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
7da5bcbe6a5b5ab3de36aabc12235989109d72e8 | jakeogh/Qcodes | qcodes/dataset/database_extract_runs.py | [
"MIT"
] | Python | _extract_single_dataset_into_db | None | def _extract_single_dataset_into_db(dataset: DataSet,
target_conn: ConnectionPlus,
target_exp_id: int) -> None:
"""
NB: This function should only be called from within
meth:`extract_runs_into_db`
Insert the given dataset into the s... |
NB: This function should only be called from within
meth:`extract_runs_into_db`
Insert the given dataset into the specified database file as the latest
run.
Trying to insert a run already in the DB is a NOOP.
Args:
dataset: A dataset representing the run to be copied
target_c... | This function should only be called from within
meth:`extract_runs_into_db`
Insert the given dataset into the specified database file as the latest
run.
Trying to insert a run already in the DB is a NOOP. | [
"This",
"function",
"should",
"only",
"be",
"called",
"from",
"within",
"meth",
":",
"`",
"extract_runs_into_db",
"`",
"Insert",
"the",
"given",
"dataset",
"into",
"the",
"specified",
"database",
"file",
"as",
"the",
"latest",
"run",
".",
"Trying",
"to",
"in... | def _extract_single_dataset_into_db(dataset: DataSet,
target_conn: ConnectionPlus,
target_exp_id: int) -> None:
if not dataset.completed:
raise ValueError('Dataset not completed. An incomplete dataset '
'can not... | [
"def",
"_extract_single_dataset_into_db",
"(",
"dataset",
":",
"DataSet",
",",
"target_conn",
":",
"ConnectionPlus",
",",
"target_exp_id",
":",
"int",
")",
"->",
"None",
":",
"if",
"not",
"dataset",
".",
"completed",
":",
"raise",
"ValueError",
"(",
"'Dataset no... | NB: This function should only be called from within
meth:`extract_runs_into_db` | [
"NB",
":",
"This",
"function",
"should",
"only",
"be",
"called",
"from",
"within",
"meth",
":",
"`",
"extract_runs_into_db",
"`"
] | [
"\"\"\"\n NB: This function should only be called from within\n meth:`extract_runs_into_db`\n\n Insert the given dataset into the specified database file as the latest\n run.\n\n Trying to insert a run already in the DB is a NOOP.\n\n Args:\n dataset: A dataset representing the run to be co... | [
{
"param": "dataset",
"type": "DataSet"
},
{
"param": "target_conn",
"type": "ConnectionPlus"
},
{
"param": "target_exp_id",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "dataset",
"type": "DataSet",
"docstring": "A dataset representing the run to be copied",
"docstring_tokens": [
"A",
"dataset",
"representing",
"the",
"run",
"to",
"be",
... |
40c83e80c49cf4c49e68a8a6cc7ace1c2ab0fece | jakeogh/Qcodes | qcodes/dataset/descriptions/param_spec.py | [
"MIT"
] | Python | _to_dict | ParamSpecBaseDict | def _to_dict(self) -> ParamSpecBaseDict:
"""
Write the ParamSpec as a dictionary
"""
output = ParamSpecBaseDict(name=self.name,
paramtype=self.type,
label=self.label,
unit=self.unit)
... |
Write the ParamSpec as a dictionary
| Write the ParamSpec as a dictionary | [
"Write",
"the",
"ParamSpec",
"as",
"a",
"dictionary"
] | def _to_dict(self) -> ParamSpecBaseDict:
output = ParamSpecBaseDict(name=self.name,
paramtype=self.type,
label=self.label,
unit=self.unit)
return output | [
"def",
"_to_dict",
"(",
"self",
")",
"->",
"ParamSpecBaseDict",
":",
"output",
"=",
"ParamSpecBaseDict",
"(",
"name",
"=",
"self",
".",
"name",
",",
"paramtype",
"=",
"self",
".",
"type",
",",
"label",
"=",
"self",
".",
"label",
",",
"unit",
"=",
"self... | Write the ParamSpec as a dictionary | [
"Write",
"the",
"ParamSpec",
"as",
"a",
"dictionary"
] | [
"\"\"\"\n Write the ParamSpec as a dictionary\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
40c83e80c49cf4c49e68a8a6cc7ace1c2ab0fece | jakeogh/Qcodes | qcodes/dataset/descriptions/param_spec.py | [
"MIT"
] | Python | _from_dict | 'ParamSpecBase' | def _from_dict(cls, ser: ParamSpecBaseDict) -> 'ParamSpecBase':
"""
Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of transformations
of the representation dict.... |
Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of transformations
of the representation dict.
| Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of transformations
of the representation dict. | [
"Create",
"a",
"ParamSpec",
"instance",
"of",
"the",
"current",
"version",
"from",
"a",
"dictionary",
"representation",
"of",
"ParamSpec",
"of",
"some",
"version",
"The",
"version",
"changes",
"must",
"be",
"implemented",
"as",
"a",
"series",
"of",
"transformati... | def _from_dict(cls, ser: ParamSpecBaseDict) -> 'ParamSpecBase':
return ParamSpecBase(name=ser['name'],
paramtype=ser['paramtype'],
label=ser['label'],
unit=ser['unit']) | [
"def",
"_from_dict",
"(",
"cls",
",",
"ser",
":",
"ParamSpecBaseDict",
")",
"->",
"'ParamSpecBase'",
":",
"return",
"ParamSpecBase",
"(",
"name",
"=",
"ser",
"[",
"'name'",
"]",
",",
"paramtype",
"=",
"ser",
"[",
"'paramtype'",
"]",
",",
"label",
"=",
"s... | Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version | [
"Create",
"a",
"ParamSpec",
"instance",
"of",
"the",
"current",
"version",
"from",
"a",
"dictionary",
"representation",
"of",
"ParamSpec",
"of",
"some",
"version"
] | [
"\"\"\"\n Create a ParamSpec instance of the current version\n from a dictionary representation of ParamSpec of some version\n\n The version changes must be implemented as a series of transformations\n of the representation dict.\n \"\"\""
] | [
{
"param": "cls",
"type": null
},
{
"param": "ser",
"type": "ParamSpecBaseDict"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "cls",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "ser",
"type": "ParamSpecBaseDict",
"docstring": null,
"docstri... |
40c83e80c49cf4c49e68a8a6cc7ace1c2ab0fece | jakeogh/Qcodes | qcodes/dataset/descriptions/param_spec.py | [
"MIT"
] | Python | _to_dict | ParamSpecDict | def _to_dict(self) -> ParamSpecDict:
"""
Write the ParamSpec as a dictionary
"""
basedict = super()._to_dict()
output = ParamSpecDict(name=basedict['name'],
paramtype=basedict['paramtype'],
label=basedict['label'],
... |
Write the ParamSpec as a dictionary
| Write the ParamSpec as a dictionary | [
"Write",
"the",
"ParamSpec",
"as",
"a",
"dictionary"
] | def _to_dict(self) -> ParamSpecDict:
basedict = super()._to_dict()
output = ParamSpecDict(name=basedict['name'],
paramtype=basedict['paramtype'],
label=basedict['label'],
unit=basedict['unit'],
... | [
"def",
"_to_dict",
"(",
"self",
")",
"->",
"ParamSpecDict",
":",
"basedict",
"=",
"super",
"(",
")",
".",
"_to_dict",
"(",
")",
"output",
"=",
"ParamSpecDict",
"(",
"name",
"=",
"basedict",
"[",
"'name'",
"]",
",",
"paramtype",
"=",
"basedict",
"[",
"'... | Write the ParamSpec as a dictionary | [
"Write",
"the",
"ParamSpec",
"as",
"a",
"dictionary"
] | [
"\"\"\"\n Write the ParamSpec as a dictionary\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
40c83e80c49cf4c49e68a8a6cc7ace1c2ab0fece | jakeogh/Qcodes | qcodes/dataset/descriptions/param_spec.py | [
"MIT"
] | Python | base_version | ParamSpecBase | def base_version(self) -> ParamSpecBase:
"""
Return a ParamSpecBase object with the same name, paramtype, label
and unit as this ParamSpec
"""
return ParamSpecBase(name=self.name,
paramtype=self.type,
label=self.label,
... |
Return a ParamSpecBase object with the same name, paramtype, label
and unit as this ParamSpec
| Return a ParamSpecBase object with the same name, paramtype, label
and unit as this ParamSpec | [
"Return",
"a",
"ParamSpecBase",
"object",
"with",
"the",
"same",
"name",
"paramtype",
"label",
"and",
"unit",
"as",
"this",
"ParamSpec"
] | def base_version(self) -> ParamSpecBase:
return ParamSpecBase(name=self.name,
paramtype=self.type,
label=self.label,
unit=self.unit) | [
"def",
"base_version",
"(",
"self",
")",
"->",
"ParamSpecBase",
":",
"return",
"ParamSpecBase",
"(",
"name",
"=",
"self",
".",
"name",
",",
"paramtype",
"=",
"self",
".",
"type",
",",
"label",
"=",
"self",
".",
"label",
",",
"unit",
"=",
"self",
".",
... | Return a ParamSpecBase object with the same name, paramtype, label
and unit as this ParamSpec | [
"Return",
"a",
"ParamSpecBase",
"object",
"with",
"the",
"same",
"name",
"paramtype",
"label",
"and",
"unit",
"as",
"this",
"ParamSpec"
] | [
"\"\"\"\n Return a ParamSpecBase object with the same name, paramtype, label\n and unit as this ParamSpec\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
40c83e80c49cf4c49e68a8a6cc7ace1c2ab0fece | jakeogh/Qcodes | qcodes/dataset/descriptions/param_spec.py | [
"MIT"
] | Python | _from_dict | 'ParamSpec' | def _from_dict( # type: ignore[override]
cls,
ser: ParamSpecDict
) -> 'ParamSpec':
"""
Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of tra... |
Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of transformations
of the representation dict.
| Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version
The version changes must be implemented as a series of transformations
of the representation dict. | [
"Create",
"a",
"ParamSpec",
"instance",
"of",
"the",
"current",
"version",
"from",
"a",
"dictionary",
"representation",
"of",
"ParamSpec",
"of",
"some",
"version",
"The",
"version",
"changes",
"must",
"be",
"implemented",
"as",
"a",
"series",
"of",
"transformati... | def _from_dict(
cls,
ser: ParamSpecDict
) -> 'ParamSpec':
return ParamSpec(name=ser['name'],
paramtype=ser['paramtype'],
label=ser['label'],
unit=ser['unit'],
inferred_from=ser['infe... | [
"def",
"_from_dict",
"(",
"cls",
",",
"ser",
":",
"ParamSpecDict",
")",
"->",
"'ParamSpec'",
":",
"return",
"ParamSpec",
"(",
"name",
"=",
"ser",
"[",
"'name'",
"]",
",",
"paramtype",
"=",
"ser",
"[",
"'paramtype'",
"]",
",",
"label",
"=",
"ser",
"[",
... | Create a ParamSpec instance of the current version
from a dictionary representation of ParamSpec of some version | [
"Create",
"a",
"ParamSpec",
"instance",
"of",
"the",
"current",
"version",
"from",
"a",
"dictionary",
"representation",
"of",
"ParamSpec",
"of",
"some",
"version"
] | [
"# type: ignore[override]",
"\"\"\"\n Create a ParamSpec instance of the current version\n from a dictionary representation of ParamSpec of some version\n\n The version changes must be implemented as a series of transformations\n of the representation dict.\n \"\"\""
] | [
{
"param": "cls",
"type": null
},
{
"param": "ser",
"type": "ParamSpecDict"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "cls",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "ser",
"type": "ParamSpecDict",
"docstring": null,
"docstring_t... |
30b8e01ecec08eabcfdc8f734958fa8824409bf3 | jakeogh/Qcodes | qcodes/instrument_drivers/QuantumDesign/DynaCoolPPMS/DynaCool.py | [
"MIT"
] | Python | ramp | None | def ramp(self, mode: str = "blocking") -> None:
"""
Ramp the field to the value given by the `field_target` parameter
Args:
mode: how to ramp, either "blocking" or "non-blocking". In
"blocking" mode, this function does not return until the
target fiel... |
Ramp the field to the value given by the `field_target` parameter
Args:
mode: how to ramp, either "blocking" or "non-blocking". In
"blocking" mode, this function does not return until the
target field has been reached. In "non-blocking" mode, this
... | Ramp the field to the value given by the `field_target` parameter | [
"Ramp",
"the",
"field",
"to",
"the",
"value",
"given",
"by",
"the",
"`",
"field_target",
"`",
"parameter"
] | def ramp(self, mode: str = "blocking") -> None:
if mode not in ['blocking', 'non-blocking']:
raise ValueError('Invalid ramp mode received. Ramp mode must be '
'either "blocking" or "non-blocking", received '
f'"{mode}"')
target_in_tes... | [
"def",
"ramp",
"(",
"self",
",",
"mode",
":",
"str",
"=",
"\"blocking\"",
")",
"->",
"None",
":",
"if",
"mode",
"not",
"in",
"[",
"'blocking'",
",",
"'non-blocking'",
"]",
":",
"raise",
"ValueError",
"(",
"'Invalid ramp mode received. Ramp mode must be '",
"'e... | Ramp the field to the value given by the `field_target` parameter | [
"Ramp",
"the",
"field",
"to",
"the",
"value",
"given",
"by",
"the",
"`",
"field_target",
"`",
"parameter"
] | [
"\"\"\"\n Ramp the field to the value given by the `field_target` parameter\n\n Args:\n mode: how to ramp, either \"blocking\" or \"non-blocking\". In\n \"blocking\" mode, this function does not return until the\n target field has been reached. In \"non-blockin... | [
{
"param": "self",
"type": null
},
{
"param": "mode",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "mode",
"type": "str",
"docstring": null,
"docstring_tokens": ... |
30b8e01ecec08eabcfdc8f734958fa8824409bf3 | jakeogh/Qcodes | qcodes/instrument_drivers/QuantumDesign/DynaCoolPPMS/DynaCool.py | [
"MIT"
] | Python | _do_blocking_ramp | None | def _do_blocking_ramp(self, target_in_tesla: float,
start_field_in_tesla: float) -> None:
"""
Perform a blocking ramp. Only call this function from withing the
`ramp` method.
This method is slow; it waits for the magnet to settle. The waiting is
done in... |
Perform a blocking ramp. Only call this function from withing the
`ramp` method.
This method is slow; it waits for the magnet to settle. The waiting is
done in two steps, since users have reported that the magnet state does
not immediately change to 'ramping' when asked to ramp... | Perform a blocking ramp. Only call this function from withing the
`ramp` method.
This method is slow; it waits for the magnet to settle. The waiting is
done in two steps, since users have reported that the magnet state does
not immediately change to 'ramping' when asked to ramp. | [
"Perform",
"a",
"blocking",
"ramp",
".",
"Only",
"call",
"this",
"function",
"from",
"withing",
"the",
"`",
"ramp",
"`",
"method",
".",
"This",
"method",
"is",
"slow",
";",
"it",
"waits",
"for",
"the",
"magnet",
"to",
"settle",
".",
"The",
"waiting",
"... | def _do_blocking_ramp(self, target_in_tesla: float,
start_field_in_tesla: float) -> None:
target_in_oe = target_in_tesla*1e4
ramp_range = np.abs(target_in_tesla - start_field_in_tesla)
self._field_setter(param='field_target', value=target_in_oe)
while np.abs(sel... | [
"def",
"_do_blocking_ramp",
"(",
"self",
",",
"target_in_tesla",
":",
"float",
",",
"start_field_in_tesla",
":",
"float",
")",
"->",
"None",
":",
"target_in_oe",
"=",
"target_in_tesla",
"*",
"1e4",
"ramp_range",
"=",
"np",
".",
"abs",
"(",
"target_in_tesla",
"... | Perform a blocking ramp. | [
"Perform",
"a",
"blocking",
"ramp",
"."
] | [
"\"\"\"\n Perform a blocking ramp. Only call this function from withing the\n `ramp` method.\n\n This method is slow; it waits for the magnet to settle. The waiting is\n done in two steps, since users have reported that the magnet state does\n not immediately change to 'ramping' w... | [
{
"param": "self",
"type": null
},
{
"param": "target_in_tesla",
"type": "float"
},
{
"param": "start_field_in_tesla",
"type": "float"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "target_in_tesla",
"type": "float",
"docstring": null,
"docstr... |
30b8e01ecec08eabcfdc8f734958fa8824409bf3 | jakeogh/Qcodes | qcodes/instrument_drivers/QuantumDesign/DynaCoolPPMS/DynaCool.py | [
"MIT"
] | Python | _field_getter | Union[int, float] | def _field_getter(self, param_name: str) -> Union[int, float]:
"""
The combined get function for the three field parameters,
field_setpoint, field_rate, and field_approach
"""
raw_response = self.ask('GLFS?')
sp = self._pick_one(1, float, raw_response)
rate = self... |
The combined get function for the three field parameters,
field_setpoint, field_rate, and field_approach
| The combined get function for the three field parameters,
field_setpoint, field_rate, and field_approach | [
"The",
"combined",
"get",
"function",
"for",
"the",
"three",
"field",
"parameters",
"field_setpoint",
"field_rate",
"and",
"field_approach"
] | def _field_getter(self, param_name: str) -> Union[int, float]:
raw_response = self.ask('GLFS?')
sp = self._pick_one(1, float, raw_response)
rate = self._pick_one(2, float, raw_response)
approach = self._pick_one(3, int, raw_response)
return dict(zip(self.field_params, [sp, rate, ... | [
"def",
"_field_getter",
"(",
"self",
",",
"param_name",
":",
"str",
")",
"->",
"Union",
"[",
"int",
",",
"float",
"]",
":",
"raw_response",
"=",
"self",
".",
"ask",
"(",
"'GLFS?'",
")",
"sp",
"=",
"self",
".",
"_pick_one",
"(",
"1",
",",
"float",
"... | The combined get function for the three field parameters,
field_setpoint, field_rate, and field_approach | [
"The",
"combined",
"get",
"function",
"for",
"the",
"three",
"field",
"parameters",
"field_setpoint",
"field_rate",
"and",
"field_approach"
] | [
"\"\"\"\n The combined get function for the three field parameters,\n field_setpoint, field_rate, and field_approach\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "param_name",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "param_name",
"type": "str",
"docstring": null,
"docstring_tok... |
30b8e01ecec08eabcfdc8f734958fa8824409bf3 | jakeogh/Qcodes | qcodes/instrument_drivers/QuantumDesign/DynaCoolPPMS/DynaCool.py | [
"MIT"
] | Python | _field_setter | None | def _field_setter(self, param: str, value: float) -> None:
"""
The combined set function for the three field parameters,
field_setpoint, field_rate, and field_approach
"""
temporary_values = list(self.parameters[p].raw_value
for p in self.field_par... |
The combined set function for the three field parameters,
field_setpoint, field_rate, and field_approach
| The combined set function for the three field parameters,
field_setpoint, field_rate, and field_approach | [
"The",
"combined",
"set",
"function",
"for",
"the",
"three",
"field",
"parameters",
"field_setpoint",
"field_rate",
"and",
"field_approach"
] | def _field_setter(self, param: str, value: float) -> None:
temporary_values = list(self.parameters[p].raw_value
for p in self.field_params)
values = cast(List[Union[int, float]], temporary_values)
values[self.field_params.index(param)] = value
self.write(f... | [
"def",
"_field_setter",
"(",
"self",
",",
"param",
":",
"str",
",",
"value",
":",
"float",
")",
"->",
"None",
":",
"temporary_values",
"=",
"list",
"(",
"self",
".",
"parameters",
"[",
"p",
"]",
".",
"raw_value",
"for",
"p",
"in",
"self",
".",
"field... | The combined set function for the three field parameters,
field_setpoint, field_rate, and field_approach | [
"The",
"combined",
"set",
"function",
"for",
"the",
"three",
"field",
"parameters",
"field_setpoint",
"field_rate",
"and",
"field_approach"
] | [
"\"\"\"\n The combined set function for the three field parameters,\n field_setpoint, field_rate, and field_approach\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "param",
"type": "str"
},
{
"param": "value",
"type": "float"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "param",
"type": "str",
"docstring": null,
"docstring_tokens":... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | validate_value | None | def validate_value(self, row: int, column: int) -> None:
"""
to check if the row and column number is within the range of the module
layout.
Args:
row: row value
column: column value
"""
raise NotImplementedError("Please subclass this") |
to check if the row and column number is within the range of the module
layout.
Args:
row: row value
column: column value
| to check if the row and column number is within the range of the module
layout. | [
"to",
"check",
"if",
"the",
"row",
"and",
"column",
"number",
"is",
"within",
"the",
"range",
"of",
"the",
"module",
"layout",
"."
] | def validate_value(self, row: int, column: int) -> None:
raise NotImplementedError("Please subclass this") | [
"def",
"validate_value",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"None",
":",
"raise",
"NotImplementedError",
"(",
"\"Please subclass this\"",
")"
] | to check if the row and column number is within the range of the module
layout. | [
"to",
"check",
"if",
"the",
"row",
"and",
"column",
"number",
"is",
"within",
"the",
"range",
"of",
"the",
"module",
"layout",
"."
] | [
"\"\"\"\n to check if the row and column number is within the range of the module\n layout.\n\n Args:\n row: row value\n column: column value\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "row",
"type": "int",
"docstring": null,
"docstring_tokens": [... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | to_channel_list | str | def to_channel_list(
self,
paths: List[Tuple[int, int]],
wiring_config: Optional[str] = None
) -> str:
"""
convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function.
... |
convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function.
This may be different for different modules.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
wiri... | convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function.
This may be different for different modules. | [
"convert",
"the",
"(",
"row",
"column",
")",
"pair",
"to",
"a",
"4",
"-",
"digit",
"channel",
"number",
"'",
"sxxx",
"'",
"where",
"s",
"is",
"the",
"slot",
"number",
"xxx",
"is",
"generated",
"from",
"the",
"numbering",
"function",
".",
"This",
"may",... | def to_channel_list(
self,
paths: List[Tuple[int, int]],
wiring_config: Optional[str] = None
) -> str:
raise NotImplementedError("Please subclass this") | [
"def",
"to_channel_list",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
",",
"wiring_config",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
")",
"->",
"str",
":",
"raise",
"NotImplementedError",
"(",
"\"Please... | convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function. | [
"convert",
"the",
"(",
"row",
"column",
")",
"pair",
"to",
"a",
"4",
"-",
"digit",
"channel",
"number",
"'",
"sxxx",
"'",
"where",
"s",
"is",
"the",
"slot",
"number",
"xxx",
"is",
"generated",
"from",
"the",
"numbering",
"function",
"."
] | [
"\"\"\"\n convert the (row, column) pair to a 4-digit channel number 'sxxx', where\n s is the slot number, xxx is generated from the numbering function.\n This may be different for different modules.\n\n Args:\n paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]... | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
},
{
"param": "wiring_config",
"type": "Optional[str]"
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | is_open | bool | def is_open(self, row: int, column: int) -> bool:
"""
to check if a channel is open/disconnected
Args:
row: row number
column: column number
Returns:
True if the channel is open/disconnected
False if it's closed/connected.
"""
... |
to check if a channel is open/disconnected
Args:
row: row number
column: column number
Returns:
True if the channel is open/disconnected
False if it's closed/connected.
| to check if a channel is open/disconnected | [
"to",
"check",
"if",
"a",
"channel",
"is",
"open",
"/",
"disconnected"
] | def is_open(self, row: int, column: int) -> bool:
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
message = self.ask(f'ROUT:OPEN? {channel}')
return bool(int(message)) | [
"def",
"is_open",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"bool",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")",
"channel",
"=",
"self",
".",
"to_channel_list",
"(",
"[",
"(",
"row",
",",
"col... | to check if a channel is open/disconnected | [
"to",
"check",
"if",
"a",
"channel",
"is",
"open",
"/",
"disconnected"
] | [
"\"\"\"\n to check if a channel is open/disconnected\n\n Args:\n row: row number\n column: column number\n\n Returns:\n True if the channel is open/disconnected\n False if it's closed/connected.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [
{
"docstring": "True if the channel is open/disconnected\nFalse if it's closed/connected.",
"docstring_tokens": [
"True",
"if",
"the",
"channel",
"is",
"open",
"/",
"disconnected",
"False",
"if",
"it... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | is_closed | bool | def is_closed(self, row: int, column: int) -> bool:
"""
to check if a channel is closed/connected
Args:
row: row number
column: column number
Returns:
True if the channel is closed/connected
False if it's open/disconnected.
"""
... |
to check if a channel is closed/connected
Args:
row: row number
column: column number
Returns:
True if the channel is closed/connected
False if it's open/disconnected.
| to check if a channel is closed/connected | [
"to",
"check",
"if",
"a",
"channel",
"is",
"closed",
"/",
"connected"
] | def is_closed(self, row: int, column: int) -> bool:
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
message = self.ask(f'ROUT:CLOSe? {channel}')
return bool(int(message)) | [
"def",
"is_closed",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"bool",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")",
"channel",
"=",
"self",
".",
"to_channel_list",
"(",
"[",
"(",
"row",
",",
"c... | to check if a channel is closed/connected | [
"to",
"check",
"if",
"a",
"channel",
"is",
"closed",
"/",
"connected"
] | [
"\"\"\"\n to check if a channel is closed/connected\n\n Args:\n row: row number\n column: column number\n\n Returns:\n True if the channel is closed/connected\n False if it's open/disconnected.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [
{
"docstring": "True if the channel is closed/connected\nFalse if it's open/disconnected.",
"docstring_tokens": [
"True",
"if",
"the",
"channel",
"is",
"closed",
"/",
"connected",
"False",
"if",
"it"... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | connect | None | def connect(self, row: int, column: int) -> None:
"""
to connect/close the specified channels
Args:
row: row number
column: column number
"""
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
self.write(f'ROU... |
to connect/close the specified channels
Args:
row: row number
column: column number
| to connect/close the specified channels | [
"to",
"connect",
"/",
"close",
"the",
"specified",
"channels"
] | def connect(self, row: int, column: int) -> None:
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
self.write(f'ROUT:CLOSe {channel}') | [
"def",
"connect",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"None",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")",
"channel",
"=",
"self",
".",
"to_channel_list",
"(",
"[",
"(",
"row",
",",
"col... | to connect/close the specified channels | [
"to",
"connect",
"/",
"close",
"the",
"specified",
"channels"
] | [
"\"\"\"\n to connect/close the specified channels\n\n Args:\n row: row number\n column: column number\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "row",
"type": "int",
"docstring": null,
"docstring_tokens": [... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | disconnect | None | def disconnect(self, row: int, column: int) -> None:
"""
to disconnect/open the specified channels
Args:
row: row number
column: column number
"""
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
self.write(... |
to disconnect/open the specified channels
Args:
row: row number
column: column number
| to disconnect/open the specified channels | [
"to",
"disconnect",
"/",
"open",
"the",
"specified",
"channels"
] | def disconnect(self, row: int, column: int) -> None:
self.validate_value(row, column)
channel = self.to_channel_list([(row, column)])
self.write(f'ROUT:OPEN {channel}') | [
"def",
"disconnect",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"None",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")",
"channel",
"=",
"self",
".",
"to_channel_list",
"(",
"[",
"(",
"row",
",",
"... | to disconnect/open the specified channels | [
"to",
"disconnect",
"/",
"open",
"the",
"specified",
"channels"
] | [
"\"\"\"\n to disconnect/open the specified channels\n\n Args:\n row: row number\n column: column number\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "row",
"type": "int",
"docstring": null,
"docstring_tokens": [... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | connect_paths | None | def connect_paths(self, paths: List[Tuple[int, int]]) -> None:
"""
to connect/close the specified channels.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
"""
for row, column in paths:
self.validate_value(row, column)
chan... |
to connect/close the specified channels.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
| to connect/close the specified channels. | [
"to",
"connect",
"/",
"close",
"the",
"specified",
"channels",
"."
] | def connect_paths(self, paths: List[Tuple[int, int]]) -> None:
for row, column in paths:
self.validate_value(row, column)
channel_list_str = self.to_channel_list(paths)
self.write(f"ROUTe:CLOSe {channel_list_str}") | [
"def",
"connect_paths",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
")",
"->",
"None",
":",
"for",
"row",
",",
"column",
"in",
"paths",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")",
... | to connect/close the specified channels. | [
"to",
"connect",
"/",
"close",
"the",
"specified",
"channels",
"."
] | [
"\"\"\"\n to connect/close the specified channels.\n\n Args:\n paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "paths",
"type": "List[Tuple[int, int]]",
"docstring": null,
"... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | disconnect_paths | None | def disconnect_paths(self, paths: List[Tuple[int, int]]) -> None:
"""
to disconnect/open the specified channels.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
"""
for row, column in paths:
self.validate_value(row, column)
... |
to disconnect/open the specified channels.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
| to disconnect/open the specified channels. | [
"to",
"disconnect",
"/",
"open",
"the",
"specified",
"channels",
"."
] | def disconnect_paths(self, paths: List[Tuple[int, int]]) -> None:
for row, column in paths:
self.validate_value(row, column)
channel_list_str = self.to_channel_list(paths)
self.write(f"ROUTe:OPEN {channel_list_str}") | [
"def",
"disconnect_paths",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
")",
"->",
"None",
":",
"for",
"row",
",",
"column",
"in",
"paths",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
"column",
")... | to disconnect/open the specified channels. | [
"to",
"disconnect",
"/",
"open",
"the",
"specified",
"channels",
"."
] | [
"\"\"\"\n to disconnect/open the specified channels.\n\n Args:\n paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "paths",
"type": "List[Tuple[int, int]]",
"docstring": null,
"... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | are_closed | List[bool] | def are_closed(self, paths: List[Tuple[int, int]]) -> List[bool]:
"""
to check if a list of channels is closed/connected
Args:
paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]
Returns:
a list of True and/or False
True if the channel is closed/c... |
to check if a list of channels is closed/connected
Args:
paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]
Returns:
a list of True and/or False
True if the channel is closed/connected
False if it's open/disconnected.
| to check if a list of channels is closed/connected | [
"to",
"check",
"if",
"a",
"list",
"of",
"channels",
"is",
"closed",
"/",
"connected"
] | def are_closed(self, paths: List[Tuple[int, int]]) -> List[bool]:
for row, column in paths:
self.validate_value(row, column)
channel_list_str = self.to_channel_list(paths)
messages = self.ask(f"ROUTe:CLOSe? {channel_list_str}")
return [bool(int(message)) for message in messag... | [
"def",
"are_closed",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
")",
"->",
"List",
"[",
"bool",
"]",
":",
"for",
"row",
",",
"column",
"in",
"paths",
":",
"self",
".",
"validate_value",
"(",
"row",
","... | to check if a list of channels is closed/connected | [
"to",
"check",
"if",
"a",
"list",
"of",
"channels",
"is",
"closed",
"/",
"connected"
] | [
"\"\"\"\n to check if a list of channels is closed/connected\n\n Args:\n paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]\n\n Returns:\n a list of True and/or False\n True if the channel is closed/connected\n False if it's open/disconnected.\n ... | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
}
] | {
"returns": [
{
"docstring": "a list of True and/or False\nTrue if the channel is closed/connected\nFalse if it's open/disconnected.",
"docstring_tokens": [
"a",
"list",
"of",
"True",
"and",
"/",
"or",
"False",
"True",
"i... |
746cb101f911a5e442fa3139cab3f808335c9cda | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34980a_submodules.py | [
"MIT"
] | Python | are_open | List[bool] | def are_open(self, paths: List[Tuple[int, int]]) -> List[bool]:
"""
to check if a list of channels is open/disconnected
Args:
paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]
Returns:
a list of True and/or False
True if the channel is closed/co... |
to check if a list of channels is open/disconnected
Args:
paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]
Returns:
a list of True and/or False
True if the channel is closed/connected
False if it's open/disconnected.
| to check if a list of channels is open/disconnected | [
"to",
"check",
"if",
"a",
"list",
"of",
"channels",
"is",
"open",
"/",
"disconnected"
] | def are_open(self, paths: List[Tuple[int, int]]) -> List[bool]:
for row, column in paths:
self.validate_value(row, column)
channel_list_str = self.to_channel_list(paths)
messages = self.ask(f"ROUTe:OPEN? {channel_list_str}")
return [bool(int(message)) for message in messages.... | [
"def",
"are_open",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
")",
"->",
"List",
"[",
"bool",
"]",
":",
"for",
"row",
",",
"column",
"in",
"paths",
":",
"self",
".",
"validate_value",
"(",
"row",
",",
... | to check if a list of channels is open/disconnected | [
"to",
"check",
"if",
"a",
"list",
"of",
"channels",
"is",
"open",
"/",
"disconnected"
] | [
"\"\"\"\n to check if a list of channels is open/disconnected\n\n Args:\n paths: list of channels [(r1, c1), (r2, c2), (r3, c3)]\n\n Returns:\n a list of True and/or False\n True if the channel is closed/connected\n False if it's open/disconnected.\n ... | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
}
] | {
"returns": [
{
"docstring": "a list of True and/or False\nTrue if the channel is closed/connected\nFalse if it's open/disconnected.",
"docstring_tokens": [
"a",
"list",
"of",
"True",
"and",
"/",
"or",
"False",
"True",
"i... |
9a8b850f96042caac0eb4574e3d5756be389d7c6 | jakeogh/Qcodes | qcodes/utils/helpers.py | [
"MIT"
] | Python | is_function | bool | def is_function(f: Callable[..., Any],
arg_count: int, coroutine: bool = False) -> bool:
"""
Check and require a function that can accept the specified number of
positional arguments, which either is or is not a coroutine
type casting "functions" are allowed, but only in the 1-argument f... |
Check and require a function that can accept the specified number of
positional arguments, which either is or is not a coroutine
type casting "functions" are allowed, but only in the 1-argument form.
Args:
f: Function to check.
arg_count: Number of argument f should accept.
cor... | Check and require a function that can accept the specified number of
positional arguments, which either is or is not a coroutine
type casting "functions" are allowed, but only in the 1-argument form. | [
"Check",
"and",
"require",
"a",
"function",
"that",
"can",
"accept",
"the",
"specified",
"number",
"of",
"positional",
"arguments",
"which",
"either",
"is",
"or",
"is",
"not",
"a",
"coroutine",
"type",
"casting",
"\"",
"functions",
"\"",
"are",
"allowed",
"b... | def is_function(f: Callable[..., Any],
arg_count: int, coroutine: bool = False) -> bool:
if not isinstance(arg_count, int) or arg_count < 0:
raise TypeError('arg_count must be a non-negative integer')
if not (callable(f) and bool(coroutine) is iscoroutinefunction(f)):
return Fals... | [
"def",
"is_function",
"(",
"f",
":",
"Callable",
"[",
"...",
",",
"Any",
"]",
",",
"arg_count",
":",
"int",
",",
"coroutine",
":",
"bool",
"=",
"False",
")",
"->",
"bool",
":",
"if",
"not",
"isinstance",
"(",
"arg_count",
",",
"int",
")",
"or",
"ar... | Check and require a function that can accept the specified number of
positional arguments, which either is or is not a coroutine
type casting "functions" are allowed, but only in the 1-argument form. | [
"Check",
"and",
"require",
"a",
"function",
"that",
"can",
"accept",
"the",
"specified",
"number",
"of",
"positional",
"arguments",
"which",
"either",
"is",
"or",
"is",
"not",
"a",
"coroutine",
"type",
"casting",
"\"",
"functions",
"\"",
"are",
"allowed",
"b... | [
"\"\"\"\n Check and require a function that can accept the specified number of\n positional arguments, which either is or is not a coroutine\n type casting \"functions\" are allowed, but only in the 1-argument form.\n\n Args:\n f: Function to check.\n arg_count: Number of argument f should... | [
{
"param": "f",
"type": "Callable[..., Any]"
},
{
"param": "arg_count",
"type": "int"
},
{
"param": "coroutine",
"type": "bool"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "f",
"type": "Callable[..., Any]",
"docstring": "Function to check.",
"docstring_tokens": [
"Function",
"to",
"check",
"."
],
"default": null,
"is_optional": null
},
{
... |
d4e32be36f7562c48662e0b2427f3d2246b8b603 | jakeogh/Qcodes | qcodes/dataset/sqlite/db_upgrades/upgrade_3_to_4.py | [
"MIT"
] | Python | upgrade_3_to_4 | None | def upgrade_3_to_4(conn: ConnectionPlus) -> None:
"""
Perform the upgrade from version 3 to version 4. This really
repeats the version 3 upgrade as it originally had two bugs in
the inferred annotation. inferred_from was passed incorrectly
resulting in the parameter being marked inferred_from for ea... |
Perform the upgrade from version 3 to version 4. This really
repeats the version 3 upgrade as it originally had two bugs in
the inferred annotation. inferred_from was passed incorrectly
resulting in the parameter being marked inferred_from for each char
in the inferred_from variable and inferred_fr... | Perform the upgrade from version 3 to version 4. This really
repeats the version 3 upgrade as it originally had two bugs in
the inferred annotation. inferred_from was passed incorrectly
resulting in the parameter being marked inferred_from for each char
in the inferred_from variable and inferred_from was not handled
co... | [
"Perform",
"the",
"upgrade",
"from",
"version",
"3",
"to",
"version",
"4",
".",
"This",
"really",
"repeats",
"the",
"version",
"3",
"upgrade",
"as",
"it",
"originally",
"had",
"two",
"bugs",
"in",
"the",
"inferred",
"annotation",
".",
"inferred_from",
"was",... | def upgrade_3_to_4(conn: ConnectionPlus) -> None:
no_of_runs_query = "SELECT max(run_id) FROM runs"
no_of_runs = one(atomic_transaction(conn, no_of_runs_query), 'max(run_id)')
no_of_runs = no_of_runs or 0
with atomic(conn) as conn:
result_tables = _2to3_get_result_tables(conn)
layout_ids... | [
"def",
"upgrade_3_to_4",
"(",
"conn",
":",
"ConnectionPlus",
")",
"->",
"None",
":",
"no_of_runs_query",
"=",
"\"SELECT max(run_id) FROM runs\"",
"no_of_runs",
"=",
"one",
"(",
"atomic_transaction",
"(",
"conn",
",",
"no_of_runs_query",
")",
",",
"'max(run_id)'",
")... | Perform the upgrade from version 3 to version 4. | [
"Perform",
"the",
"upgrade",
"from",
"version",
"3",
"to",
"version",
"4",
"."
] | [
"\"\"\"\n Perform the upgrade from version 3 to version 4. This really\n repeats the version 3 upgrade as it originally had two bugs in\n the inferred annotation. inferred_from was passed incorrectly\n resulting in the parameter being marked inferred_from for each char\n in the inferred_from variable... | [
{
"param": "conn",
"type": "ConnectionPlus"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "conn",
"type": "ConnectionPlus",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
4b9ae9ec99940151c1169f8660681db6a599992e | jakeogh/Qcodes | qcodes/utils/threading.py | [
"MIT"
] | Python | thread_map | List[Optional[T]] | def thread_map(
callables: Sequence[Callable[..., T]],
args: Optional[Sequence[Sequence[Any]]] = None,
kwargs: Optional[Sequence[Dict[str, Any]]] = None
) -> List[Optional[T]]:
"""
Evaluate a sequence of callables in separate threads, returning
a list of their return values.
Arg... |
Evaluate a sequence of callables in separate threads, returning
a list of their return values.
Args:
callables: A sequence of callables.
args (Optional): A sequence of sequences containing the positional
arguments for each callable.
kwargs (Optional): A sequence of dict... | Evaluate a sequence of callables in separate threads, returning
a list of their return values. | [
"Evaluate",
"a",
"sequence",
"of",
"callables",
"in",
"separate",
"threads",
"returning",
"a",
"list",
"of",
"their",
"return",
"values",
"."
] | def thread_map(
callables: Sequence[Callable[..., T]],
args: Optional[Sequence[Sequence[Any]]] = None,
kwargs: Optional[Sequence[Dict[str, Any]]] = None
) -> List[Optional[T]]:
if args is None:
args = ((),) * len(callables)
if kwargs is None:
empty_dict: Dict[str, Any] = ... | [
"def",
"thread_map",
"(",
"callables",
":",
"Sequence",
"[",
"Callable",
"[",
"...",
",",
"T",
"]",
"]",
",",
"args",
":",
"Optional",
"[",
"Sequence",
"[",
"Sequence",
"[",
"Any",
"]",
"]",
"]",
"=",
"None",
",",
"kwargs",
":",
"Optional",
"[",
"S... | Evaluate a sequence of callables in separate threads, returning
a list of their return values. | [
"Evaluate",
"a",
"sequence",
"of",
"callables",
"in",
"separate",
"threads",
"returning",
"a",
"list",
"of",
"their",
"return",
"values",
"."
] | [
"\"\"\"\n Evaluate a sequence of callables in separate threads, returning\n a list of their return values.\n\n Args:\n callables: A sequence of callables.\n args (Optional): A sequence of sequences containing the positional\n arguments for each callable.\n kwargs (Optional):... | [
{
"param": "callables",
"type": "Sequence[Callable[..., T]]"
},
{
"param": "args",
"type": "Optional[Sequence[Sequence[Any]]]"
},
{
"param": "kwargs",
"type": "Optional[Sequence[Dict[str, Any]]]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "callables",
"type": "Sequence[Callable[..., T]]",
"docstring": "A sequence of callables.",
"docstring_tokens": [
"A",
"sequence",
"of",
"callables",
"."
],
"default": null,
... |
4b9ae9ec99940151c1169f8660681db6a599992e | jakeogh/Qcodes | qcodes/utils/threading.py | [
"MIT"
] | Python | call_params_threaded | OutType | def call_params_threaded(param_meas: Sequence[ParamMeasT]) -> OutType:
"""
Function to create threads per instrument for the given set of
measurement parameters.
Args:
param_meas: a Sequence of measurement parameters
"""
inst_param_mapping = _instrument_to_param(param_meas)
execut... |
Function to create threads per instrument for the given set of
measurement parameters.
Args:
param_meas: a Sequence of measurement parameters
| Function to create threads per instrument for the given set of
measurement parameters. | [
"Function",
"to",
"create",
"threads",
"per",
"instrument",
"for",
"the",
"given",
"set",
"of",
"measurement",
"parameters",
"."
] | def call_params_threaded(param_meas: Sequence[ParamMeasT]) -> OutType:
inst_param_mapping = _instrument_to_param(param_meas)
executors = tuple(_ParamCaller(*param_list)
for param_list in
inst_param_mapping.values())
output: OutType = []
threads = [RespondingTh... | [
"def",
"call_params_threaded",
"(",
"param_meas",
":",
"Sequence",
"[",
"ParamMeasT",
"]",
")",
"->",
"OutType",
":",
"inst_param_mapping",
"=",
"_instrument_to_param",
"(",
"param_meas",
")",
"executors",
"=",
"tuple",
"(",
"_ParamCaller",
"(",
"*",
"param_list",... | Function to create threads per instrument for the given set of
measurement parameters. | [
"Function",
"to",
"create",
"threads",
"per",
"instrument",
"for",
"the",
"given",
"set",
"of",
"measurement",
"parameters",
"."
] | [
"\"\"\"\n Function to create threads per instrument for the given set of\n measurement parameters.\n\n Args:\n param_meas: a Sequence of measurement parameters\n\n \"\"\""
] | [
{
"param": "param_meas",
"type": "Sequence[ParamMeasT]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "param_meas",
"type": "Sequence[ParamMeasT]",
"docstring": "a Sequence of measurement parameters",
"docstring_tokens": [
"a",
"Sequence",
"of",
"measurement",
"parameters"
],
... |
787a31289905e9c5a89acfd0aebe61bf72e756a4 | jakeogh/Qcodes | qcodes/instrument/function.py | [
"MIT"
] | Python | validate | None | def validate(self, *args: Any) -> None:
"""
Check that all arguments to this Function are allowed.
Args:
*args: Variable length argument list, passed to the call_cmd
"""
if self._instrument:
func_name = (getattr(self._instrument, 'name', '') or
... |
Check that all arguments to this Function are allowed.
Args:
*args: Variable length argument list, passed to the call_cmd
| Check that all arguments to this Function are allowed. | [
"Check",
"that",
"all",
"arguments",
"to",
"this",
"Function",
"are",
"allowed",
"."
] | def validate(self, *args: Any) -> None:
if self._instrument:
func_name = (getattr(self._instrument, 'name', '') or
str(self._instrument.__class__)) + '.' + self.name
else:
func_name = self.name
if len(args) != self._arg_count:
raise Ty... | [
"def",
"validate",
"(",
"self",
",",
"*",
"args",
":",
"Any",
")",
"->",
"None",
":",
"if",
"self",
".",
"_instrument",
":",
"func_name",
"=",
"(",
"getattr",
"(",
"self",
".",
"_instrument",
",",
"'name'",
",",
"''",
")",
"or",
"str",
"(",
"self",... | Check that all arguments to this Function are allowed. | [
"Check",
"that",
"all",
"arguments",
"to",
"this",
"Function",
"are",
"allowed",
"."
] | [
"\"\"\"\n Check that all arguments to this Function are allowed.\n\n Args:\n *args: Variable length argument list, passed to the call_cmd\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "args",
"type": "Any"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "args",
"type": "Any",
"docstring": null,
"docstring_tokens": ... |
46746e7f98a95b198691604a29a4910c6af1d661 | jakeogh/Qcodes | qcodes/loops.py | [
"MIT"
] | Python | each | <not_specific> | def each(self, *actions):
"""
Perform a set of actions at each setting of this loop.
TODO(setting vs setpoints) ? better be verbose.
Args:
*actions (Any): actions to perform at each setting of the loop
Each action can be:
- a Parameter to measure
- ... |
Perform a set of actions at each setting of this loop.
TODO(setting vs setpoints) ? better be verbose.
Args:
*actions (Any): actions to perform at each setting of the loop
Each action can be:
- a Parameter to measure
- a Task to execute
- a Wait
... | Perform a set of actions at each setting of this loop. | [
"Perform",
"a",
"set",
"of",
"actions",
"at",
"each",
"setting",
"of",
"this",
"loop",
"."
] | def each(self, *actions):
actions = list(actions)
self.validate_actions(*actions)
if self.nested_loop:
actions = [self.nested_loop.each(*actions)]
return ActiveLoop(self.sweep_values, self.delay, *actions,
then_actions=self.then_actions, station=self... | [
"def",
"each",
"(",
"self",
",",
"*",
"actions",
")",
":",
"actions",
"=",
"list",
"(",
"actions",
")",
"self",
".",
"validate_actions",
"(",
"*",
"actions",
")",
"if",
"self",
".",
"nested_loop",
":",
"actions",
"=",
"[",
"self",
".",
"nested_loop",
... | Perform a set of actions at each setting of this loop. | [
"Perform",
"a",
"set",
"of",
"actions",
"at",
"each",
"setting",
"of",
"this",
"loop",
"."
] | [
"\"\"\"\n Perform a set of actions at each setting of this loop.\n TODO(setting vs setpoints) ? better be verbose.\n\n Args:\n *actions (Any): actions to perform at each setting of the loop\n\n Each action can be:\n\n - a Parameter to measure\n - a Task to execut... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [
{
"identifier": "*actions",
"type": null,
"docstring": "ac... |
46746e7f98a95b198691604a29a4910c6af1d661 | jakeogh/Qcodes | qcodes/loops.py | [
"MIT"
] | Python | snapshot_base | <not_specific> | def snapshot_base(self, update: Optional[bool] = False,
params_to_skip_update: Optional[Sequence[str]] = None):
"""
State of the loop as a JSON-compatible dict (everything that
the custom JSON encoder class :class:'qcodes.utils.helpers.NumpyJSONEncoder'
supports).
... |
State of the loop as a JSON-compatible dict (everything that
the custom JSON encoder class :class:'qcodes.utils.helpers.NumpyJSONEncoder'
supports).
Args:
update: If True, update the state by querying the underlying
sweep_values and actions. If None only upd... | State of the loop as a JSON-compatible dict (everything that
the custom JSON encoder class :class:'qcodes.utils.helpers.NumpyJSONEncoder'
supports). | [
"State",
"of",
"the",
"loop",
"as",
"a",
"JSON",
"-",
"compatible",
"dict",
"(",
"everything",
"that",
"the",
"custom",
"JSON",
"encoder",
"class",
":",
"class",
":",
"'",
"qcodes",
".",
"utils",
".",
"helpers",
".",
"NumpyJSONEncoder",
"'",
"supports",
... | def snapshot_base(self, update: Optional[bool] = False,
params_to_skip_update: Optional[Sequence[str]] = None):
return {
'__class__': full_class(self),
'sweep_values': self.sweep_values.snapshot(update=update),
'delay': self.delay,
'then_acti... | [
"def",
"snapshot_base",
"(",
"self",
",",
"update",
":",
"Optional",
"[",
"bool",
"]",
"=",
"False",
",",
"params_to_skip_update",
":",
"Optional",
"[",
"Sequence",
"[",
"str",
"]",
"]",
"=",
"None",
")",
":",
"return",
"{",
"'__class__'",
":",
"full_cla... | State of the loop as a JSON-compatible dict (everything that
the custom JSON encoder class :class:'qcodes.utils.helpers.NumpyJSONEncoder'
supports). | [
"State",
"of",
"the",
"loop",
"as",
"a",
"JSON",
"-",
"compatible",
"dict",
"(",
"everything",
"that",
"the",
"custom",
"JSON",
"encoder",
"class",
":",
"class",
":",
"'",
"qcodes",
".",
"utils",
".",
"helpers",
".",
"NumpyJSONEncoder",
"'",
"supports",
... | [
"\"\"\"\n State of the loop as a JSON-compatible dict (everything that\n the custom JSON encoder class :class:'qcodes.utils.helpers.NumpyJSONEncoder'\n supports).\n\n Args:\n update: If True, update the state by querying the underlying\n sweep_values and actions... | [
{
"param": "self",
"type": null
},
{
"param": "update",
"type": "Optional[bool]"
},
{
"param": "params_to_skip_update",
"type": "Optional[Sequence[str]]"
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": "dict"
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
46746e7f98a95b198691604a29a4910c6af1d661 | jakeogh/Qcodes | qcodes/loops.py | [
"MIT"
] | Python | snapshot_base | <not_specific> | def snapshot_base(self, update=False,
params_to_skip_update: Optional[Sequence[str]] = None):
"""Snapshot of this ActiveLoop's definition."""
return {
'__class__': full_class(self),
'sweep_values': self.sweep_values.snapshot(update=update),
'dela... | Snapshot of this ActiveLoop's definition. | Snapshot of this ActiveLoop's definition. | [
"Snapshot",
"of",
"this",
"ActiveLoop",
"'",
"s",
"definition",
"."
] | def snapshot_base(self, update=False,
params_to_skip_update: Optional[Sequence[str]] = None):
return {
'__class__': full_class(self),
'sweep_values': self.sweep_values.snapshot(update=update),
'delay': self.delay,
'actions': _actions_snapshot... | [
"def",
"snapshot_base",
"(",
"self",
",",
"update",
"=",
"False",
",",
"params_to_skip_update",
":",
"Optional",
"[",
"Sequence",
"[",
"str",
"]",
"]",
"=",
"None",
")",
":",
"return",
"{",
"'__class__'",
":",
"full_class",
"(",
"self",
")",
",",
"'sweep... | Snapshot of this ActiveLoop's definition. | [
"Snapshot",
"of",
"this",
"ActiveLoop",
"'",
"s",
"definition",
"."
] | [
"\"\"\"Snapshot of this ActiveLoop's definition.\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "update",
"type": null
},
{
"param": "params_to_skip_update",
"type": "Optional[Sequence[str]]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "update",
"type": null,
"docstring": null,
"docstring_tokens":... |
46746e7f98a95b198691604a29a4910c6af1d661 | jakeogh/Qcodes | qcodes/loops.py | [
"MIT"
] | Python | _run_loop | null | def _run_loop(self, first_delay=0, action_indices=(),
loop_indices=(), current_values=(),
**ignore_kwargs):
"""
the routine that actually executes the loop, and can be called
from one loop to execute a nested loop
first_delay: any delay carried over f... |
the routine that actually executes the loop, and can be called
from one loop to execute a nested loop
first_delay: any delay carried over from an outer loop
action_indices: where we are in any outer loop action arrays
loop_indices: setpoint indices in any outer loops
cu... | the routine that actually executes the loop, and can be called
from one loop to execute a nested loop
| [
"the",
"routine",
"that",
"actually",
"executes",
"the",
"loop",
"and",
"can",
"be",
"called",
"from",
"one",
"loop",
"to",
"execute",
"a",
"nested",
"loop"
] | def _run_loop(self, first_delay=0, action_indices=(),
loop_indices=(), current_values=(),
**ignore_kwargs):
delay = max(self.delay, first_delay)
callables = self._compile_actions(self.actions, action_indices)
n_callables = 0
for item in callables:
... | [
"def",
"_run_loop",
"(",
"self",
",",
"first_delay",
"=",
"0",
",",
"action_indices",
"=",
"(",
")",
",",
"loop_indices",
"=",
"(",
")",
",",
"current_values",
"=",
"(",
")",
",",
"**",
"ignore_kwargs",
")",
":",
"delay",
"=",
"max",
"(",
"self",
"."... | the routine that actually executes the loop, and can be called
from one loop to execute a nested loop | [
"the",
"routine",
"that",
"actually",
"executes",
"the",
"loop",
"and",
"can",
"be",
"called",
"from",
"one",
"loop",
"to",
"execute",
"a",
"nested",
"loop"
] | [
"\"\"\"\n the routine that actually executes the loop, and can be called\n from one loop to execute a nested loop\n\n first_delay: any delay carried over from an outer loop\n action_indices: where we are in any outer loop action arrays\n loop_indices: setpoint indices in any outer... | [
{
"param": "self",
"type": null
},
{
"param": "first_delay",
"type": null
},
{
"param": "action_indices",
"type": null
},
{
"param": "loop_indices",
"type": null
},
{
"param": "current_values",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "first_delay",
"type": null,
"docstring": null,
"docstring_tok... |
6e7353e684b97bc8491db99fbdd7c69d9fd3e9e8 | jakeogh/Qcodes | qcodes/tests/drivers/test_tektronix_dpo7200xx.py | [
"MIT"
] | Python | tektronix_dpo | null | def tektronix_dpo():
"""
A six channel-per-relay instrument
"""
driver = TektronixDPO7000xx(
'dpo', address='TCPIP0::0.0.0.0::inst0::INSTR', visalib=visalib)
yield driver
driver.close() |
A six channel-per-relay instrument
| A six channel-per-relay instrument | [
"A",
"six",
"channel",
"-",
"per",
"-",
"relay",
"instrument"
] | def tektronix_dpo():
driver = TektronixDPO7000xx(
'dpo', address='TCPIP0::0.0.0.0::inst0::INSTR', visalib=visalib)
yield driver
driver.close() | [
"def",
"tektronix_dpo",
"(",
")",
":",
"driver",
"=",
"TektronixDPO7000xx",
"(",
"'dpo'",
",",
"address",
"=",
"'TCPIP0::0.0.0.0::inst0::INSTR'",
",",
"visalib",
"=",
"visalib",
")",
"yield",
"driver",
"driver",
".",
"close",
"(",
")"
] | A six channel-per-relay instrument | [
"A",
"six",
"channel",
"-",
"per",
"-",
"relay",
"instrument"
] | [
"\"\"\"\n A six channel-per-relay instrument\n \"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | _check_time_trace | None | def _check_time_trace(self) -> None:
"""
A helper function that compares the integration time with measurement
interval for accurate results.
Raises:
RuntimeError: If no instrument attached to Parameter.
"""
if self.instrument is None:
raise Runti... |
A helper function that compares the integration time with measurement
interval for accurate results.
Raises:
RuntimeError: If no instrument attached to Parameter.
| A helper function that compares the integration time with measurement
interval for accurate results. | [
"A",
"helper",
"function",
"that",
"compares",
"the",
"integration",
"time",
"with",
"measurement",
"interval",
"for",
"accurate",
"results",
"."
] | def _check_time_trace(self) -> None:
if self.instrument is None:
raise RuntimeError("No instrument attached to Parameter.")
dt = self.instrument.timetrace_dt()
nplc = self.instrument.nplc()
linefreq = self.instrument.linefreq()
plc = 1/linefreq
if nplc * plc >... | [
"def",
"_check_time_trace",
"(",
"self",
")",
"->",
"None",
":",
"if",
"self",
".",
"instrument",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"No instrument attached to Parameter.\"",
")",
"dt",
"=",
"self",
".",
"instrument",
".",
"timetrace_dt",
"(",
... | A helper function that compares the integration time with measurement
interval for accurate results. | [
"A",
"helper",
"function",
"that",
"compares",
"the",
"integration",
"time",
"with",
"measurement",
"interval",
"for",
"accurate",
"results",
"."
] | [
"\"\"\"\n A helper function that compares the integration time with measurement\n interval for accurate results.\n\n Raises:\n RuntimeError: If no instrument attached to Parameter.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [
{
"docstring": "If no instrument attached to Parameter.",
"docstring_tokens": [
"If",
"no",
"instrument",
"attached",
"to",
"Parameter",
"."
],
"type": "RuntimeError"
}
],
"params": [
{
... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | _time_trace | np.ndarray | def _time_trace(self) -> np.ndarray:
"""
The function that prepares a Lua script for timetrace data acquisition.
Raises:
RuntimeError: If no instrument attached to Parameter.
"""
if self.instrument is None:
raise RuntimeError("No instrument attached to P... |
The function that prepares a Lua script for timetrace data acquisition.
Raises:
RuntimeError: If no instrument attached to Parameter.
| The function that prepares a Lua script for timetrace data acquisition. | [
"The",
"function",
"that",
"prepares",
"a",
"Lua",
"script",
"for",
"timetrace",
"data",
"acquisition",
"."
] | def _time_trace(self) -> np.ndarray:
if self.instrument is None:
raise RuntimeError("No instrument attached to Parameter.")
channel = self.instrument.channel
npts = self.instrument.timetrace_npts()
dt = self.instrument.timetrace_dt()
mode = self.instrument.timetrace_m... | [
"def",
"_time_trace",
"(",
"self",
")",
"->",
"np",
".",
"ndarray",
":",
"if",
"self",
".",
"instrument",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"\"No instrument attached to Parameter.\"",
")",
"channel",
"=",
"self",
".",
"instrument",
".",
"channel... | The function that prepares a Lua script for timetrace data acquisition. | [
"The",
"function",
"that",
"prepares",
"a",
"Lua",
"script",
"for",
"timetrace",
"data",
"acquisition",
"."
] | [
"\"\"\"\n The function that prepares a Lua script for timetrace data acquisition.\n\n Raises:\n RuntimeError: If no instrument attached to Parameter.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [
{
"docstring": "If no instrument attached to Parameter.",
"docstring_tokens": [
"If",
"no",
"instrument",
"attached",
"to",
"Parameter",
"."
],
"type": "RuntimeError"
}
],
"params": [
{
... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | reset | None | def reset(self) -> None:
"""
Reset instrument to factory defaults.
This resets only the relevant channel.
"""
self.write(f'{self.channel}.reset()')
# remember to update all the metadata
log.debug(f'Reset channel {self.channel}.' +
'Updating setti... |
Reset instrument to factory defaults.
This resets only the relevant channel.
| Reset instrument to factory defaults.
This resets only the relevant channel. | [
"Reset",
"instrument",
"to",
"factory",
"defaults",
".",
"This",
"resets",
"only",
"the",
"relevant",
"channel",
"."
] | def reset(self) -> None:
self.write(f'{self.channel}.reset()')
log.debug(f'Reset channel {self.channel}.' +
'Updating settings...')
self.snapshot(update=True) | [
"def",
"reset",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"f'{self.channel}.reset()'",
")",
"log",
".",
"debug",
"(",
"f'Reset channel {self.channel}.'",
"+",
"'Updating settings...'",
")",
"self",
".",
"snapshot",
"(",
"update",
"=",
"Tr... | Reset instrument to factory defaults. | [
"Reset",
"instrument",
"to",
"factory",
"defaults",
"."
] | [
"\"\"\"\n Reset instrument to factory defaults.\n This resets only the relevant channel.\n \"\"\"",
"# remember to update all the metadata"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | doFastSweep | DataSet | def doFastSweep(self, start: float, stop: float,
steps: int, mode: str) -> DataSet:
"""
Perform a fast sweep using a deployed lua script and
return a QCoDeS DataSet with the sweep.
Args:
start: starting sweep value (V or A)
stop: end sweep val... |
Perform a fast sweep using a deployed lua script and
return a QCoDeS DataSet with the sweep.
Args:
start: starting sweep value (V or A)
stop: end sweep value (V or A)
steps: number of steps
mode: Type of sweep, either 'IV' (voltage sweep),
... | Perform a fast sweep using a deployed lua script and
return a QCoDeS DataSet with the sweep. | [
"Perform",
"a",
"fast",
"sweep",
"using",
"a",
"deployed",
"lua",
"script",
"and",
"return",
"a",
"QCoDeS",
"DataSet",
"with",
"the",
"sweep",
"."
] | def doFastSweep(self, start: float, stop: float,
steps: int, mode: str) -> DataSet:
self.fastsweep.prepareSweep(start, stop, steps, mode)
data = Measure(self.fastsweep).run()
return data | [
"def",
"doFastSweep",
"(",
"self",
",",
"start",
":",
"float",
",",
"stop",
":",
"float",
",",
"steps",
":",
"int",
",",
"mode",
":",
"str",
")",
"->",
"DataSet",
":",
"self",
".",
"fastsweep",
".",
"prepareSweep",
"(",
"start",
",",
"stop",
",",
"... | Perform a fast sweep using a deployed lua script and
return a QCoDeS DataSet with the sweep. | [
"Perform",
"a",
"fast",
"sweep",
"using",
"a",
"deployed",
"lua",
"script",
"and",
"return",
"a",
"QCoDeS",
"DataSet",
"with",
"the",
"sweep",
"."
] | [
"\"\"\"\n Perform a fast sweep using a deployed lua script and\n return a QCoDeS DataSet with the sweep.\n\n Args:\n start: starting sweep value (V or A)\n stop: end sweep value (V or A)\n steps: number of steps\n mode: Type of sweep, either 'IV' (vol... | [
{
"param": "self",
"type": null
},
{
"param": "start",
"type": "float"
},
{
"param": "stop",
"type": "float"
},
{
"param": "steps",
"type": "int"
},
{
"param": "mode",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "start",
"type": "float",
"docstring": "starting sweep value (V or A... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | _fast_sweep | np.ndarray | def _fast_sweep(self, start: float, stop: float, steps: int,
mode: str='IV') -> np.ndarray:
"""
Perform a fast sweep using a deployed Lua script.
This is the engine that forms the script, uploads it,
runs it, collects the data, and casts the data correctly.
A... |
Perform a fast sweep using a deployed Lua script.
This is the engine that forms the script, uploads it,
runs it, collects the data, and casts the data correctly.
Args:
start: starting voltage
stop: end voltage
steps: number of steps
mode:... | Perform a fast sweep using a deployed Lua script.
This is the engine that forms the script, uploads it,
runs it, collects the data, and casts the data correctly. | [
"Perform",
"a",
"fast",
"sweep",
"using",
"a",
"deployed",
"Lua",
"script",
".",
"This",
"is",
"the",
"engine",
"that",
"forms",
"the",
"script",
"uploads",
"it",
"runs",
"it",
"collects",
"the",
"data",
"and",
"casts",
"the",
"data",
"correctly",
"."
] | def _fast_sweep(self, start: float, stop: float, steps: int,
mode: str='IV') -> np.ndarray:
channel = self.channel
nplc = self.nplc()
dV = (stop-start)/(steps-1)
if mode == 'IV':
meas = 'i'
sour = 'v'
func = '1'
sense_mo... | [
"def",
"_fast_sweep",
"(",
"self",
",",
"start",
":",
"float",
",",
"stop",
":",
"float",
",",
"steps",
":",
"int",
",",
"mode",
":",
"str",
"=",
"'IV'",
")",
"->",
"np",
".",
"ndarray",
":",
"channel",
"=",
"self",
".",
"channel",
"nplc",
"=",
"... | Perform a fast sweep using a deployed Lua script. | [
"Perform",
"a",
"fast",
"sweep",
"using",
"a",
"deployed",
"Lua",
"script",
"."
] | [
"\"\"\"\n Perform a fast sweep using a deployed Lua script.\n This is the engine that forms the script, uploads it,\n runs it, collects the data, and casts the data correctly.\n\n Args:\n start: starting voltage\n stop: end voltage\n steps: number of step... | [
{
"param": "self",
"type": null
},
{
"param": "start",
"type": "float"
},
{
"param": "stop",
"type": "float"
},
{
"param": "steps",
"type": "int"
},
{
"param": "mode",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "start",
"type": "float",
"docstring": null,
"docstring_tokens... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | _execute_lua | np.ndarray | def _execute_lua(self, _script: List[str], steps: int) -> np.ndarray:
"""
This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer.
Args:
_script: The Lua script to be executed.
steps: Number of points.
... |
This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer.
Args:
_script: The Lua script to be executed.
steps: Number of points.
| This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer. | [
"This",
"is",
"the",
"function",
"that",
"sends",
"the",
"Lua",
"script",
"to",
"be",
"executed",
"and",
"returns",
"the",
"corresponding",
"data",
"from",
"the",
"buffer",
"."
] | def _execute_lua(self, _script: List[str], steps: int) -> np.ndarray:
nplc = self.nplc()
linefreq = self.linefreq()
_time_trace_extra_visa_timeout = self._extra_visa_timeout
_factor = self._measurement_duration_factor
estimated_measurement_duration = _factor*1000*steps*nplc/linef... | [
"def",
"_execute_lua",
"(",
"self",
",",
"_script",
":",
"List",
"[",
"str",
"]",
",",
"steps",
":",
"int",
")",
"->",
"np",
".",
"ndarray",
":",
"nplc",
"=",
"self",
".",
"nplc",
"(",
")",
"linefreq",
"=",
"self",
".",
"linefreq",
"(",
")",
"_ti... | This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer. | [
"This",
"is",
"the",
"function",
"that",
"sends",
"the",
"Lua",
"script",
"to",
"be",
"executed",
"and",
"returns",
"the",
"corresponding",
"data",
"from",
"the",
"buffer",
"."
] | [
"\"\"\"\n This is the function that sends the Lua script to be executed and\n returns the corresponding data from the buffer.\n\n Args:\n _script: The Lua script to be executed.\n steps: Number of points.\n \"\"\"",
"# now poll all the data",
"# The problem is t... | [
{
"param": "self",
"type": null
},
{
"param": "_script",
"type": "List[str]"
},
{
"param": "steps",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "_script",
"type": "List[str]",
"docstring": "The Lua script to be e... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | display_clear | None | def display_clear(self) -> None:
"""
This function clears the display, but also leaves it in user mode
"""
self.visa_handle.write('display.clear()') |
This function clears the display, but also leaves it in user mode
| This function clears the display, but also leaves it in user mode | [
"This",
"function",
"clears",
"the",
"display",
"but",
"also",
"leaves",
"it",
"in",
"user",
"mode"
] | def display_clear(self) -> None:
self.visa_handle.write('display.clear()') | [
"def",
"display_clear",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"visa_handle",
".",
"write",
"(",
"'display.clear()'",
")"
] | This function clears the display, but also leaves it in user mode | [
"This",
"function",
"clears",
"the",
"display",
"but",
"also",
"leaves",
"it",
"in",
"user",
"mode"
] | [
"\"\"\"\n This function clears the display, but also leaves it in user mode\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | display_normal | None | def display_normal(self) -> None:
"""
Set the display to the default mode
"""
self.visa_handle.write('display.screen = display.SMUA_SMUB') |
Set the display to the default mode
| Set the display to the default mode | [
"Set",
"the",
"display",
"to",
"the",
"default",
"mode"
] | def display_normal(self) -> None:
self.visa_handle.write('display.screen = display.SMUA_SMUB') | [
"def",
"display_normal",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"visa_handle",
".",
"write",
"(",
"'display.screen = display.SMUA_SMUB'",
")"
] | Set the display to the default mode | [
"Set",
"the",
"display",
"to",
"the",
"default",
"mode"
] | [
"\"\"\"\n Set the display to the default mode\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | exit_key | None | def exit_key(self) -> None:
"""
Get back the normal screen after an error:
send an EXIT key press event
"""
self.visa_handle.write('display.sendkey(75)') |
Get back the normal screen after an error:
send an EXIT key press event
| Get back the normal screen after an error:
send an EXIT key press event | [
"Get",
"back",
"the",
"normal",
"screen",
"after",
"an",
"error",
":",
"send",
"an",
"EXIT",
"key",
"press",
"event"
] | def exit_key(self) -> None:
self.visa_handle.write('display.sendkey(75)') | [
"def",
"exit_key",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"visa_handle",
".",
"write",
"(",
"'display.sendkey(75)'",
")"
] | Get back the normal screen after an error:
send an EXIT key press event | [
"Get",
"back",
"the",
"normal",
"screen",
"after",
"an",
"error",
":",
"send",
"an",
"EXIT",
"key",
"press",
"event"
] | [
"\"\"\"\n Get back the normal screen after an error:\n send an EXIT key press event\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | reset | None | def reset(self) -> None:
"""
Reset instrument to factory defaults.
This resets both channels.
"""
self.write('reset()')
# remember to update all the metadata
log.debug('Reset instrument. Re-querying settings...')
self.snapshot(update=True) |
Reset instrument to factory defaults.
This resets both channels.
| Reset instrument to factory defaults.
This resets both channels. | [
"Reset",
"instrument",
"to",
"factory",
"defaults",
".",
"This",
"resets",
"both",
"channels",
"."
] | def reset(self) -> None:
self.write('reset()')
log.debug('Reset instrument. Re-querying settings...')
self.snapshot(update=True) | [
"def",
"reset",
"(",
"self",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"'reset()'",
")",
"log",
".",
"debug",
"(",
"'Reset instrument. Re-querying settings...'",
")",
"self",
".",
"snapshot",
"(",
"update",
"=",
"True",
")"
] | Reset instrument to factory defaults. | [
"Reset",
"instrument",
"to",
"factory",
"defaults",
"."
] | [
"\"\"\"\n Reset instrument to factory defaults.\n This resets both channels.\n \"\"\"",
"# remember to update all the metadata"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | ask | str | def ask(self, cmd: str) -> str:
"""
Override of normal ask. This is important, since queries to the
instrument must be wrapped in 'print()'
"""
return super().ask(f'print({cmd:s})') |
Override of normal ask. This is important, since queries to the
instrument must be wrapped in 'print()'
| Override of normal ask. This is important, since queries to the
instrument must be wrapped in 'print()' | [
"Override",
"of",
"normal",
"ask",
".",
"This",
"is",
"important",
"since",
"queries",
"to",
"the",
"instrument",
"must",
"be",
"wrapped",
"in",
"'",
"print",
"()",
"'"
] | def ask(self, cmd: str) -> str:
return super().ask(f'print({cmd:s})') | [
"def",
"ask",
"(",
"self",
",",
"cmd",
":",
"str",
")",
"->",
"str",
":",
"return",
"super",
"(",
")",
".",
"ask",
"(",
"f'print({cmd:s})'",
")"
] | Override of normal ask. | [
"Override",
"of",
"normal",
"ask",
"."
] | [
"\"\"\"\n Override of normal ask. This is important, since queries to the\n instrument must be wrapped in 'print()'\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "cmd",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "cmd",
"type": "str",
"docstring": null,
"docstring_tokens": [... |
f5c08bdfbe0e3f4524ac5a5a33d6f872bf7598f1 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py | [
"MIT"
] | Python | _scriptwrapper | str | def _scriptwrapper(program: List[str], debug: bool=False) -> str:
"""
wraps a program so that the output can be put into
visa_handle.write and run.
The script will run immediately as an anonymous script.
Args:
program: A list of program instructions. One line per
... |
wraps a program so that the output can be put into
visa_handle.write and run.
The script will run immediately as an anonymous script.
Args:
program: A list of program instructions. One line per
list item, e.g. ['for ii = 1, 10 do', 'print(ii)', 'end' ]
| wraps a program so that the output can be put into
visa_handle.write and run.
The script will run immediately as an anonymous script.
A list of program instructions. One line per
list item, e.g. | [
"wraps",
"a",
"program",
"so",
"that",
"the",
"output",
"can",
"be",
"put",
"into",
"visa_handle",
".",
"write",
"and",
"run",
".",
"The",
"script",
"will",
"run",
"immediately",
"as",
"an",
"anonymous",
"script",
".",
"A",
"list",
"of",
"program",
"inst... | def _scriptwrapper(program: List[str], debug: bool=False) -> str:
mainprog = '\r\n'.join(program) + '\r\n'
wrapped = f'loadandrunscript\r\n{mainprog}endscript'
if debug:
log.debug('Wrapped the following script:')
log.debug(wrapped)
return wrapped | [
"def",
"_scriptwrapper",
"(",
"program",
":",
"List",
"[",
"str",
"]",
",",
"debug",
":",
"bool",
"=",
"False",
")",
"->",
"str",
":",
"mainprog",
"=",
"'\\r\\n'",
".",
"join",
"(",
"program",
")",
"+",
"'\\r\\n'",
"wrapped",
"=",
"f'loadandrunscript\\r\... | wraps a program so that the output can be put into
visa_handle.write and run. | [
"wraps",
"a",
"program",
"so",
"that",
"the",
"output",
"can",
"be",
"put",
"into",
"visa_handle",
".",
"write",
"and",
"run",
"."
] | [
"\"\"\"\n wraps a program so that the output can be put into\n visa_handle.write and run.\n The script will run immediately as an anonymous script.\n\n Args:\n program: A list of program instructions. One line per\n list item, e.g. ['for ii = 1, 10 do', 'print(ii)',... | [
{
"param": "program",
"type": "List[str]"
},
{
"param": "debug",
"type": "bool"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "program",
"type": "List[str]",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "debug",
"type": "bool",
"docstring": null,
"docstri... |
311c8f79e8bac663576173f7fc5fbf3474dc0933 | jakeogh/Qcodes | qcodes/utils/plotting.py | [
"MIT"
] | Python | auto_range_iqr | Tuple[float, float] | def auto_range_iqr(data_array: np.ndarray,
cutoff_percentile: Union[
Tuple[float, float], float] = DEFAULT_PERCENTILE
) -> Tuple[float, float]:
"""
Get the min and max range of the provided array that excludes outliers
following the IQR rule.
... |
Get the min and max range of the provided array that excludes outliers
following the IQR rule.
This function computes the inter-quartile-range (IQR), defined by Q3-Q1,
i.e. the percentiles for 75% and 25% of the distribution. The region
without outliers is defined by [Q1-1.5*IQR, Q3+1.5*IQR].
... | Get the min and max range of the provided array that excludes outliers
following the IQR rule.
This function computes the inter-quartile-range (IQR), defined by Q3-Q1,
i.e. the percentiles for 75% and 25% of the distribution. | [
"Get",
"the",
"min",
"and",
"max",
"range",
"of",
"the",
"provided",
"array",
"that",
"excludes",
"outliers",
"following",
"the",
"IQR",
"rule",
".",
"This",
"function",
"computes",
"the",
"inter",
"-",
"quartile",
"-",
"range",
"(",
"IQR",
")",
"defined",... | def auto_range_iqr(data_array: np.ndarray,
cutoff_percentile: Union[
Tuple[float, float], float] = DEFAULT_PERCENTILE
) -> Tuple[float, float]:
if isinstance(cutoff_percentile, tuple):
t = cutoff_percentile[0]
b = cutoff_percentile[1]
... | [
"def",
"auto_range_iqr",
"(",
"data_array",
":",
"np",
".",
"ndarray",
",",
"cutoff_percentile",
":",
"Union",
"[",
"Tuple",
"[",
"float",
",",
"float",
"]",
",",
"float",
"]",
"=",
"DEFAULT_PERCENTILE",
")",
"->",
"Tuple",
"[",
"float",
",",
"float",
"]... | Get the min and max range of the provided array that excludes outliers
following the IQR rule. | [
"Get",
"the",
"min",
"and",
"max",
"range",
"of",
"the",
"provided",
"array",
"that",
"excludes",
"outliers",
"following",
"the",
"IQR",
"rule",
"."
] | [
"\"\"\"\n Get the min and max range of the provided array that excludes outliers\n following the IQR rule.\n\n This function computes the inter-quartile-range (IQR), defined by Q3-Q1,\n i.e. the percentiles for 75% and 25% of the distribution. The region\n without outliers is defined by [Q1-1.5*IQR, ... | [
{
"param": "data_array",
"type": "np.ndarray"
},
{
"param": "cutoff_percentile",
"type": "Union[\n Tuple[float, float], float]"
}
] | {
"returns": [
{
"docstring": "region limits [vmin, vmax]",
"docstring_tokens": [
"region",
"limits",
"[",
"vmin",
"vmax",
"]"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "data_array",
"type": "np.... |
311c8f79e8bac663576173f7fc5fbf3474dc0933 | jakeogh/Qcodes | qcodes/utils/plotting.py | [
"MIT"
] | Python | _set_colorbar_extend | None | def _set_colorbar_extend(colorbar: matplotlib.colorbar.Colorbar,
extend: str) -> None:
"""
Workaround for a missing setter for the extend property of a matplotlib
colorbar.
The colorbar object in matplotlib has no setter method and setting the
colorbar extend does not take ... |
Workaround for a missing setter for the extend property of a matplotlib
colorbar.
The colorbar object in matplotlib has no setter method and setting the
colorbar extend does not take any effect.
Calling a subsequent update will cause a runtime
error because of the internal implementation of th... | Workaround for a missing setter for the extend property of a matplotlib
colorbar.
The colorbar object in matplotlib has no setter method and setting the
colorbar extend does not take any effect.
Calling a subsequent update will cause a runtime
error because of the internal implementation of the rendering of the
colorb... | [
"Workaround",
"for",
"a",
"missing",
"setter",
"for",
"the",
"extend",
"property",
"of",
"a",
"matplotlib",
"colorbar",
".",
"The",
"colorbar",
"object",
"in",
"matplotlib",
"has",
"no",
"setter",
"method",
"and",
"setting",
"the",
"colorbar",
"extend",
"does"... | def _set_colorbar_extend(colorbar: matplotlib.colorbar.Colorbar,
extend: str) -> None:
colorbar.extend = extend
_slice_dict = {'neither': slice(0, None),
'both': slice(1, -1),
'min': slice(1, None),
'max': slice(0, -1)}
colorb... | [
"def",
"_set_colorbar_extend",
"(",
"colorbar",
":",
"matplotlib",
".",
"colorbar",
".",
"Colorbar",
",",
"extend",
":",
"str",
")",
"->",
"None",
":",
"colorbar",
".",
"extend",
"=",
"extend",
"_slice_dict",
"=",
"{",
"'neither'",
":",
"slice",
"(",
"0",
... | Workaround for a missing setter for the extend property of a matplotlib
colorbar. | [
"Workaround",
"for",
"a",
"missing",
"setter",
"for",
"the",
"extend",
"property",
"of",
"a",
"matplotlib",
"colorbar",
"."
] | [
"\"\"\"\n Workaround for a missing setter for the extend property of a matplotlib\n colorbar.\n\n The colorbar object in matplotlib has no setter method and setting the\n colorbar extend does not take any effect.\n Calling a subsequent update will cause a runtime\n error because of the internal im... | [
{
"param": "colorbar",
"type": "matplotlib.colorbar.Colorbar"
},
{
"param": "extend",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "colorbar",
"type": "matplotlib.colorbar.Colorbar",
"docstring": "the colorbar for which to set the extend",
"docstring_tokens": [
"the",
"colorbar",
"for",
"which",
"to",
"set",
... |
311c8f79e8bac663576173f7fc5fbf3474dc0933 | jakeogh/Qcodes | qcodes/utils/plotting.py | [
"MIT"
] | Python | apply_color_scale_limits | None | def apply_color_scale_limits(colorbar: matplotlib.colorbar.Colorbar,
new_lim: Tuple[Optional[float], Optional[float]],
data_lim: Optional[Tuple[float, float]] = None,
data_array: Optional[np.ndarray] = None,
... |
Applies limits to colorscale and updates extend.
This function applies the limits `new_lim` to the heatmap plot associated
with the provided `colorbar`, updates the colorbar limits, and also adds
the colorbar clipping indicators in form of small triangles on the top and
bottom of the colorbar, acc... | Applies limits to colorscale and updates extend.
This function applies the limits `new_lim` to the heatmap plot associated
with the provided `colorbar`, updates the colorbar limits, and also adds
the colorbar clipping indicators in form of small triangles on the top and
bottom of the colorbar, according to where the li... | [
"Applies",
"limits",
"to",
"colorscale",
"and",
"updates",
"extend",
".",
"This",
"function",
"applies",
"the",
"limits",
"`",
"new_lim",
"`",
"to",
"the",
"heatmap",
"plot",
"associated",
"with",
"the",
"provided",
"`",
"colorbar",
"`",
"updates",
"the",
"c... | def apply_color_scale_limits(colorbar: matplotlib.colorbar.Colorbar,
new_lim: Tuple[Optional[float], Optional[float]],
data_lim: Optional[Tuple[float, float]] = None,
data_array: Optional[np.ndarray] = None,
... | [
"def",
"apply_color_scale_limits",
"(",
"colorbar",
":",
"matplotlib",
".",
"colorbar",
".",
"Colorbar",
",",
"new_lim",
":",
"Tuple",
"[",
"Optional",
"[",
"float",
"]",
",",
"Optional",
"[",
"float",
"]",
"]",
",",
"data_lim",
":",
"Optional",
"[",
"Tupl... | Applies limits to colorscale and updates extend. | [
"Applies",
"limits",
"to",
"colorscale",
"and",
"updates",
"extend",
"."
] | [
"\"\"\"\n Applies limits to colorscale and updates extend.\n\n This function applies the limits `new_lim` to the heatmap plot associated\n with the provided `colorbar`, updates the colorbar limits, and also adds\n the colorbar clipping indicators in form of small triangles on the top and\n bottom of ... | [
{
"param": "colorbar",
"type": "matplotlib.colorbar.Colorbar"
},
{
"param": "new_lim",
"type": "Tuple[Optional[float], Optional[float]]"
},
{
"param": "data_lim",
"type": "Optional[Tuple[float, float]]"
},
{
"param": "data_array",
"type": "Optional[np.ndarray]"
},
{
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "colorbar",
"type": "matplotlib.colorbar.Colorbar",
"docstring": "The actual colorbar to be updated.",
"docstring_tokens": [
"The",
"actual",
"colorbar",
"to",
"be",
"updated",
... |
311c8f79e8bac663576173f7fc5fbf3474dc0933 | jakeogh/Qcodes | qcodes/utils/plotting.py | [
"MIT"
] | Python | auto_color_scale_from_config | None | def auto_color_scale_from_config(colorbar: matplotlib.colorbar.Colorbar,
auto_color_scale: Optional[bool] = None,
data_array: Optional[np.ndarray] = None,
cutoff_percentile: Optional[Union[Tuple[
... |
Sets the color limits such that outliers are disregarded, depending on
the configuration file `qcodesrc.json`. If optional arguments are
passed the config values are overridden.
Args:
colorbar: The colorbar to scale.
auto_color_scale: Enable smart colorscale. If `False` nothing happens... | Sets the color limits such that outliers are disregarded, depending on
the configuration file `qcodesrc.json`. If optional arguments are
passed the config values are overridden. | [
"Sets",
"the",
"color",
"limits",
"such",
"that",
"outliers",
"are",
"disregarded",
"depending",
"on",
"the",
"configuration",
"file",
"`",
"qcodesrc",
".",
"json",
"`",
".",
"If",
"optional",
"arguments",
"are",
"passed",
"the",
"config",
"values",
"are",
"... | def auto_color_scale_from_config(colorbar: matplotlib.colorbar.Colorbar,
auto_color_scale: Optional[bool] = None,
data_array: Optional[np.ndarray] = None,
cutoff_percentile: Optional[Union[Tuple[
... | [
"def",
"auto_color_scale_from_config",
"(",
"colorbar",
":",
"matplotlib",
".",
"colorbar",
".",
"Colorbar",
",",
"auto_color_scale",
":",
"Optional",
"[",
"bool",
"]",
"=",
"None",
",",
"data_array",
":",
"Optional",
"[",
"np",
".",
"ndarray",
"]",
"=",
"No... | Sets the color limits such that outliers are disregarded, depending on
the configuration file `qcodesrc.json`. | [
"Sets",
"the",
"color",
"limits",
"such",
"that",
"outliers",
"are",
"disregarded",
"depending",
"on",
"the",
"configuration",
"file",
"`",
"qcodesrc",
".",
"json",
"`",
"."
] | [
"\"\"\"\n Sets the color limits such that outliers are disregarded, depending on\n the configuration file `qcodesrc.json`. If optional arguments are\n passed the config values are overridden.\n\n Args:\n colorbar: The colorbar to scale.\n auto_color_scale: Enable smart colorscale. If `Fals... | [
{
"param": "colorbar",
"type": "matplotlib.colorbar.Colorbar"
},
{
"param": "auto_color_scale",
"type": "Optional[bool]"
},
{
"param": "data_array",
"type": "Optional[np.ndarray]"
},
{
"param": "cutoff_percentile",
"type": "Optional[Union[Tuple[\n ... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "colorbar",
"type": "matplotlib.colorbar.Colorbar",
"docstring": "The colorbar to scale.",
"docstring_tokens": [
"The",
"colorbar",
"to",
"scale",
"."
],
"default": null,
... |
ca16fc6343867b11e347ce77eb81bcc53b98994f | jakeogh/Qcodes | qcodes/instrument/delegate/delegate_instrument.py | [
"MIT"
] | Python | parse_instrument_path | Any | def parse_instrument_path(
parent: Union[Station, InstrumentBase],
path: str,
) -> Any:
"""Parse a string path and return the object relative to a station or
instrument, e.g. "my_instrument.my_param" returns
station.my_instrument.my_param
Args:
parent: Me... | Parse a string path and return the object relative to a station or
instrument, e.g. "my_instrument.my_param" returns
station.my_instrument.my_param
Args:
parent: Measurement station
path: Relative path to parse
| Parse a string path and return the object relative to a station or
instrument, e.g. | [
"Parse",
"a",
"string",
"path",
"and",
"return",
"the",
"object",
"relative",
"to",
"a",
"station",
"or",
"instrument",
"e",
".",
"g",
"."
] | def parse_instrument_path(
parent: Union[Station, InstrumentBase],
path: str,
) -> Any:
def _parse_path(parent: Any, elem: Sequence[str]) -> Any:
child = getattr(parent, elem[0])
if len(elem) == 1:
return child
return _parse_path(child, ele... | [
"def",
"parse_instrument_path",
"(",
"parent",
":",
"Union",
"[",
"Station",
",",
"InstrumentBase",
"]",
",",
"path",
":",
"str",
",",
")",
"->",
"Any",
":",
"def",
"_parse_path",
"(",
"parent",
":",
"Any",
",",
"elem",
":",
"Sequence",
"[",
"str",
"]"... | Parse a string path and return the object relative to a station or
instrument, e.g. | [
"Parse",
"a",
"string",
"path",
"and",
"return",
"the",
"object",
"relative",
"to",
"a",
"station",
"or",
"instrument",
"e",
".",
"g",
"."
] | [
"\"\"\"Parse a string path and return the object relative to a station or\n instrument, e.g. \"my_instrument.my_param\" returns\n station.my_instrument.my_param\n\n Args:\n parent: Measurement station\n path: Relative path to parse\n \"\"\""
] | [
{
"param": "parent",
"type": "Union[Station, InstrumentBase]"
},
{
"param": "path",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "parent",
"type": "Union[Station, InstrumentBase]",
"docstring": null,
"docstring_tokens": [
"None"
],
"default": null,
"is_optional": null
},
{
"identifier": "path",
"type": "str",... |
ca16fc6343867b11e347ce77eb81bcc53b98994f | jakeogh/Qcodes | qcodes/instrument/delegate/delegate_instrument.py | [
"MIT"
] | Python | _create_and_add_parameters | None | def _create_and_add_parameters(
self,
station: Station,
parameters: Union[Mapping[str, Sequence[str]], Mapping[str, str]],
setters: Mapping[str, MutableMapping[str, Any]],
units: Mapping[str, str],
) -> None:
"""Add parameters to delegate instrument based on specified... | Add parameters to delegate instrument based on specified aliases,
endpoints and setter methods | Add parameters to delegate instrument based on specified aliases,
endpoints and setter methods | [
"Add",
"parameters",
"to",
"delegate",
"instrument",
"based",
"on",
"specified",
"aliases",
"endpoints",
"and",
"setter",
"methods"
] | def _create_and_add_parameters(
self,
station: Station,
parameters: Union[Mapping[str, Sequence[str]], Mapping[str, str]],
setters: Mapping[str, MutableMapping[str, Any]],
units: Mapping[str, str],
) -> None:
for param_name, paths in parameters.items():
if... | [
"def",
"_create_and_add_parameters",
"(",
"self",
",",
"station",
":",
"Station",
",",
"parameters",
":",
"Union",
"[",
"Mapping",
"[",
"str",
",",
"Sequence",
"[",
"str",
"]",
"]",
",",
"Mapping",
"[",
"str",
",",
"str",
"]",
"]",
",",
"setters",
":",... | Add parameters to delegate instrument based on specified aliases,
endpoints and setter methods | [
"Add",
"parameters",
"to",
"delegate",
"instrument",
"based",
"on",
"specified",
"aliases",
"endpoints",
"and",
"setter",
"methods"
] | [
"\"\"\"Add parameters to delegate instrument based on specified aliases,\n endpoints and setter methods\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "station",
"type": "Station"
},
{
"param": "parameters",
"type": "Union[Mapping[str, Sequence[str]], Mapping[str, str]]"
},
{
"param": "setters",
"type": "Mapping[str, MutableMapping[str, Any]]"
},
{
"param": "units",
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "station",
"type": "Station",
"docstring": null,
"docstring_to... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | complete | null | def complete(self, delay=1.5):
"""
Periodically sync the DataSet and display percent complete status.
Also, each period, execute functions stored in (class attribute)
``self.background_functions``. If a function fails, we log its
traceback and continue on. If any one function fa... |
Periodically sync the DataSet and display percent complete status.
Also, each period, execute functions stored in (class attribute)
``self.background_functions``. If a function fails, we log its
traceback and continue on. If any one function fails twice in
a row, it gets remove... | Periodically sync the DataSet and display percent complete status.
Also, each period, execute functions stored in (class attribute)
``self.background_functions``. If a function fails, we log its
traceback and continue on. If any one function fails twice in
a row, it gets removed. | [
"Periodically",
"sync",
"the",
"DataSet",
"and",
"display",
"percent",
"complete",
"status",
".",
"Also",
"each",
"period",
"execute",
"functions",
"stored",
"in",
"(",
"class",
"attribute",
")",
"`",
"`",
"self",
".",
"background_functions",
"`",
"`",
".",
... | def complete(self, delay=1.5):
log.info(
f'waiting for DataSet <{self.location}> to complete')
failing = {key: False for key in self.background_functions}
completed = False
while True:
log.info('DataSet: {:.0f}% complete'.format(
self.fraction_comp... | [
"def",
"complete",
"(",
"self",
",",
"delay",
"=",
"1.5",
")",
":",
"log",
".",
"info",
"(",
"f'waiting for DataSet <{self.location}> to complete'",
")",
"failing",
"=",
"{",
"key",
":",
"False",
"for",
"key",
"in",
"self",
".",
"background_functions",
"}",
... | Periodically sync the DataSet and display percent complete status. | [
"Periodically",
"sync",
"the",
"DataSet",
"and",
"display",
"percent",
"complete",
"status",
"."
] | [
"\"\"\"\n Periodically sync the DataSet and display percent complete status.\n\n Also, each period, execute functions stored in (class attribute)\n ``self.background_functions``. If a function fails, we log its\n traceback and continue on. If any one function fails twice in\n a ro... | [
{
"param": "self",
"type": null
},
{
"param": "delay",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "delay",
"type": null,
"docstring": "seconds between iterations. Def... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | remove_array | null | def remove_array(self, array_id):
""" Remove an array from a dataset
Throws an exception when the array specified is refereced by other
arrays in the dataset.
Args:
array_id (str): array_id of array to be removed
"""
for a in self.arrays:
sa = se... | Remove an array from a dataset
Throws an exception when the array specified is refereced by other
arrays in the dataset.
Args:
array_id (str): array_id of array to be removed
| Remove an array from a dataset
Throws an exception when the array specified is refereced by other
arrays in the dataset. | [
"Remove",
"an",
"array",
"from",
"a",
"dataset",
"Throws",
"an",
"exception",
"when",
"the",
"array",
"specified",
"is",
"refereced",
"by",
"other",
"arrays",
"in",
"the",
"dataset",
"."
] | def remove_array(self, array_id):
for a in self.arrays:
sa = self.arrays[a].set_arrays
if array_id in [a.array_id for a in sa]:
raise Exception(
'cannot remove array %s as it is referenced by a' % array_id)
_ = self.arrays.pop(array_id)
... | [
"def",
"remove_array",
"(",
"self",
",",
"array_id",
")",
":",
"for",
"a",
"in",
"self",
".",
"arrays",
":",
"sa",
"=",
"self",
".",
"arrays",
"[",
"a",
"]",
".",
"set_arrays",
"if",
"array_id",
"in",
"[",
"a",
".",
"array_id",
"for",
"a",
"in",
... | Remove an array from a dataset
Throws an exception when the array specified is refereced by other
arrays in the dataset. | [
"Remove",
"an",
"array",
"from",
"a",
"dataset",
"Throws",
"an",
"exception",
"when",
"the",
"array",
"specified",
"is",
"refereced",
"by",
"other",
"arrays",
"in",
"the",
"dataset",
"."
] | [
"\"\"\" Remove an array from a dataset\n\n Throws an exception when the array specified is refereced by other\n arrays in the dataset.\n\n Args:\n array_id (str): array_id of array to be removed\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "array_id",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "array_id",
"type": null,
"docstring": "array_id of array to be remo... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | _clean_array_ids | <not_specific> | def _clean_array_ids(self, arrays):
"""
replace action_indices tuple with compact string array_ids
stripping off as much extraneous info as possible
"""
action_indices = [array.action_indices for array in arrays]
for array in arrays:
name = array.full_name
... |
replace action_indices tuple with compact string array_ids
stripping off as much extraneous info as possible
| replace action_indices tuple with compact string array_ids
stripping off as much extraneous info as possible | [
"replace",
"action_indices",
"tuple",
"with",
"compact",
"string",
"array_ids",
"stripping",
"off",
"as",
"much",
"extraneous",
"info",
"as",
"possible"
] | def _clean_array_ids(self, arrays):
action_indices = [array.action_indices for array in arrays]
for array in arrays:
name = array.full_name
if array.is_setpoint and name and not name.endswith('_set'):
name += '_set'
array.array_id = name
array_... | [
"def",
"_clean_array_ids",
"(",
"self",
",",
"arrays",
")",
":",
"action_indices",
"=",
"[",
"array",
".",
"action_indices",
"for",
"array",
"in",
"arrays",
"]",
"for",
"array",
"in",
"arrays",
":",
"name",
"=",
"array",
".",
"full_name",
"if",
"array",
... | replace action_indices tuple with compact string array_ids
stripping off as much extraneous info as possible | [
"replace",
"action_indices",
"tuple",
"with",
"compact",
"string",
"array_ids",
"stripping",
"off",
"as",
"much",
"extraneous",
"info",
"as",
"possible"
] | [
"\"\"\"\n replace action_indices tuple with compact string array_ids\n stripping off as much extraneous info as possible\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "arrays",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "arrays",
"type": null,
"docstring": null,
"docstring_tokens":... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | default_parameter_name | Optional[str] | def default_parameter_name(self, paramname: Optional[str] = None) -> Optional[str]:
"""Return name of default parameter for plotting
The default parameter is determined by looking into
metdata['default_parameter_name']. If this variable is not present,
then the closest match to the arg... | Return name of default parameter for plotting
The default parameter is determined by looking into
metdata['default_parameter_name']. If this variable is not present,
then the closest match to the argument paramname is tried.
Args:
paramname: Name to match to parameter name... | Return name of default parameter for plotting
The default parameter is determined by looking into
metdata['default_parameter_name']. If this variable is not present,
then the closest match to the argument paramname is tried. | [
"Return",
"name",
"of",
"default",
"parameter",
"for",
"plotting",
"The",
"default",
"parameter",
"is",
"determined",
"by",
"looking",
"into",
"metdata",
"[",
"'",
"default_parameter_name",
"'",
"]",
".",
"If",
"this",
"variable",
"is",
"not",
"present",
"then... | def default_parameter_name(self, paramname: Optional[str] = None) -> Optional[str]:
arraynames = self.arrays.keys()
if self.metadata.get('default_parameter_name', False):
paramname = self.metadata['default_parameter_name']
if paramname in arraynames:
return paramname
... | [
"def",
"default_parameter_name",
"(",
"self",
",",
"paramname",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
")",
"->",
"Optional",
"[",
"str",
"]",
":",
"arraynames",
"=",
"self",
".",
"arrays",
".",
"keys",
"(",
")",
"if",
"self",
".",
"metadata",
... | Return name of default parameter for plotting
The default parameter is determined by looking into
metdata['default_parameter_name']. | [
"Return",
"name",
"of",
"default",
"parameter",
"for",
"plotting",
"The",
"default",
"parameter",
"is",
"determined",
"by",
"looking",
"into",
"metdata",
"[",
"'",
"default_parameter_name",
"'",
"]",
"."
] | [
"\"\"\"Return name of default parameter for plotting\n\n The default parameter is determined by looking into\n metdata['default_parameter_name']. If this variable is not present,\n then the closest match to the argument paramname is tried.\n\n Args:\n paramname: Name to match... | [
{
"param": "self",
"type": null
},
{
"param": "paramname",
"type": "Optional[str]"
}
] | {
"returns": [
{
"docstring": "Name of the default parameter, or None if no parameter is found",
"docstring_tokens": [
"Name",
"of",
"the",
"default",
"parameter",
"or",
"None",
"if",
"no",
"parameter",
"is",
... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | qcodes_dataset_to_xarray_dataset | xr.Dataset | def qcodes_dataset_to_xarray_dataset(
data_set: DataSet,
) -> xr.Dataset:
""" Convert QCoDeS gridded dataset to xarray dataset """
xarray_dictionary = dataset_to_xarray_dictionary(data_set)
xarray_dataset = xr.Dataset.from_dict(xarray_dictionary)
return xarray_dataset | Convert QCoDeS gridded dataset to xarray dataset | Convert QCoDeS gridded dataset to xarray dataset | [
"Convert",
"QCoDeS",
"gridded",
"dataset",
"to",
"xarray",
"dataset"
] | def qcodes_dataset_to_xarray_dataset(
data_set: DataSet,
) -> xr.Dataset:
xarray_dictionary = dataset_to_xarray_dictionary(data_set)
xarray_dataset = xr.Dataset.from_dict(xarray_dictionary)
return xarray_dataset | [
"def",
"qcodes_dataset_to_xarray_dataset",
"(",
"data_set",
":",
"DataSet",
",",
")",
"->",
"xr",
".",
"Dataset",
":",
"xarray_dictionary",
"=",
"dataset_to_xarray_dictionary",
"(",
"data_set",
")",
"xarray_dataset",
"=",
"xr",
".",
"Dataset",
".",
"from_dict",
"(... | Convert QCoDeS gridded dataset to xarray dataset | [
"Convert",
"QCoDeS",
"gridded",
"dataset",
"to",
"xarray",
"dataset"
] | [
"\"\"\" Convert QCoDeS gridded dataset to xarray dataset \"\"\""
] | [
{
"param": "data_set",
"type": "DataSet"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "data_set",
"type": "DataSet",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | xarray_dictionary_to_dataset | DataSet | def xarray_dictionary_to_dataset(
xarray_dictionary: Dict[str, Any],
) -> DataSet:
"""Convert xarray dictionary to Qcodes DataSet.
Args:
xarray_dictionary: data to convert
Returns:
QCoDeS dataSet with converted data.
"""
dataset = new_data()
dataset.metadata.update(xarray_d... | Convert xarray dictionary to Qcodes DataSet.
Args:
xarray_dictionary: data to convert
Returns:
QCoDeS dataSet with converted data.
| Convert xarray dictionary to Qcodes DataSet. | [
"Convert",
"xarray",
"dictionary",
"to",
"Qcodes",
"DataSet",
"."
] | def xarray_dictionary_to_dataset(
xarray_dictionary: Dict[str, Any],
) -> DataSet:
dataset = new_data()
dataset.metadata.update(xarray_dictionary["attrs"])
grid_coords: List[Any] = []
set_array_names = []
for array_key, coord_dictionary in xarray_dictionary["coords"].items():
preset_data... | [
"def",
"xarray_dictionary_to_dataset",
"(",
"xarray_dictionary",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
")",
"->",
"DataSet",
":",
"dataset",
"=",
"new_data",
"(",
")",
"dataset",
".",
"metadata",
".",
"update",
"(",
"xarray_dictionary",
"[",
"\"attr... | Convert xarray dictionary to Qcodes DataSet. | [
"Convert",
"xarray",
"dictionary",
"to",
"Qcodes",
"DataSet",
"."
] | [
"\"\"\"Convert xarray dictionary to Qcodes DataSet.\n\n Args:\n xarray_dictionary: data to convert\n\n Returns:\n QCoDeS dataSet with converted data.\n \"\"\""
] | [
{
"param": "xarray_dictionary",
"type": "Dict[str, Any]"
}
] | {
"returns": [
{
"docstring": "QCoDeS dataSet with converted data.",
"docstring_tokens": [
"QCoDeS",
"dataSet",
"with",
"converted",
"data",
"."
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "xarray_dictio... |
e3630ebd0d0ed88b0c021c68535bfd7befbb0dfa | jakeogh/Qcodes | qcodes/data/data_set.py | [
"MIT"
] | Python | xarray_dataset_to_qcodes_dataset | DataSet | def xarray_dataset_to_qcodes_dataset(xarray_data_set: xr.Dataset) -> DataSet:
""" Convert QCoDeS gridded dataset to xarray dataset """
xarray_dictionary = xarray_data_set.to_dict()
qcodes_dataset = xarray_dictionary_to_dataset(xarray_dictionary)
return qcodes_dataset | Convert QCoDeS gridded dataset to xarray dataset | Convert QCoDeS gridded dataset to xarray dataset | [
"Convert",
"QCoDeS",
"gridded",
"dataset",
"to",
"xarray",
"dataset"
] | def xarray_dataset_to_qcodes_dataset(xarray_data_set: xr.Dataset) -> DataSet:
xarray_dictionary = xarray_data_set.to_dict()
qcodes_dataset = xarray_dictionary_to_dataset(xarray_dictionary)
return qcodes_dataset | [
"def",
"xarray_dataset_to_qcodes_dataset",
"(",
"xarray_data_set",
":",
"xr",
".",
"Dataset",
")",
"->",
"DataSet",
":",
"xarray_dictionary",
"=",
"xarray_data_set",
".",
"to_dict",
"(",
")",
"qcodes_dataset",
"=",
"xarray_dictionary_to_dataset",
"(",
"xarray_dictionary... | Convert QCoDeS gridded dataset to xarray dataset | [
"Convert",
"QCoDeS",
"gridded",
"dataset",
"to",
"xarray",
"dataset"
] | [
"\"\"\" Convert QCoDeS gridded dataset to xarray dataset \"\"\""
] | [
{
"param": "xarray_data_set",
"type": "xr.Dataset"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "xarray_data_set",
"type": "xr.Dataset",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
013436dcc9f865aba480c56465df641d08ec54ed | jakeogh/Qcodes | qcodes/tests/dataset/test_database_extract_runs.py | [
"MIT"
] | Python | inst | null | def inst():
"""
Dummy instrument for testing, ensuring that it's instance gets closed
and removed from the global register of instruments, which, if not done,
make break other tests
"""
inst = DummyInstrument('extract_run_inst', gates=['back', 'plunger', 'cutter'])
yield inst
inst.close(... |
Dummy instrument for testing, ensuring that it's instance gets closed
and removed from the global register of instruments, which, if not done,
make break other tests
| Dummy instrument for testing, ensuring that it's instance gets closed
and removed from the global register of instruments, which, if not done,
make break other tests | [
"Dummy",
"instrument",
"for",
"testing",
"ensuring",
"that",
"it",
"'",
"s",
"instance",
"gets",
"closed",
"and",
"removed",
"from",
"the",
"global",
"register",
"of",
"instruments",
"which",
"if",
"not",
"done",
"make",
"break",
"other",
"tests"
] | def inst():
inst = DummyInstrument('extract_run_inst', gates=['back', 'plunger', 'cutter'])
yield inst
inst.close() | [
"def",
"inst",
"(",
")",
":",
"inst",
"=",
"DummyInstrument",
"(",
"'extract_run_inst'",
",",
"gates",
"=",
"[",
"'back'",
",",
"'plunger'",
",",
"'cutter'",
"]",
")",
"yield",
"inst",
"inst",
".",
"close",
"(",
")"
] | Dummy instrument for testing, ensuring that it's instance gets closed
and removed from the global register of instruments, which, if not done,
make break other tests | [
"Dummy",
"instrument",
"for",
"testing",
"ensuring",
"that",
"it",
"'",
"s",
"instance",
"gets",
"closed",
"and",
"removed",
"from",
"the",
"global",
"register",
"of",
"instruments",
"which",
"if",
"not",
"done",
"make",
"break",
"other",
"tests"
] | [
"\"\"\"\n Dummy instrument for testing, ensuring that it's instance gets closed\n and removed from the global register of instruments, which, if not done,\n make break other tests\n \"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
ff001d6eec30ba0a9d64004372608b382df039d6 | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34934a.py | [
"MIT"
] | Python | write | None | def write(self, cmd: str) -> None:
"""
When the module is safety interlocked, users can not make any
connections. There will be no effect when try to connect any channels.
"""
if self._is_locked:
logging.warning("Warning: no configuration module connected, "
... |
When the module is safety interlocked, users can not make any
connections. There will be no effect when try to connect any channels.
| When the module is safety interlocked, users can not make any
connections. There will be no effect when try to connect any channels. | [
"When",
"the",
"module",
"is",
"safety",
"interlocked",
"users",
"can",
"not",
"make",
"any",
"connections",
".",
"There",
"will",
"be",
"no",
"effect",
"when",
"try",
"to",
"connect",
"any",
"channels",
"."
] | def write(self, cmd: str) -> None:
if self._is_locked:
logging.warning("Warning: no configuration module connected, "
"or safety interlock enabled. "
"Making any connection is not allowed")
return self.parent.write(cmd) | [
"def",
"write",
"(",
"self",
",",
"cmd",
":",
"str",
")",
"->",
"None",
":",
"if",
"self",
".",
"_is_locked",
":",
"logging",
".",
"warning",
"(",
"\"Warning: no configuration module connected, \"",
"\"or safety interlock enabled. \"",
"\"Making any connection is not al... | When the module is safety interlocked, users can not make any
connections. | [
"When",
"the",
"module",
"is",
"safety",
"interlocked",
"users",
"can",
"not",
"make",
"any",
"connections",
"."
] | [
"\"\"\"\n When the module is safety interlocked, users can not make any\n connections. There will be no effect when try to connect any channels.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "cmd",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "cmd",
"type": "str",
"docstring": null,
"docstring_tokens": [... |
ff001d6eec30ba0a9d64004372608b382df039d6 | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34934a.py | [
"MIT"
] | Python | validate_value | None | def validate_value(self, row: int, column: int) -> None:
"""
to check if the row and column number is within the range of the
module layout.
Args:
row: row value
column: column value
"""
if (row > self.row) or (column > self.column):
r... |
to check if the row and column number is within the range of the
module layout.
Args:
row: row value
column: column value
| to check if the row and column number is within the range of the
module layout. | [
"to",
"check",
"if",
"the",
"row",
"and",
"column",
"number",
"is",
"within",
"the",
"range",
"of",
"the",
"module",
"layout",
"."
] | def validate_value(self, row: int, column: int) -> None:
if (row > self.row) or (column > self.column):
raise ValueError('row/column value out of range') | [
"def",
"validate_value",
"(",
"self",
",",
"row",
":",
"int",
",",
"column",
":",
"int",
")",
"->",
"None",
":",
"if",
"(",
"row",
">",
"self",
".",
"row",
")",
"or",
"(",
"column",
">",
"self",
".",
"column",
")",
":",
"raise",
"ValueError",
"("... | to check if the row and column number is within the range of the
module layout. | [
"to",
"check",
"if",
"the",
"row",
"and",
"column",
"number",
"is",
"within",
"the",
"range",
"of",
"the",
"module",
"layout",
"."
] | [
"\"\"\"\n to check if the row and column number is within the range of the\n module layout.\n\n Args:\n row: row value\n column: column value\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": "int"
},
{
"param": "column",
"type": "int"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "row",
"type": "int",
"docstring": null,
"docstring_tokens": [... |
ff001d6eec30ba0a9d64004372608b382df039d6 | jakeogh/Qcodes | qcodes/instrument_drivers/Keysight/keysight_34934a.py | [
"MIT"
] | Python | to_channel_list | str | def to_channel_list(
self,
paths: List[Tuple[int, int]],
wiring_config: Optional[str] = ''
) -> str:
"""
convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function.
A... |
convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function.
Args:
paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]
wiring_config: for 1-wire matrices, values are 'MH', 'ML'... | convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function. | [
"convert",
"the",
"(",
"row",
"column",
")",
"pair",
"to",
"a",
"4",
"-",
"digit",
"channel",
"number",
"'",
"sxxx",
"'",
"where",
"s",
"is",
"the",
"slot",
"number",
"xxx",
"is",
"generated",
"from",
"the",
"numbering",
"function",
"."
] | def to_channel_list(
self,
paths: List[Tuple[int, int]],
wiring_config: Optional[str] = ''
) -> str:
numbering_function = self.get_numbering_function(
self.row,
self.column,
wiring_config
)
channels = []
for row,... | [
"def",
"to_channel_list",
"(",
"self",
",",
"paths",
":",
"List",
"[",
"Tuple",
"[",
"int",
",",
"int",
"]",
"]",
",",
"wiring_config",
":",
"Optional",
"[",
"str",
"]",
"=",
"''",
")",
"->",
"str",
":",
"numbering_function",
"=",
"self",
".",
"get_n... | convert the (row, column) pair to a 4-digit channel number 'sxxx', where
s is the slot number, xxx is generated from the numbering function. | [
"convert",
"the",
"(",
"row",
"column",
")",
"pair",
"to",
"a",
"4",
"-",
"digit",
"channel",
"number",
"'",
"sxxx",
"'",
"where",
"s",
"is",
"the",
"slot",
"number",
"xxx",
"is",
"generated",
"from",
"the",
"numbering",
"function",
"."
] | [
"\"\"\"\n convert the (row, column) pair to a 4-digit channel number 'sxxx', where\n s is the slot number, xxx is generated from the numbering function.\n\n Args:\n paths: list of channels to connect [(r1, c1), (r2, c2), (r3, c3)]\n wiring_config: for 1-wire matrices, valu... | [
{
"param": "self",
"type": null
},
{
"param": "paths",
"type": "List[Tuple[int, int]]"
},
{
"param": "wiring_config",
"type": "Optional[str]"
}
] | {
"returns": [
{
"docstring": null,
"docstring_tokens": [
"None"
],
"type": null
}
],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
... |
b704f1ff40b535535f6a0a74d430adfe7a3fdd47 | jakeogh/Qcodes | qcodes/instrument/sweep_values.py | [
"MIT"
] | Python | validate | None | def validate(self, values: Sequence[Any]) -> None:
"""
Check that all values are allowed for this Parameter.
Args:
values: values to be validated.
"""
if hasattr(self.parameter, 'validate'):
for value in values:
self.parameter.validate(val... |
Check that all values are allowed for this Parameter.
Args:
values: values to be validated.
| Check that all values are allowed for this Parameter. | [
"Check",
"that",
"all",
"values",
"are",
"allowed",
"for",
"this",
"Parameter",
"."
] | def validate(self, values: Sequence[Any]) -> None:
if hasattr(self.parameter, 'validate'):
for value in values:
self.parameter.validate(value) | [
"def",
"validate",
"(",
"self",
",",
"values",
":",
"Sequence",
"[",
"Any",
"]",
")",
"->",
"None",
":",
"if",
"hasattr",
"(",
"self",
".",
"parameter",
",",
"'validate'",
")",
":",
"for",
"value",
"in",
"values",
":",
"self",
".",
"parameter",
".",
... | Check that all values are allowed for this Parameter. | [
"Check",
"that",
"all",
"values",
"are",
"allowed",
"for",
"this",
"Parameter",
"."
] | [
"\"\"\"\n Check that all values are allowed for this Parameter.\n\n Args:\n values: values to be validated.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "values",
"type": "Sequence[Any]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "values",
"type": "Sequence[Any]",
"docstring": "values to be valida... |
f9f500da31cac1dcacbeee891cd25eaed2723773 | jakeogh/Qcodes | qcodes/utils/numpy_utils.py | [
"MIT"
] | Python | list_of_data_to_maybe_ragged_nd_array | np.ndarray | def list_of_data_to_maybe_ragged_nd_array(
column_data: Sequence[Any],
dtype: Optional[type] = None,
) -> np.ndarray:
"""
Convert a (nested) Sequence of data to numpy arrays. Handle that
the elements of the sequence may not have the same length in which
case the returned array will be of dtype o... |
Convert a (nested) Sequence of data to numpy arrays. Handle that
the elements of the sequence may not have the same length in which
case the returned array will be of dtype object.
| Convert a (nested) Sequence of data to numpy arrays. Handle that
the elements of the sequence may not have the same length in which
case the returned array will be of dtype object. | [
"Convert",
"a",
"(",
"nested",
")",
"Sequence",
"of",
"data",
"to",
"numpy",
"arrays",
".",
"Handle",
"that",
"the",
"elements",
"of",
"the",
"sequence",
"may",
"not",
"have",
"the",
"same",
"length",
"in",
"which",
"case",
"the",
"returned",
"array",
"w... | def list_of_data_to_maybe_ragged_nd_array(
column_data: Sequence[Any],
dtype: Optional[type] = None,
) -> np.ndarray:
try:
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
category=VisibleDeprecationWarning,
message="Creat... | [
"def",
"list_of_data_to_maybe_ragged_nd_array",
"(",
"column_data",
":",
"Sequence",
"[",
"Any",
"]",
",",
"dtype",
":",
"Optional",
"[",
"type",
"]",
"=",
"None",
",",
")",
"->",
"np",
".",
"ndarray",
":",
"try",
":",
"with",
"warnings",
".",
"catch_warni... | Convert a (nested) Sequence of data to numpy arrays. | [
"Convert",
"a",
"(",
"nested",
")",
"Sequence",
"of",
"data",
"to",
"numpy",
"arrays",
"."
] | [
"\"\"\"\n Convert a (nested) Sequence of data to numpy arrays. Handle that\n the elements of the sequence may not have the same length in which\n case the returned array will be of dtype object.\n\n \"\"\"",
"# numpy warns here and coming versions",
"# will eventually raise",
"# for ragged arrays ... | [
{
"param": "column_data",
"type": "Sequence[Any]"
},
{
"param": "dtype",
"type": "Optional[type]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "column_data",
"type": "Sequence[Any]",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "dtype",
"type": "Optional[type]",
"docstring": nu... |
943314aec98d148d86e35e75bd0917e2a773b6ff | jakeogh/Qcodes | qcodes/dataset/sqlite/connection.py | [
"MIT"
] | Python | atomic | Iterator[ConnectionPlus] | def atomic(conn: ConnectionPlus) -> Iterator[ConnectionPlus]:
"""
Guard a series of transactions as atomic.
If one transaction fails, all the previous transactions are rolled back
and no more transactions are performed.
NB: 'BEGIN' is by default only inserted before INSERT/UPDATE/DELETE/REPLACE
... |
Guard a series of transactions as atomic.
If one transaction fails, all the previous transactions are rolled back
and no more transactions are performed.
NB: 'BEGIN' is by default only inserted before INSERT/UPDATE/DELETE/REPLACE
but we want to guard any transaction that modifies the database (e.... | Guard a series of transactions as atomic.
If one transaction fails, all the previous transactions are rolled back
and no more transactions are performed.
'BEGIN' is by default only inserted before INSERT/UPDATE/DELETE/REPLACE
but we want to guard any transaction that modifies the database | [
"Guard",
"a",
"series",
"of",
"transactions",
"as",
"atomic",
".",
"If",
"one",
"transaction",
"fails",
"all",
"the",
"previous",
"transactions",
"are",
"rolled",
"back",
"and",
"no",
"more",
"transactions",
"are",
"performed",
".",
"'",
"BEGIN",
"'",
"is",
... | def atomic(conn: ConnectionPlus) -> Iterator[ConnectionPlus]:
with DelayedKeyboardInterrupt():
if not isinstance(conn, ConnectionPlus):
raise ValueError('atomic context manager only accepts '
'ConnectionPlus database connection objects.')
is_outmost = not(con... | [
"def",
"atomic",
"(",
"conn",
":",
"ConnectionPlus",
")",
"->",
"Iterator",
"[",
"ConnectionPlus",
"]",
":",
"with",
"DelayedKeyboardInterrupt",
"(",
")",
":",
"if",
"not",
"isinstance",
"(",
"conn",
",",
"ConnectionPlus",
")",
":",
"raise",
"ValueError",
"(... | Guard a series of transactions as atomic. | [
"Guard",
"a",
"series",
"of",
"transactions",
"as",
"atomic",
"."
] | [
"\"\"\"\n Guard a series of transactions as atomic.\n\n If one transaction fails, all the previous transactions are rolled back\n and no more transactions are performed.\n\n NB: 'BEGIN' is by default only inserted before INSERT/UPDATE/DELETE/REPLACE\n but we want to guard any transaction that modifie... | [
{
"param": "conn",
"type": "ConnectionPlus"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "conn",
"type": "ConnectionPlus",
"docstring": "connection to guard",
"docstring_tokens": [
"connection",
"to",
"guard"
],
"default": null,
"is_optional": null
}
],
"outlier_par... |
943314aec98d148d86e35e75bd0917e2a773b6ff | jakeogh/Qcodes | qcodes/dataset/sqlite/connection.py | [
"MIT"
] | Python | path_to_dbfile | str | def path_to_dbfile(conn: Union[ConnectionPlus, sqlite3.Connection]) -> str:
"""
Return the path of the database file that the conn object is connected to
"""
# according to https://www.sqlite.org/pragma.html#pragma_database_list
# the 3th element (1 indexed) is the path
cursor = conn.cursor()
... |
Return the path of the database file that the conn object is connected to
| Return the path of the database file that the conn object is connected to | [
"Return",
"the",
"path",
"of",
"the",
"database",
"file",
"that",
"the",
"conn",
"object",
"is",
"connected",
"to"
] | def path_to_dbfile(conn: Union[ConnectionPlus, sqlite3.Connection]) -> str:
cursor = conn.cursor()
cursor.execute("PRAGMA database_list")
row = cursor.fetchall()[0]
return row[2] | [
"def",
"path_to_dbfile",
"(",
"conn",
":",
"Union",
"[",
"ConnectionPlus",
",",
"sqlite3",
".",
"Connection",
"]",
")",
"->",
"str",
":",
"cursor",
"=",
"conn",
".",
"cursor",
"(",
")",
"cursor",
".",
"execute",
"(",
"\"PRAGMA database_list\"",
")",
"row",... | Return the path of the database file that the conn object is connected to | [
"Return",
"the",
"path",
"of",
"the",
"database",
"file",
"that",
"the",
"conn",
"object",
"is",
"connected",
"to"
] | [
"\"\"\"\n Return the path of the database file that the conn object is connected to\n \"\"\"",
"# according to https://www.sqlite.org/pragma.html#pragma_database_list",
"# the 3th element (1 indexed) is the path"
] | [
{
"param": "conn",
"type": "Union[ConnectionPlus, sqlite3.Connection]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "conn",
"type": "Union[ConnectionPlus, sqlite3.Connection]",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
df87946929622a8095f8b6e1933c3f4442e19dbb | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2000.py | [
"MIT"
] | Python | parse_output_string | str | def parse_output_string(s: str) -> str:
""" Parses and cleans string outputs of the Keithley """
# Remove surrounding whitespace and newline characters
s = s.strip()
# Remove surrounding quotes
if (s[0] == s[-1]) and s.startswith(("'", '"')):
s = s[1:-1]
s = s.lower()
# Convert so... | Parses and cleans string outputs of the Keithley | Parses and cleans string outputs of the Keithley | [
"Parses",
"and",
"cleans",
"string",
"outputs",
"of",
"the",
"Keithley"
] | def parse_output_string(s: str) -> str:
s = s.strip()
if (s[0] == s[-1]) and s.startswith(("'", '"')):
s = s[1:-1]
s = s.lower()
conversions = {
'mov': 'moving',
'rep': 'repeat',
}
if s in conversions.keys():
s = conversions[s]
return s | [
"def",
"parse_output_string",
"(",
"s",
":",
"str",
")",
"->",
"str",
":",
"s",
"=",
"s",
".",
"strip",
"(",
")",
"if",
"(",
"s",
"[",
"0",
"]",
"==",
"s",
"[",
"-",
"1",
"]",
")",
"and",
"s",
".",
"startswith",
"(",
"(",
"\"'\"",
",",
"'\"... | Parses and cleans string outputs of the Keithley | [
"Parses",
"and",
"cleans",
"string",
"outputs",
"of",
"the",
"Keithley"
] | [
"\"\"\" Parses and cleans string outputs of the Keithley \"\"\"",
"# Remove surrounding whitespace and newline characters",
"# Remove surrounding quotes",
"# Convert some results to a better readable version"
] | [
{
"param": "s",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "s",
"type": "str",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
df87946929622a8095f8b6e1933c3f4442e19dbb | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2000.py | [
"MIT"
] | Python | _get_mode_param | Union[float, str, bool] | def _get_mode_param(
self,
parameter: str,
parser: Callable[[str], Any]
) -> Union[float, str, bool]:
""" Read the current Keithley mode and ask for a parameter """
mode = parse_output_string(self._mode_map[self.mode()])
cmd = f'{mode}:{parameter}?'
... | Read the current Keithley mode and ask for a parameter | Read the current Keithley mode and ask for a parameter | [
"Read",
"the",
"current",
"Keithley",
"mode",
"and",
"ask",
"for",
"a",
"parameter"
] | def _get_mode_param(
self,
parameter: str,
parser: Callable[[str], Any]
) -> Union[float, str, bool]:
mode = parse_output_string(self._mode_map[self.mode()])
cmd = f'{mode}:{parameter}?'
return parser(self.ask(cmd)) | [
"def",
"_get_mode_param",
"(",
"self",
",",
"parameter",
":",
"str",
",",
"parser",
":",
"Callable",
"[",
"[",
"str",
"]",
",",
"Any",
"]",
")",
"->",
"Union",
"[",
"float",
",",
"str",
",",
"bool",
"]",
":",
"mode",
"=",
"parse_output_string",
"(",
... | Read the current Keithley mode and ask for a parameter | [
"Read",
"the",
"current",
"Keithley",
"mode",
"and",
"ask",
"for",
"a",
"parameter"
] | [
"\"\"\" Read the current Keithley mode and ask for a parameter \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "parameter",
"type": "str"
},
{
"param": "parser",
"type": "Callable[[str], Any]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "parameter",
"type": "str",
"docstring": null,
"docstring_toke... |
df87946929622a8095f8b6e1933c3f4442e19dbb | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_2000.py | [
"MIT"
] | Python | _set_mode_param | None | def _set_mode_param(self, parameter: str, value: Union[float, str, bool]) -> None:
""" Read the current Keithley mode and set a parameter """
if isinstance(value, bool):
value = int(value)
mode = parse_output_string(self._mode_map[self.mode()])
cmd = f'{mode}:{parameter} {va... | Read the current Keithley mode and set a parameter | Read the current Keithley mode and set a parameter | [
"Read",
"the",
"current",
"Keithley",
"mode",
"and",
"set",
"a",
"parameter"
] | def _set_mode_param(self, parameter: str, value: Union[float, str, bool]) -> None:
if isinstance(value, bool):
value = int(value)
mode = parse_output_string(self._mode_map[self.mode()])
cmd = f'{mode}:{parameter} {value}'
self.write(cmd) | [
"def",
"_set_mode_param",
"(",
"self",
",",
"parameter",
":",
"str",
",",
"value",
":",
"Union",
"[",
"float",
",",
"str",
",",
"bool",
"]",
")",
"->",
"None",
":",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
":",
"value",
"=",
"int",
"(",
... | Read the current Keithley mode and set a parameter | [
"Read",
"the",
"current",
"Keithley",
"mode",
"and",
"set",
"a",
"parameter"
] | [
"\"\"\" Read the current Keithley mode and set a parameter \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "parameter",
"type": "str"
},
{
"param": "value",
"type": "Union[float, str, bool]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "parameter",
"type": "str",
"docstring": null,
"docstring_toke... |
aec3afa9e908717d68f51dd0d9034bba6aa60850 | jakeogh/Qcodes | qcodes/tests/drivers/test_tektronix_AWG70000A.py | [
"MIT"
] | Python | strip_outer_tags | str | def strip_outer_tags(sml: str) -> str:
"""
Helper function to strip the outer tags of an SML file so that it
complies with the schema provided by tektronix
"""
# make function idempotent
if not sml[1:9] == 'DataFile':
print('Incorrect file format or outer tags '
'already st... |
Helper function to strip the outer tags of an SML file so that it
complies with the schema provided by tektronix
| Helper function to strip the outer tags of an SML file so that it
complies with the schema provided by tektronix | [
"Helper",
"function",
"to",
"strip",
"the",
"outer",
"tags",
"of",
"an",
"SML",
"file",
"so",
"that",
"it",
"complies",
"with",
"the",
"schema",
"provided",
"by",
"tektronix"
] | def strip_outer_tags(sml: str) -> str:
if not sml[1:9] == 'DataFile':
print('Incorrect file format or outer tags '
'already stripped')
return sml
ind1 = sml.find('>\r\n')
sml = sml[ind1+3:]
sml = sml[:-24]
return sml | [
"def",
"strip_outer_tags",
"(",
"sml",
":",
"str",
")",
"->",
"str",
":",
"if",
"not",
"sml",
"[",
"1",
":",
"9",
"]",
"==",
"'DataFile'",
":",
"print",
"(",
"'Incorrect file format or outer tags '",
"'already stripped'",
")",
"return",
"sml",
"ind1",
"=",
... | Helper function to strip the outer tags of an SML file so that it
complies with the schema provided by tektronix | [
"Helper",
"function",
"to",
"strip",
"the",
"outer",
"tags",
"of",
"an",
"SML",
"file",
"so",
"that",
"it",
"complies",
"with",
"the",
"schema",
"provided",
"by",
"tektronix"
] | [
"\"\"\"\n Helper function to strip the outer tags of an SML file so that it\n complies with the schema provided by tektronix\n \"\"\"",
"# make function idempotent",
"# strip off the opening DataFile tag",
"# remove the </Setup> and closing tag"
] | [
{
"param": "sml",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "sml",
"type": "str",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
aec3afa9e908717d68f51dd0d9034bba6aa60850 | jakeogh/Qcodes | qcodes/tests/drivers/test_tektronix_AWG70000A.py | [
"MIT"
] | Python | _make_forged_sequence | <not_specific> | def _make_forged_sequence():
"""
Return an example forged sequence containing a
subsequence
"""
N = 5
num_chans = 3
types = ['element']*(N-1) + ['subsequence']
def random_element(num_chans):
"""
Return an element with random values
2400 points long, the minimum... |
Return an example forged sequence containing a
subsequence
| Return an example forged sequence containing a
subsequence | [
"Return",
"an",
"example",
"forged",
"sequence",
"containing",
"a",
"subsequence"
] | def _make_forged_sequence():
N = 5
num_chans = 3
types = ['element']*(N-1) + ['subsequence']
def random_element(num_chans):
data = {n: {} for n in range(1, 1 + num_chans)}
for key in data.keys():
data[key] = {'wfm': np.random.randn(2400),
'm1': np.ran... | [
"def",
"_make_forged_sequence",
"(",
")",
":",
"N",
"=",
"5",
"num_chans",
"=",
"3",
"types",
"=",
"[",
"'element'",
"]",
"*",
"(",
"N",
"-",
"1",
")",
"+",
"[",
"'subsequence'",
"]",
"def",
"random_element",
"(",
"num_chans",
")",
":",
"\"\"\"\n ... | Return an example forged sequence containing a
subsequence | [
"Return",
"an",
"example",
"forged",
"sequence",
"containing",
"a",
"subsequence"
] | [
"\"\"\"\n Return an example forged sequence containing a\n subsequence\n \"\"\"",
"\"\"\"\n Return an element with random values\n\n 2400 points long, the minimum allowed by the instrument\n \"\"\"",
"# and finally add the subsequence"
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
aec3afa9e908717d68f51dd0d9034bba6aa60850 | jakeogh/Qcodes | qcodes/tests/drivers/test_tektronix_AWG70000A.py | [
"MIT"
] | Python | random_element | <not_specific> | def random_element(num_chans):
"""
Return an element with random values
2400 points long, the minimum allowed by the instrument
"""
data = {n: {} for n in range(1, 1 + num_chans)}
for key in data.keys():
data[key] = {'wfm': np.random.randn(2400),
... |
Return an element with random values
2400 points long, the minimum allowed by the instrument
| Return an element with random values
2400 points long, the minimum allowed by the instrument | [
"Return",
"an",
"element",
"with",
"random",
"values",
"2400",
"points",
"long",
"the",
"minimum",
"allowed",
"by",
"the",
"instrument"
] | def random_element(num_chans):
data = {n: {} for n in range(1, 1 + num_chans)}
for key in data.keys():
data[key] = {'wfm': np.random.randn(2400),
'm1': np.random.randint(0, 2, 2400),
'm2': np.random.randint(0, 2, 2400)}
return data | [
"def",
"random_element",
"(",
"num_chans",
")",
":",
"data",
"=",
"{",
"n",
":",
"{",
"}",
"for",
"n",
"in",
"range",
"(",
"1",
",",
"1",
"+",
"num_chans",
")",
"}",
"for",
"key",
"in",
"data",
".",
"keys",
"(",
")",
":",
"data",
"[",
"key",
... | Return an element with random values
2400 points long, the minimum allowed by the instrument | [
"Return",
"an",
"element",
"with",
"random",
"values",
"2400",
"points",
"long",
"the",
"minimum",
"allowed",
"by",
"the",
"instrument"
] | [
"\"\"\"\n Return an element with random values\n\n 2400 points long, the minimum allowed by the instrument\n \"\"\""
] | [
{
"param": "num_chans",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "num_chans",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | reset_channel | None | def reset_channel(self, val: str) -> None:
"""
Resets the specified channels to factory default settings.
Args:
val: A string representing the channels, channel ranges,
backplane relays, slots or channel patterns to be queried.
"""
if not self._valida... |
Resets the specified channels to factory default settings.
Args:
val: A string representing the channels, channel ranges,
backplane relays, slots or channel patterns to be queried.
| Resets the specified channels to factory default settings. | [
"Resets",
"the",
"specified",
"channels",
"to",
"factory",
"default",
"settings",
"."
] | def reset_channel(self, val: str) -> None:
if not self._validator(val):
raise InvalidValue(f'{val} is not a valid specifier. '
'The specifier should be channels, channel '
'ranges, slots, backplane relays or "allslots".')
self.wri... | [
"def",
"reset_channel",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"if",
"not",
"self",
".",
"_validator",
"(",
"val",
")",
":",
"raise",
"InvalidValue",
"(",
"f'{val} is not a valid specifier. '",
"'The specifier should be channels, channel '",
... | Resets the specified channels to factory default settings. | [
"Resets",
"the",
"specified",
"channels",
"to",
"factory",
"default",
"settings",
"."
] | [
"\"\"\"\n Resets the specified channels to factory default settings.\n\n Args:\n val: A string representing the channels, channel ranges,\n backplane relays, slots or channel patterns to be queried.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | open_channel | None | def open_channel(self, val: str) -> None:
"""
Opens the specified channels and backplane relays.
Args:
val: A string representing the channels, channel ranges,
backplane relays, slots or channel patterns to be queried.
"""
if not self._validator(val)... |
Opens the specified channels and backplane relays.
Args:
val: A string representing the channels, channel ranges,
backplane relays, slots or channel patterns to be queried.
| Opens the specified channels and backplane relays. | [
"Opens",
"the",
"specified",
"channels",
"and",
"backplane",
"relays",
"."
] | def open_channel(self, val: str) -> None:
if not self._validator(val):
raise InvalidValue(f'{val} is not a valid specifier. '
'The specifier should be channels, channel '
'ranges, slots, backplane relays or "allslots".')
self.writ... | [
"def",
"open_channel",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"if",
"not",
"self",
".",
"_validator",
"(",
"val",
")",
":",
"raise",
"InvalidValue",
"(",
"f'{val} is not a valid specifier. '",
"'The specifier should be channels, channel '",
"... | Opens the specified channels and backplane relays. | [
"Opens",
"the",
"specified",
"channels",
"and",
"backplane",
"relays",
"."
] | [
"\"\"\"\n Opens the specified channels and backplane relays.\n\n Args:\n val: A string representing the channels, channel ranges,\n backplane relays, slots or channel patterns to be queried.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | close_channel | None | def close_channel(self, val: str) -> None:
"""
Closes the channels and backplane relays.
Args:
val: A string representing the channels, channel ranges,
backplane relays to be queried.
"""
slots = ['allslots', *self._get_slot_names()]
forbidden... |
Closes the channels and backplane relays.
Args:
val: A string representing the channels, channel ranges,
backplane relays to be queried.
| Closes the channels and backplane relays. | [
"Closes",
"the",
"channels",
"and",
"backplane",
"relays",
"."
] | def close_channel(self, val: str) -> None:
slots = ['allslots', *self._get_slot_names()]
forbidden_channels = self.get_forbidden_channels("allslots")
if val in slots:
raise InvalidValue("Slots cannot be closed all together.")
if not self._validator(val):
raise Inv... | [
"def",
"close_channel",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"slots",
"=",
"[",
"'allslots'",
",",
"*",
"self",
".",
"_get_slot_names",
"(",
")",
"]",
"forbidden_channels",
"=",
"self",
".",
"get_forbidden_channels",
"(",
"\"allslot... | Closes the channels and backplane relays. | [
"Closes",
"the",
"channels",
"and",
"backplane",
"relays",
"."
] | [
"\"\"\"\n Closes the channels and backplane relays.\n\n Args:\n val: A string representing the channels, channel ranges,\n backplane relays to be queried.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _warn_on_disengaged_interlocks | None | def _warn_on_disengaged_interlocks(self, val: str) -> None:
"""
Checks if backplance channels among the given specifiers can be
energized dependening on respective hardware interlocks being
engaged, and raises a warning for those backplane channels which
cannot be energized.
... |
Checks if backplance channels among the given specifiers can be
energized dependening on respective hardware interlocks being
engaged, and raises a warning for those backplane channels which
cannot be energized.
Args:
val: A string representing the channels, channel... | Checks if backplance channels among the given specifiers can be
energized dependening on respective hardware interlocks being
engaged, and raises a warning for those backplane channels which
cannot be energized. | [
"Checks",
"if",
"backplance",
"channels",
"among",
"the",
"given",
"specifiers",
"can",
"be",
"energized",
"dependening",
"on",
"respective",
"hardware",
"interlocks",
"being",
"engaged",
"and",
"raises",
"a",
"warning",
"for",
"those",
"backplane",
"channels",
"w... | def _warn_on_disengaged_interlocks(self, val: str) -> None:
states = self.get_interlock_state()
val_specifiers = val.split(",")
for channel in val_specifiers:
if self._is_backplane_channel(channel):
slot = channel[0]
interlock_state = [
... | [
"def",
"_warn_on_disengaged_interlocks",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"states",
"=",
"self",
".",
"get_interlock_state",
"(",
")",
"val_specifiers",
"=",
"val",
".",
"split",
"(",
"\",\"",
")",
"for",
"channel",
"in",
"val_s... | Checks if backplance channels among the given specifiers can be
energized dependening on respective hardware interlocks being
engaged, and raises a warning for those backplane channels which
cannot be energized. | [
"Checks",
"if",
"backplance",
"channels",
"among",
"the",
"given",
"specifiers",
"can",
"be",
"energized",
"dependening",
"on",
"respective",
"hardware",
"interlocks",
"being",
"engaged",
"and",
"raises",
"a",
"warning",
"for",
"those",
"backplane",
"channels",
"w... | [
"\"\"\"\n Checks if backplance channels among the given specifiers can be\n energized dependening on respective hardware interlocks being\n engaged, and raises a warning for those backplane channels which\n cannot be energized.\n\n Args:\n val: A string representing the... | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | exclusive_close | None | def exclusive_close(self, val: str) -> None:
"""
Closes the specified channels such that any presently closed channels
opens if they are not in the specified by the parameter.
Args:
val: A string representing the channels, channel ranges,
backplane relays to ... |
Closes the specified channels such that any presently closed channels
opens if they are not in the specified by the parameter.
Args:
val: A string representing the channels, channel ranges,
backplane relays to be queried.
| Closes the specified channels such that any presently closed channels
opens if they are not in the specified by the parameter. | [
"Closes",
"the",
"specified",
"channels",
"such",
"that",
"any",
"presently",
"closed",
"channels",
"opens",
"if",
"they",
"are",
"not",
"in",
"the",
"specified",
"by",
"the",
"parameter",
"."
] | def exclusive_close(self, val: str) -> None:
slots = ['allslots', *self._get_slot_names()]
if val in slots:
raise InvalidValue("Slots cannot be exclusively closed.")
if val == "":
raise InvalidValue('An empty string may cause all channels and '
... | [
"def",
"exclusive_close",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"slots",
"=",
"[",
"'allslots'",
",",
"*",
"self",
".",
"_get_slot_names",
"(",
")",
"]",
"if",
"val",
"in",
"slots",
":",
"raise",
"InvalidValue",
"(",
"\"Slots can... | Closes the specified channels such that any presently closed channels
opens if they are not in the specified by the parameter. | [
"Closes",
"the",
"specified",
"channels",
"such",
"that",
"any",
"presently",
"closed",
"channels",
"opens",
"if",
"they",
"are",
"not",
"in",
"the",
"specified",
"by",
"the",
"parameter",
"."
] | [
"\"\"\"\n Closes the specified channels such that any presently closed channels\n opens if they are not in the specified by the parameter.\n\n Args:\n val: A string representing the channels, channel ranges,\n backplane relays to be queried.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | exclusive_slot_close | None | def exclusive_slot_close(self, val: str) -> None:
"""
Closes the specified channels on the associated slots abd opens any
other channels if they are not specified by the parameter.
Args:
val: A string representing the channels, channel ranges,
backplane relay... |
Closes the specified channels on the associated slots abd opens any
other channels if they are not specified by the parameter.
Args:
val: A string representing the channels, channel ranges,
backplane relays to be queried.
| Closes the specified channels on the associated slots abd opens any
other channels if they are not specified by the parameter. | [
"Closes",
"the",
"specified",
"channels",
"on",
"the",
"associated",
"slots",
"abd",
"opens",
"any",
"other",
"channels",
"if",
"they",
"are",
"not",
"specified",
"by",
"the",
"parameter",
"."
] | def exclusive_slot_close(self, val: str) -> None:
slots = ['allslots', *self._get_slot_names()]
if val in slots:
raise InvalidValue("Slots cannot be exclusively closed.")
if val == "":
raise InvalidValue('Argument cannot be an empty string.')
if not self._validato... | [
"def",
"exclusive_slot_close",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"slots",
"=",
"[",
"'allslots'",
",",
"*",
"self",
".",
"_get_slot_names",
"(",
")",
"]",
"if",
"val",
"in",
"slots",
":",
"raise",
"InvalidValue",
"(",
"\"Slot... | Closes the specified channels on the associated slots abd opens any
other channels if they are not specified by the parameter. | [
"Closes",
"the",
"specified",
"channels",
"on",
"the",
"associated",
"slots",
"abd",
"opens",
"any",
"other",
"channels",
"if",
"they",
"are",
"not",
"specified",
"by",
"the",
"parameter",
"."
] | [
"\"\"\"\n Closes the specified channels on the associated slots abd opens any\n other channels if they are not specified by the parameter.\n\n Args:\n val: A string representing the channels, channel ranges,\n backplane relays to be queried.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | clear_forbidden_channels | None | def clear_forbidden_channels(self, val: str) -> None:
"""
Clears the list of channels that are forbidden to close.
Args:
val: A string representing the channels that will no longer
be listed as forbidden to close.
"""
if not self._validator(val):
... |
Clears the list of channels that are forbidden to close.
Args:
val: A string representing the channels that will no longer
be listed as forbidden to close.
| Clears the list of channels that are forbidden to close. | [
"Clears",
"the",
"list",
"of",
"channels",
"that",
"are",
"forbidden",
"to",
"close",
"."
] | def clear_forbidden_channels(self, val: str) -> None:
if not self._validator(val):
raise InvalidValue(f'{val} is not a valid specifier. '
'The specifier should be channels, channel '
'ranges, slots, backplane relays or "allslots".')
... | [
"def",
"clear_forbidden_channels",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"None",
":",
"if",
"not",
"self",
".",
"_validator",
"(",
"val",
")",
":",
"raise",
"InvalidValue",
"(",
"f'{val} is not a valid specifier. '",
"'The specifier should be channels, cha... | Clears the list of channels that are forbidden to close. | [
"Clears",
"the",
"list",
"of",
"channels",
"that",
"are",
"forbidden",
"to",
"close",
"."
] | [
"\"\"\"\n Clears the list of channels that are forbidden to close.\n\n Args:\n val: A string representing the channels that will no longer\n be listed as forbidden to close.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": "A string representing the channe... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_slot_ids | List[str] | def _get_slot_ids(self) -> List[str]:
"""
Returns the slot ids of the installed cards.
"""
cards = self.get_switch_cards()
slot_id = [f"{card['slot_no']}" for card in cards]
return slot_id |
Returns the slot ids of the installed cards.
| Returns the slot ids of the installed cards. | [
"Returns",
"the",
"slot",
"ids",
"of",
"the",
"installed",
"cards",
"."
] | def _get_slot_ids(self) -> List[str]:
cards = self.get_switch_cards()
slot_id = [f"{card['slot_no']}" for card in cards]
return slot_id | [
"def",
"_get_slot_ids",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"cards",
"=",
"self",
".",
"get_switch_cards",
"(",
")",
"slot_id",
"=",
"[",
"f\"{card['slot_no']}\"",
"for",
"card",
"in",
"cards",
"]",
"return",
"slot_id"
] | Returns the slot ids of the installed cards. | [
"Returns",
"the",
"slot",
"ids",
"of",
"the",
"installed",
"cards",
"."
] | [
"\"\"\"\n Returns the slot ids of the installed cards.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_number_of_rows | List[int] | def _get_number_of_rows(self) -> List[int]:
"""
Returns the total number of rows of the installed cards.
"""
slot_id = self._get_slot_ids()
total_number_of_rows = [int(float(self.ask(
f'slot[{i}].rows.matrix')))
for i in slot_id
]
return to... |
Returns the total number of rows of the installed cards.
| Returns the total number of rows of the installed cards. | [
"Returns",
"the",
"total",
"number",
"of",
"rows",
"of",
"the",
"installed",
"cards",
"."
] | def _get_number_of_rows(self) -> List[int]:
slot_id = self._get_slot_ids()
total_number_of_rows = [int(float(self.ask(
f'slot[{i}].rows.matrix')))
for i in slot_id
]
return total_number_of_rows | [
"def",
"_get_number_of_rows",
"(",
"self",
")",
"->",
"List",
"[",
"int",
"]",
":",
"slot_id",
"=",
"self",
".",
"_get_slot_ids",
"(",
")",
"total_number_of_rows",
"=",
"[",
"int",
"(",
"float",
"(",
"self",
".",
"ask",
"(",
"f'slot[{i}].rows.matrix'",
")"... | Returns the total number of rows of the installed cards. | [
"Returns",
"the",
"total",
"number",
"of",
"rows",
"of",
"the",
"installed",
"cards",
"."
] | [
"\"\"\"\n Returns the total number of rows of the installed cards.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_number_of_columns | List[int] | def _get_number_of_columns(self) -> List[int]:
"""
Returns the total number of columns of the installed cards.
"""
slot_id = self._get_slot_ids()
total_number_of_columns = [int(float(self.ask(
f'slot[{i}].columns.matrix')))
for i in slot_id
]
... |
Returns the total number of columns of the installed cards.
| Returns the total number of columns of the installed cards. | [
"Returns",
"the",
"total",
"number",
"of",
"columns",
"of",
"the",
"installed",
"cards",
"."
] | def _get_number_of_columns(self) -> List[int]:
slot_id = self._get_slot_ids()
total_number_of_columns = [int(float(self.ask(
f'slot[{i}].columns.matrix')))
for i in slot_id
]
return total_number_of_columns | [
"def",
"_get_number_of_columns",
"(",
"self",
")",
"->",
"List",
"[",
"int",
"]",
":",
"slot_id",
"=",
"self",
".",
"_get_slot_ids",
"(",
")",
"total_number_of_columns",
"=",
"[",
"int",
"(",
"float",
"(",
"self",
".",
"ask",
"(",
"f'slot[{i}].columns.matrix... | Returns the total number of columns of the installed cards. | [
"Returns",
"the",
"total",
"number",
"of",
"columns",
"of",
"the",
"installed",
"cards",
"."
] | [
"\"\"\"\n Returns the total number of columns of the installed cards.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_rows | List[List[str]] | def _get_rows(self) -> List[List[str]]:
"""
Returns the elements of each row.
"""
total_number_of_rows = self._get_number_of_rows()
row_list = []
for item in total_number_of_rows:
rows_in_each_slot = [str(i) for i in range(1, item + 1)]
row_list.ap... |
Returns the elements of each row.
| Returns the elements of each row. | [
"Returns",
"the",
"elements",
"of",
"each",
"row",
"."
] | def _get_rows(self) -> List[List[str]]:
total_number_of_rows = self._get_number_of_rows()
row_list = []
for item in total_number_of_rows:
rows_in_each_slot = [str(i) for i in range(1, item + 1)]
row_list.append(rows_in_each_slot)
return row_list | [
"def",
"_get_rows",
"(",
"self",
")",
"->",
"List",
"[",
"List",
"[",
"str",
"]",
"]",
":",
"total_number_of_rows",
"=",
"self",
".",
"_get_number_of_rows",
"(",
")",
"row_list",
"=",
"[",
"]",
"for",
"item",
"in",
"total_number_of_rows",
":",
"rows_in_eac... | Returns the elements of each row. | [
"Returns",
"the",
"elements",
"of",
"each",
"row",
"."
] | [
"\"\"\"\n Returns the elements of each row.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_columns | List[List[str]] | def _get_columns(self) -> List[List[str]]:
"""
Returns the elements of each column.
"""
total_number_of_columns = self._get_number_of_columns()
column_list = []
for item in total_number_of_columns:
columns_in_each_slot = []
for i in range(1, item +... |
Returns the elements of each column.
| Returns the elements of each column. | [
"Returns",
"the",
"elements",
"of",
"each",
"column",
"."
] | def _get_columns(self) -> List[List[str]]:
total_number_of_columns = self._get_number_of_columns()
column_list = []
for item in total_number_of_columns:
columns_in_each_slot = []
for i in range(1, item + 1):
if i < 10:
columns_in_each_s... | [
"def",
"_get_columns",
"(",
"self",
")",
"->",
"List",
"[",
"List",
"[",
"str",
"]",
"]",
":",
"total_number_of_columns",
"=",
"self",
".",
"_get_number_of_columns",
"(",
")",
"column_list",
"=",
"[",
"]",
"for",
"item",
"in",
"total_number_of_columns",
":",... | Returns the elements of each column. | [
"Returns",
"the",
"elements",
"of",
"each",
"column",
"."
] | [
"\"\"\"\n Returns the elements of each column.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _get_channel_ranges | List[str] | def _get_channel_ranges(self) -> List[str]:
"""
A helper function that gets two channel names from the available
channels list and join them via a colon to define a channel range.
"""
range_list = []
for i in self._get_slot_ids():
channel = self.get_channels_b... |
A helper function that gets two channel names from the available
channels list and join them via a colon to define a channel range.
| A helper function that gets two channel names from the available
channels list and join them via a colon to define a channel range. | [
"A",
"helper",
"function",
"that",
"gets",
"two",
"channel",
"names",
"from",
"the",
"available",
"channels",
"list",
"and",
"join",
"them",
"via",
"a",
"colon",
"to",
"define",
"a",
"channel",
"range",
"."
] | def _get_channel_ranges(self) -> List[str]:
range_list = []
for i in self._get_slot_ids():
channel = self.get_channels_by_slot(int(i))
for element in itertools.combinations(channel, 2):
range_list.append(':'.join(element))
return range_list | [
"def",
"_get_channel_ranges",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"range_list",
"=",
"[",
"]",
"for",
"i",
"in",
"self",
".",
"_get_slot_ids",
"(",
")",
":",
"channel",
"=",
"self",
".",
"get_channels_by_slot",
"(",
"int",
"(",
"i",
... | A helper function that gets two channel names from the available
channels list and join them via a colon to define a channel range. | [
"A",
"helper",
"function",
"that",
"gets",
"two",
"channel",
"names",
"from",
"the",
"available",
"channels",
"list",
"and",
"join",
"them",
"via",
"a",
"colon",
"to",
"define",
"a",
"channel",
"range",
"."
] | [
"\"\"\"\n A helper function that gets two channel names from the available\n channels list and join them via a colon to define a channel range.\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _connect_or_disconnect_row_to_columns | List[str] | def _connect_or_disconnect_row_to_columns(self, action: str,
slot_id: int, row_id: int,
columns: List[int]) -> List[str]:
"""
A private function that connects or (disconnects) given columns
to (from) a ro... |
A private function that connects or (disconnects) given columns
to (from) a row of a slot and opens (closes) the formed channels.
| A private function that connects or (disconnects) given columns
to (from) a row of a slot and opens (closes) the formed channels. | [
"A",
"private",
"function",
"that",
"connects",
"or",
"(",
"disconnects",
")",
"given",
"columns",
"to",
"(",
"from",
")",
"a",
"row",
"of",
"a",
"slot",
"and",
"opens",
"(",
"closes",
")",
"the",
"formed",
"channels",
"."
] | def _connect_or_disconnect_row_to_columns(self, action: str,
slot_id: int, row_id: int,
columns: List[int]) -> List[str]:
if action not in ["connect", "disconnect"]:
raise ValueError("The action should be ide... | [
"def",
"_connect_or_disconnect_row_to_columns",
"(",
"self",
",",
"action",
":",
"str",
",",
"slot_id",
":",
"int",
",",
"row_id",
":",
"int",
",",
"columns",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"if",
"action",
"not",... | A private function that connects or (disconnects) given columns
to (from) a row of a slot and opens (closes) the formed channels. | [
"A",
"private",
"function",
"that",
"connects",
"or",
"(",
"disconnects",
")",
"given",
"columns",
"to",
"(",
"from",
")",
"a",
"row",
"of",
"a",
"slot",
"and",
"opens",
"(",
"closes",
")",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A private function that connects or (disconnects) given columns\n to (from) a row of a slot and opens (closes) the formed channels.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "action",
"type": "str"
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "row_id",
"type": "int"
},
{
"param": "columns",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "action",
"type": "str",
"docstring": null,
"docstring_tokens"... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _connect_or_disconnect_column_to_rows | List[str] | def _connect_or_disconnect_column_to_rows(self, action: str,
slot_id: int, column_id: int,
rows: List[int]) -> List[str]:
"""
A private function that connects (disconnects) given rows
to (from) a column o... |
A private function that connects (disconnects) given rows
to (from) a column of a slot and opens (closes) the formed channels.
| A private function that connects (disconnects) given rows
to (from) a column of a slot and opens (closes) the formed channels. | [
"A",
"private",
"function",
"that",
"connects",
"(",
"disconnects",
")",
"given",
"rows",
"to",
"(",
"from",
")",
"a",
"column",
"of",
"a",
"slot",
"and",
"opens",
"(",
"closes",
")",
"the",
"formed",
"channels",
"."
] | def _connect_or_disconnect_column_to_rows(self, action: str,
slot_id: int, column_id: int,
rows: List[int]) -> List[str]:
if action not in ["connect", "disconnect"]:
raise ValueError("The action should be ide... | [
"def",
"_connect_or_disconnect_column_to_rows",
"(",
"self",
",",
"action",
":",
"str",
",",
"slot_id",
":",
"int",
",",
"column_id",
":",
"int",
",",
"rows",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"if",
"action",
"not",... | A private function that connects (disconnects) given rows
to (from) a column of a slot and opens (closes) the formed channels. | [
"A",
"private",
"function",
"that",
"connects",
"(",
"disconnects",
")",
"given",
"rows",
"to",
"(",
"from",
")",
"a",
"column",
"of",
"a",
"slot",
"and",
"opens",
"(",
"closes",
")",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A private function that connects (disconnects) given rows\n to (from) a column of a slot and opens (closes) the formed channels.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "action",
"type": "str"
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "column_id",
"type": "int"
},
{
"param": "rows",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "action",
"type": "str",
"docstring": null,
"docstring_tokens"... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | connect_row_to_columns | List[str] | def connect_row_to_columns(self, slot_id: int,
row_id: int, columns: List[int]) -> List[str]:
"""
A convenient function that connects given columns to a row of a
slot and opens the formed channels.
Args:
slot_id: The specifier for the slot from... |
A convenient function that connects given columns to a row of a
slot and opens the formed channels.
Args:
slot_id: The specifier for the slot from which the row and columns
will be selected.
row_id: The specifier for the row to which the provided columns... | A convenient function that connects given columns to a row of a
slot and opens the formed channels. | [
"A",
"convenient",
"function",
"that",
"connects",
"given",
"columns",
"to",
"a",
"row",
"of",
"a",
"slot",
"and",
"opens",
"the",
"formed",
"channels",
"."
] | def connect_row_to_columns(self, slot_id: int,
row_id: int, columns: List[int]) -> List[str]:
return self._connect_or_disconnect_row_to_columns("connect", slot_id,
row_id, columns) | [
"def",
"connect_row_to_columns",
"(",
"self",
",",
"slot_id",
":",
"int",
",",
"row_id",
":",
"int",
",",
"columns",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"self",
".",
"_connect_or_disconnect_row_to_columns",
"(",... | A convenient function that connects given columns to a row of a
slot and opens the formed channels. | [
"A",
"convenient",
"function",
"that",
"connects",
"given",
"columns",
"to",
"a",
"row",
"of",
"a",
"slot",
"and",
"opens",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A convenient function that connects given columns to a row of a\n slot and opens the formed channels.\n\n Args:\n slot_id: The specifier for the slot from which the row and columns\n will be selected.\n row_id: The specifier for the row to which th... | [
{
"param": "self",
"type": null
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "row_id",
"type": "int"
},
{
"param": "columns",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "slot_id",
"type": "int",
"docstring": "The specifier for the slot f... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | disconnect_row_from_columns | List[str] | def disconnect_row_from_columns(self, slot_id: int,
row_id: int,
columns: List[int]) -> List[str]:
"""
A convenient function that disconnects given columns to a row of a
slot and closes the formed channels.
Args:
... |
A convenient function that disconnects given columns to a row of a
slot and closes the formed channels.
Args:
slot_id: The specifier for the slot from which the row and columns
will be selected.
row_id: The specifier for the row to which the provided col... | A convenient function that disconnects given columns to a row of a
slot and closes the formed channels. | [
"A",
"convenient",
"function",
"that",
"disconnects",
"given",
"columns",
"to",
"a",
"row",
"of",
"a",
"slot",
"and",
"closes",
"the",
"formed",
"channels",
"."
] | def disconnect_row_from_columns(self, slot_id: int,
row_id: int,
columns: List[int]) -> List[str]:
return self._connect_or_disconnect_row_to_columns("disconnect", slot_id,
row_id, co... | [
"def",
"disconnect_row_from_columns",
"(",
"self",
",",
"slot_id",
":",
"int",
",",
"row_id",
":",
"int",
",",
"columns",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"self",
".",
"_connect_or_disconnect_row_to_columns",
... | A convenient function that disconnects given columns to a row of a
slot and closes the formed channels. | [
"A",
"convenient",
"function",
"that",
"disconnects",
"given",
"columns",
"to",
"a",
"row",
"of",
"a",
"slot",
"and",
"closes",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A convenient function that disconnects given columns to a row of a\n slot and closes the formed channels.\n\n Args:\n slot_id: The specifier for the slot from which the row and columns\n will be selected.\n row_id: The specifier for the row to whic... | [
{
"param": "self",
"type": null
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "row_id",
"type": "int"
},
{
"param": "columns",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "slot_id",
"type": "int",
"docstring": "The specifier for the slot f... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | connect_column_to_rows | List[str] | def connect_column_to_rows(self, slot_id: int,
column_id: int, rows: List[int]) -> List[str]:
"""
A convenient function that connects given rows to a column of a
slot and opens the formed channels.
Args:
slot_id: The specifier for the slot from... |
A convenient function that connects given rows to a column of a
slot and opens the formed channels.
Args:
slot_id: The specifier for the slot from which the row and columns
will be selected.
column_id: The specifier for the column to which the provided r... | A convenient function that connects given rows to a column of a
slot and opens the formed channels. | [
"A",
"convenient",
"function",
"that",
"connects",
"given",
"rows",
"to",
"a",
"column",
"of",
"a",
"slot",
"and",
"opens",
"the",
"formed",
"channels",
"."
] | def connect_column_to_rows(self, slot_id: int,
column_id: int, rows: List[int]) -> List[str]:
return self._connect_or_disconnect_column_to_rows("connect", slot_id,
column_id, rows) | [
"def",
"connect_column_to_rows",
"(",
"self",
",",
"slot_id",
":",
"int",
",",
"column_id",
":",
"int",
",",
"rows",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"self",
".",
"_connect_or_disconnect_column_to_rows",
"(",... | A convenient function that connects given rows to a column of a
slot and opens the formed channels. | [
"A",
"convenient",
"function",
"that",
"connects",
"given",
"rows",
"to",
"a",
"column",
"of",
"a",
"slot",
"and",
"opens",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A convenient function that connects given rows to a column of a\n slot and opens the formed channels.\n\n Args:\n slot_id: The specifier for the slot from which the row and columns\n will be selected.\n column_id: The specifier for the column to wh... | [
{
"param": "self",
"type": null
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "column_id",
"type": "int"
},
{
"param": "rows",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "slot_id",
"type": "int",
"docstring": "The specifier for the slot f... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | disconnect_column_from_rows | List[str] | def disconnect_column_from_rows(self, slot_id: int,
column_id: int,
rows: List[int]) -> List[str]:
"""
A convenient function that disconnects given rows to a column of a
slot and closes the formed channels.
Args:
... |
A convenient function that disconnects given rows to a column of a
slot and closes the formed channels.
Args:
slot_id: The specifier for the slot from which the row and columns
will be selected.
column_id: The specifier for the column to which the provid... | A convenient function that disconnects given rows to a column of a
slot and closes the formed channels. | [
"A",
"convenient",
"function",
"that",
"disconnects",
"given",
"rows",
"to",
"a",
"column",
"of",
"a",
"slot",
"and",
"closes",
"the",
"formed",
"channels",
"."
] | def disconnect_column_from_rows(self, slot_id: int,
column_id: int,
rows: List[int]) -> List[str]:
return self._connect_or_disconnect_column_to_rows("disconnect", slot_id,
column_id,... | [
"def",
"disconnect_column_from_rows",
"(",
"self",
",",
"slot_id",
":",
"int",
",",
"column_id",
":",
"int",
",",
"rows",
":",
"List",
"[",
"int",
"]",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"self",
".",
"_connect_or_disconnect_column_to_rows",
... | A convenient function that disconnects given rows to a column of a
slot and closes the formed channels. | [
"A",
"convenient",
"function",
"that",
"disconnects",
"given",
"rows",
"to",
"a",
"column",
"of",
"a",
"slot",
"and",
"closes",
"the",
"formed",
"channels",
"."
] | [
"\"\"\"\n A convenient function that disconnects given rows to a column of a\n slot and closes the formed channels.\n\n Args:\n slot_id: The specifier for the slot from which the row and columns\n will be selected.\n column_id: The specifier for the column t... | [
{
"param": "self",
"type": null
},
{
"param": "slot_id",
"type": "int"
},
{
"param": "column_id",
"type": "int"
},
{
"param": "rows",
"type": "List[int]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "slot_id",
"type": "int",
"docstring": "The specifier for the slot f... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | load_setup | None | def load_setup(self, val: Union[int, str]) -> None:
"""
Loads the settings from a saved setup.
Args:
val: An integer or a string that specifies the location of saved
setup. If it is `0`, factory defaults load. If it is `1`,
the saved setup from the no... |
Loads the settings from a saved setup.
Args:
val: An integer or a string that specifies the location of saved
setup. If it is `0`, factory defaults load. If it is `1`,
the saved setup from the nonvolatile memory is recalled.
Otherwise, a stri... | Loads the settings from a saved setup. | [
"Loads",
"the",
"settings",
"from",
"a",
"saved",
"setup",
"."
] | def load_setup(self, val: Union[int, str]) -> None:
self.write(f"setup.recall('{val}')") | [
"def",
"load_setup",
"(",
"self",
",",
"val",
":",
"Union",
"[",
"int",
",",
"str",
"]",
")",
"->",
"None",
":",
"self",
".",
"write",
"(",
"f\"setup.recall('{val}')\"",
")"
] | Loads the settings from a saved setup. | [
"Loads",
"the",
"settings",
"from",
"a",
"saved",
"setup",
"."
] | [
"\"\"\"\n Loads the settings from a saved setup.\n\n Args:\n val: An integer or a string that specifies the location of saved\n setup. If it is `0`, factory defaults load. If it is `1`,\n the saved setup from the nonvolatile memory is recalled.\n ... | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "Union[int, str]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "Union[int, str]",
"docstring": "An integer or a stri... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | _validator | bool | def _validator(self, val: str) -> bool:
"""
Instrument specific validator. As the number of validation points
are around 15k, to avoid QCoDeS parameter validation to print them all,
we shall raise a custom exception.
"""
ch = self.get_channels()
ch_range = self._g... |
Instrument specific validator. As the number of validation points
are around 15k, to avoid QCoDeS parameter validation to print them all,
we shall raise a custom exception.
| Instrument specific validator. As the number of validation points
are around 15k, to avoid QCoDeS parameter validation to print them all,
we shall raise a custom exception. | [
"Instrument",
"specific",
"validator",
".",
"As",
"the",
"number",
"of",
"validation",
"points",
"are",
"around",
"15k",
"to",
"avoid",
"QCoDeS",
"parameter",
"validation",
"to",
"print",
"them",
"all",
"we",
"shall",
"raise",
"a",
"custom",
"exception",
"."
] | def _validator(self, val: str) -> bool:
ch = self.get_channels()
ch_range = self._get_channel_ranges()
slots = ['allslots', *self._get_slot_names()]
backplanes = self.get_analog_backplane_specifiers()
specifier = val.split(',')
for element in specifier:
if ele... | [
"def",
"_validator",
"(",
"self",
",",
"val",
":",
"str",
")",
"->",
"bool",
":",
"ch",
"=",
"self",
".",
"get_channels",
"(",
")",
"ch_range",
"=",
"self",
".",
"_get_channel_ranges",
"(",
")",
"slots",
"=",
"[",
"'allslots'",
",",
"*",
"self",
".",... | Instrument specific validator. | [
"Instrument",
"specific",
"validator",
"."
] | [
"\"\"\"\n Instrument specific validator. As the number of validation points\n are around 15k, to avoid QCoDeS parameter validation to print them all,\n we shall raise a custom exception.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "val",
"type": "str"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "val",
"type": "str",
"docstring": null,
"docstring_tokens": [... |
96804a8f76587fff7a99ccec678858ede7158639 | jakeogh/Qcodes | qcodes/instrument_drivers/tektronix/Keithley_3706A.py | [
"MIT"
] | Python | connect_message | None | def connect_message(self, idn_param: str = 'IDN',
begin_time: Optional[float] = None) -> None:
"""
Overwrites the generic QCoDeS instrument connect message.
Here, additionally, we provide information about
which slots of the system switch is occupied with what
... |
Overwrites the generic QCoDeS instrument connect message.
Here, additionally, we provide information about
which slots of the system switch is occupied with what
kind of matrix, as well.
| Overwrites the generic QCoDeS instrument connect message.
Here, additionally, we provide information about
which slots of the system switch is occupied with what
kind of matrix, as well. | [
"Overwrites",
"the",
"generic",
"QCoDeS",
"instrument",
"connect",
"message",
".",
"Here",
"additionally",
"we",
"provide",
"information",
"about",
"which",
"slots",
"of",
"the",
"system",
"switch",
"is",
"occupied",
"with",
"what",
"kind",
"of",
"matrix",
"as",... | def connect_message(self, idn_param: str = 'IDN',
begin_time: Optional[float] = None) -> None:
idn = self.get_idn()
cards = self.get_switch_cards()
states = self.get_interlock_state()
con_msg = ('Connected to: {vendor} {model} SYSTEM SWITCH '
'(... | [
"def",
"connect_message",
"(",
"self",
",",
"idn_param",
":",
"str",
"=",
"'IDN'",
",",
"begin_time",
":",
"Optional",
"[",
"float",
"]",
"=",
"None",
")",
"->",
"None",
":",
"idn",
"=",
"self",
".",
"get_idn",
"(",
")",
"cards",
"=",
"self",
".",
... | Overwrites the generic QCoDeS instrument connect message. | [
"Overwrites",
"the",
"generic",
"QCoDeS",
"instrument",
"connect",
"message",
"."
] | [
"\"\"\"\n Overwrites the generic QCoDeS instrument connect message.\n Here, additionally, we provide information about\n which slots of the system switch is occupied with what\n kind of matrix, as well.\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "idn_param",
"type": "str"
},
{
"param": "begin_time",
"type": "Optional[float]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "idn_param",
"type": "str",
"docstring": null,
"docstring_toke... |
257b8f5b18ffd14bb21be25c72b0a4b7419a9440 | jakeogh/Qcodes | qcodes/data/hdf5_format_hickle.py | [
"MIT"
] | Python | write_metadata | null | def write_metadata(self, data_set: 'DataSet', io_manager=None, location=None, read_first=False, **kwargs):
"""
Write all metadata in this DataSet to storage.
Args:
data_set: the data we're storing
io_manager (io_manager): the base location to write to
locat... |
Write all metadata in this DataSet to storage.
Args:
data_set: the data we're storing
io_manager (io_manager): the base location to write to
location (str): the file location within io_manager
read_first (Optional[bool]): read previously saved metadat... | Write all metadata in this DataSet to storage. | [
"Write",
"all",
"metadata",
"in",
"this",
"DataSet",
"to",
"storage",
"."
] | def write_metadata(self, data_set: 'DataSet', io_manager=None, location=None, read_first=False, **kwargs):
if io_manager is None or location is None:
raise Exception('please set io_manager and location arguments ')
if read_first:
memory_metadata = data_set.metadata
da... | [
"def",
"write_metadata",
"(",
"self",
",",
"data_set",
":",
"'DataSet'",
",",
"io_manager",
"=",
"None",
",",
"location",
"=",
"None",
",",
"read_first",
"=",
"False",
",",
"**",
"kwargs",
")",
":",
"if",
"io_manager",
"is",
"None",
"or",
"location",
"is... | Write all metadata in this DataSet to storage. | [
"Write",
"all",
"metadata",
"in",
"this",
"DataSet",
"to",
"storage",
"."
] | [
"\"\"\"\n Write all metadata in this DataSet to storage.\n\n Args:\n data_set: the data we're storing\n\n io_manager (io_manager): the base location to write to\n\n location (str): the file location within io_manager\n\n read_first (Optional[bool]): read pre... | [
{
"param": "self",
"type": null
},
{
"param": "data_set",
"type": "'DataSet'"
},
{
"param": "io_manager",
"type": null
},
{
"param": "location",
"type": null
},
{
"param": "read_first",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data_set",
"type": "'DataSet'",
"docstring": "the data we're storin... |
89c2994ba5a846e886cd8c0d6f0901072dd81866 | jakeogh/Qcodes | qcodes/instrument_drivers/stahl/stahl.py | [
"MIT"
] | Python | chain | Callable[..., Any] | def chain(*functions: Callable[..., Any]) -> Callable[..., Any]:
"""
The output of the first callable is piped to the input of the second, etc.
Example:
>>> def f():
>>> return "1.2"
>>> chain(f, float)() # return 1.2 as float
"""
def make_iter(args: Any) -> Iterable[Any... |
The output of the first callable is piped to the input of the second, etc.
Example:
>>> def f():
>>> return "1.2"
>>> chain(f, float)() # return 1.2 as float
| The output of the first callable is piped to the input of the second, etc. | [
"The",
"output",
"of",
"the",
"first",
"callable",
"is",
"piped",
"to",
"the",
"input",
"of",
"the",
"second",
"etc",
"."
] | def chain(*functions: Callable[..., Any]) -> Callable[..., Any]:
def make_iter(args: Any) -> Iterable[Any]:
if not isinstance(args, Iterable) or isinstance(args, str):
return args,
return args
def inner(*args: Any) -> Any:
result = args
for fun in functions:
... | [
"def",
"chain",
"(",
"*",
"functions",
":",
"Callable",
"[",
"...",
",",
"Any",
"]",
")",
"->",
"Callable",
"[",
"...",
",",
"Any",
"]",
":",
"def",
"make_iter",
"(",
"args",
":",
"Any",
")",
"->",
"Iterable",
"[",
"Any",
"]",
":",
"if",
"not",
... | The output of the first callable is piped to the input of the second, etc. | [
"The",
"output",
"of",
"the",
"first",
"callable",
"is",
"piped",
"to",
"the",
"input",
"of",
"the",
"second",
"etc",
"."
] | [
"\"\"\"\n The output of the first callable is piped to the input of the second, etc.\n\n Example:\n >>> def f():\n >>> return \"1.2\"\n >>> chain(f, float)() # return 1.2 as float\n \"\"\""
] | [
{
"param": "functions",
"type": "Callable[..., Any]"
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "functions",
"type": "Callable[..., Any]",
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": [
{
"identifier": "examples",
... |
89c2994ba5a846e886cd8c0d6f0901072dd81866 | jakeogh/Qcodes | qcodes/instrument_drivers/stahl/stahl.py | [
"MIT"
] | Python | _get_lock_status | bool | def _get_lock_status(self) -> bool:
"""
A lock occurs when an output is overloaded
Return:
lock_status: True when locked
"""
send_string = f"{self.parent.identifier} LOCK"
response = self.parent.visa_handle.query_binary_values(
send_string,
... |
A lock occurs when an output is overloaded
Return:
lock_status: True when locked
| A lock occurs when an output is overloaded
Return:
lock_status: True when locked | [
"A",
"lock",
"occurs",
"when",
"an",
"output",
"is",
"overloaded",
"Return",
":",
"lock_status",
":",
"True",
"when",
"locked"
] | def _get_lock_status(self) -> bool:
send_string = f"{self.parent.identifier} LOCK"
response = self.parent.visa_handle.query_binary_values(
send_string,
datatype='B',
header_fmt="empty"
)
channel_index = self._channel_number - 1
channel_group = ... | [
"def",
"_get_lock_status",
"(",
"self",
")",
"->",
"bool",
":",
"send_string",
"=",
"f\"{self.parent.identifier} LOCK\"",
"response",
"=",
"self",
".",
"parent",
".",
"visa_handle",
".",
"query_binary_values",
"(",
"send_string",
",",
"datatype",
"=",
"'B'",
",",
... | A lock occurs when an output is overloaded
Return:
lock_status: True when locked | [
"A",
"lock",
"occurs",
"when",
"an",
"output",
"is",
"overloaded",
"Return",
":",
"lock_status",
":",
"True",
"when",
"locked"
] | [
"\"\"\"\n A lock occurs when an output is overloaded\n\n Return:\n lock_status: True when locked\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.