Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qcodes.Task #61

Closed
damazter opened this issue Mar 21, 2016 · 1 comment
Closed

Qcodes.Task #61

damazter opened this issue Mar 21, 2016 · 1 comment

Comments

@damazter
Copy link
Contributor

When I run my simulation with the following loop:

experiment = qcodes.Loop(system.L[10:100:1], delay=0).each(
    system.build, 
    qcodes.Loop(system.parameters["energy"][0:1:0.1], delay=0)
)

I get the error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-25-ccd2d38d651b> in <module>()
----> 1 data = experiment.run(background=False, location='testsweep', overwrite=True, data_manager=False)

d:\damaz\pycharm\qcodes\qcodes\loops.py in run(self, background, use_async, enqueue, quiet, data_manager, **kwargs)
    446             self.data_set.mode = DataMode.PULL_FROM_SERVER
    447         else:
--> 448             loop_fn()
    449             self.data_set.read()
    450 

d:\damaz\pycharm\qcodes\qcodes\loops.py in _run_wrapper(self, *args, **kwargs)
    486     def _run_wrapper(self, *args, **kwargs):
    487         try:
--> 488             self._run_loop(*args, **kwargs)
    489         finally:
    490             if(hasattr(self, 'data_set') and hasattr(self.data_set, 'close')):

d:\damaz\pycharm\qcodes\qcodes\loops.py in _run_loop(self, first_delay, action_indices, loop_indices, current_values, **ignore_kwargs)
    526                 f(first_delay=delay,
    527                   loop_indices=new_indices,
--> 528                   current_values=new_values)
    529 
    530                 # after the first action, no delay is inherited

TypeError: build() got an unexpected keyword argument 'first_delay'

If I run the code with

experiment = qcodes.Loop(system.L[10:100:1], delay=0).each(
    qcodes.Task(system.build), 
    qcodes.Loop(system.parameters["energy"][0:1:0.1], delay=0)
)

it works fine. I feel that the syntax without the Task method is nicer, but it seems to require that my build is able to receive arbitrary arguments. Although this is easy to achieve, it also feels unnecessary. But I don't know how you all think about that.

@alexcjohnson
Copy link
Contributor

We have a better error message now, we will stick to requiring Task

nataliejpg pushed a commit to nataliejpg/Qcodes that referenced this issue Oct 11, 2017
WilliamHPNielsen pushed a commit that referenced this issue Oct 16, 2017
* Feature/monitor (#15)

* First monitor commit, now 🍔 !

* polish things up

* types for the masses

* chore: Refactor monitor

* fix: Add todo remove space

* refactor

* silm api

* better monitor

* fix: Add static files to pacakge setup

* fix: Add websocket dependency

* fix: Use http with webbrowser open

* fix: Include static, add init

* move server to onw  scripts

* feat: make monitor server standalone

* fix: Sleep before thread starts!

* fix: Update monitor GUI

* Fix monitor for channel parameters (#61)

* The monitor does not work correctly with ws34

* make websockets a soft dependency

Everything but the monitor can be used without it

* remove unused pass statment

* add simple monitor readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants