mirror of https://github.com/m-labs/artiq.git
artiq: move namespace artiq.* -> artiq.language.*
perl -i -pe 's/^from artiq import \*$/from artiq.language import */' your_experiments/*.py
This commit is contained in:
parent
ea3bb27029
commit
fbe4d96572
|
@ -1,13 +1,3 @@
|
||||||
from artiq import language
|
|
||||||
from artiq.language import *
|
|
||||||
from artiq.coredevice.dds import (PHASE_MODE_CONTINUOUS, PHASE_MODE_ABSOLUTE,
|
|
||||||
PHASE_MODE_TRACKING)
|
|
||||||
|
|
||||||
__all__ = []
|
|
||||||
__all__.extend(language.__all__)
|
|
||||||
__all__ += ["PHASE_MODE_CONTINUOUS", "PHASE_MODE_ABSOLUTE",
|
|
||||||
"PHASE_MODE_TRACKING"]
|
|
||||||
|
|
||||||
from ._version import get_versions
|
from ._version import get_versions
|
||||||
__version__ = get_versions()['version']
|
__version__ = get_versions()['version']
|
||||||
del get_versions
|
del get_versions
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
|
|
||||||
|
|
||||||
from artiq.language import core, types, environment, units, scan
|
from artiq.language import core, types, environment, units, scan
|
||||||
from artiq.language.core import *
|
from artiq.language.core import *
|
||||||
from artiq.language.types import *
|
from artiq.language.types import *
|
||||||
|
@ -7,6 +5,8 @@ from artiq.language.environment import *
|
||||||
from artiq.language.units import *
|
from artiq.language.units import *
|
||||||
from artiq.language.scan import *
|
from artiq.language.scan import *
|
||||||
|
|
||||||
|
from artiq.coredevice.dds import (PHASE_MODE_CONTINUOUS, PHASE_MODE_ABSOLUTE,
|
||||||
|
PHASE_MODE_TRACKING)
|
||||||
|
|
||||||
__all__ = []
|
__all__ = []
|
||||||
__all__.extend(core.__all__)
|
__all__.extend(core.__all__)
|
||||||
|
@ -14,3 +14,5 @@ __all__.extend(types.__all__)
|
||||||
__all__.extend(environment.__all__)
|
__all__.extend(environment.__all__)
|
||||||
__all__.extend(units.__all__)
|
__all__.extend(units.__all__)
|
||||||
__all__.extend(scan.__all__)
|
__all__.extend(scan.__all__)
|
||||||
|
__all__ += ["PHASE_MODE_CONTINUOUS", "PHASE_MODE_ABSOLUTE",
|
||||||
|
"PHASE_MODE_TRACKING"]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
from artiq.sim import devices as sim_devices
|
from artiq.sim import devices as sim_devices
|
||||||
from artiq.test.hardware_testbench import ExperimentCase
|
from artiq.test.hardware_testbench import ExperimentCase
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
from time import time, sleep
|
from time import time, sleep
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
from artiq.master.scheduler import Scheduler
|
from artiq.master.scheduler import Scheduler
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
from artiq.master.worker import *
|
from artiq.master.worker import *
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Core language reference
|
Core language reference
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
The most commonly used features from those modules can be imported with ``from artiq import *``.
|
The most commonly used features from those modules can be imported with ``from artiq.language import *``.
|
||||||
|
|
||||||
:mod:`artiq.language.core` module
|
:mod:`artiq.language.core` module
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
|
@ -8,7 +8,7 @@ Connecting to the core device
|
||||||
|
|
||||||
As a very first step, we will turn on a LED on the core device. Create a file ``led.py`` containing the following: ::
|
As a very first step, we will turn on a LED on the core device. Create a file ``led.py`` containing the following: ::
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class LED(EnvExperiment):
|
class LED(EnvExperiment):
|
||||||
|
@ -93,7 +93,7 @@ The point of running code on the core device is the ability to meet demanding re
|
||||||
|
|
||||||
Create a new file ``rtio.py`` containing the following: ::
|
Create a new file ``rtio.py`` containing the following: ::
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class Tutorial(EnvExperiment):
|
class Tutorial(EnvExperiment):
|
||||||
|
|
|
@ -16,7 +16,7 @@ Then create a ``~/artiq-master/repository`` sub-folder to contain experiments. T
|
||||||
|
|
||||||
Create a very simple experiment in ``~/artiq-master/repository`` and save it as ``mgmt_tutorial.py``: ::
|
Create a very simple experiment in ``~/artiq-master/repository`` and save it as ``mgmt_tutorial.py``: ::
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class MgmtTutorial(EnvExperiment):
|
class MgmtTutorial(EnvExperiment):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class SubComponent1(HasEnvironment):
|
class SubComponent1(HasEnvironment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class PhotonHistogram(EnvExperiment):
|
class PhotonHistogram(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class BlinkForever(EnvExperiment):
|
class BlinkForever(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class DDSTest(EnvExperiment):
|
class DDSTest(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class Handover(EnvExperiment):
|
class Handover(EnvExperiment):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class Mandelbrot(EnvExperiment):
|
class Mandelbrot(EnvExperiment):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
|
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class PulseNotReceivedError(Exception):
|
class PulseNotReceivedError(Exception):
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
from artiq.wavesynth.coefficients import SplineSource
|
from artiq.wavesynth.coefficients import SplineSource
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import random
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy.optimize import curve_fit
|
from scipy.optimize import curve_fit
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
def model(x, F0):
|
def model(x, F0):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from itertools import count
|
from itertools import count
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class RunForever(EnvExperiment):
|
class RunForever(EnvExperiment):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class _PayloadNOP(EnvExperiment):
|
class _PayloadNOP(EnvExperiment):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class DDSSetter(EnvExperiment):
|
class DDSSetter(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class TerminateAll(EnvExperiment):
|
class TerminateAll(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class AluminumSpectroscopy(EnvExperiment):
|
class AluminumSpectroscopy(EnvExperiment):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from artiq import *
|
from artiq.language import *
|
||||||
|
|
||||||
|
|
||||||
class SimpleSimulation(EnvExperiment):
|
class SimpleSimulation(EnvExperiment):
|
||||||
|
|
Loading…
Reference in New Issue