Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
12d4510
Added drivers for agilent 34400 series, keithley 2600 series, keithle…
Apr 15, 2016
a2ea6be
Adding MercuryiPS magnet driver
Apr 17, 2016
0cb217c
pep8'ing most of the stuff added a few labels
Apr 17, 2016
835801f
removed obsolete functions
Apr 17, 2016
48cf076
removed channel comment, added volt_fetch
Apr 18, 2016
735473b
fixed buffer-size name
Apr 18, 2016
2ca3dd7
Adding __call__ to parameters which direct to set and get
Apr 18, 2016
29be913
example notebook where it does not work with the mock instruments
Apr 18, 2016
9241148
little notebook update
Apr 18, 2016
5034758
also return self.get()
Apr 18, 2016
d04403e
updated notebook
Apr 18, 2016
4b769b5
Adding parameters to the _get_method_attrs thing
Apr 18, 2016
40b94f2
Notebook update
Apr 18, 2016
f6f8c37
More flexibility here
Apr 18, 2016
797b74e
Merge inst-process into callable-parameters
Apr 18, 2016
2bff5c9
Merge pull request #70 from qdev-dk/inst-process
alexcjohnson Apr 18, 2016
adfb731
_normalize_slashes fix for abs paths
alexcjohnson Apr 18, 2016
303eb65
Merge pull request #82 from qdev-dk/fix-norm-slash
alexcjohnson Apr 18, 2016
d5940c7
add __version__ tag to package
eendebakpt Apr 19, 2016
ec51408
added missing file
eendebakpt Apr 19, 2016
4b3223f
instrument constructor docs
alexcjohnson Apr 19, 2016
6359d54
added initial FAQ
eendebakpt Apr 19, 2016
8b1a798
Merge remote-tracking branch 'refs/remotes/origin/inst-process' into …
Apr 19, 2016
c3cbe22
fix toymodel typo
alexcjohnson Apr 19, 2016
cd5ec73
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
Apr 19, 2016
94bbdfd
default datamode is local
alexcjohnson Apr 19, 2016
f78a707
use load_data in old data example nb anyway
alexcjohnson Apr 19, 2016
59a57d7
Merge branch 'master' into Merlins-instrument-drivers
Apr 19, 2016
5ddfe8f
Fixes passing of snapshot arguments
Apr 19, 2016
a60de92
added use of update into notebook for illustration
Apr 19, 2016
efdc69d
more in load_data notebook, and prevent DataServer starting unnecessa…
alexcjohnson Apr 20, 2016
a7dbea2
address some lingering test failures from previous changes
alexcjohnson Apr 20, 2016
7576032
one more load_data edge case and some tests
alexcjohnson Apr 20, 2016
74516ea
fix plotting with location=False, and update nb that uses it
alexcjohnson Apr 20, 2016
fb651f9
Merge pull request #87 from qdev-dk/fix-toymodel
alexcjohnson Apr 20, 2016
ba2c6ea
Merge pull request #89 from qdev-dk/snapshot-fix
Apr 20, 2016
837273d
Merge pull request #88 from qdev-dk/default-datamode
alexcjohnson Apr 20, 2016
9e90818
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
Apr 20, 2016
ad646b8
Merge branch 'Merlins-instrument-drivers' of https://github.com/qdev-…
Apr 20, 2016
9b9b489
Merge pull request #91 from qdev-dk/callable-parameters
alexcjohnson Apr 20, 2016
c895ebe
Merge pull request #86 from qdev-dk/faq
peendebak Apr 20, 2016
c478f5d
minor keithley stuff
Apr 20, 2016
3557dd1
Fixing some folder slashes
Apr 20, 2016
31b32a8
Removing and in future ignoring those data files
Apr 20, 2016
91bfe0f
add the data directory to the .gitignore
Apr 20, 2016
a40c251
Updated license file
Apr 20, 2016
077efbb
Updated README to reflect new license terms
Apr 20, 2016
b5f9937
Clarified license terms
Apr 20, 2016
41589f1
add **kwargs to Keithley driver constructor
peendebak Apr 21, 2016
93f26a0
Added Ithaco driver
Apr 21, 2016
2f23239
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
Apr 21, 2016
18b04d0
fixed typos
Apr 21, 2016
86ce5f2
update
Apr 22, 2016
6367474
added waveform setting to AWG driver
peendebak Apr 22, 2016
576325b
autopep8 AWG driver
peendebak Apr 22, 2016
71c7435
more robust import failure catching on importing plotting packages
alexcjohnson Apr 22, 2016
88d9a68
Merge pull request #105 from qdev-dk/import-fail
alexcjohnson Apr 22, 2016
5e3488a
test to fix metadata update, still fails on remote
Apr 22, 2016
77a599f
ignore (new) .dat files
alexcjohnson Apr 22, 2016
4a8b63e
Merge pull request #95 from qdev-dk/IO-fix
alexcjohnson Apr 22, 2016
6aca37d
Updating instruments for consistent IDN, and metadata-use
Apr 23, 2016
f1a03cf
attribute compatibility with StandardParameter
Apr 23, 2016
5e3f322
fixed typo
Apr 24, 2016
48715f1
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
Apr 24, 2016
a2026d3
repr for Instrument
alexcjohnson Apr 25, 2016
e1b8f7e
detail on errors in write/ask to visa and ip instruments
alexcjohnson Apr 25, 2016
25410b0
more information in StandardParameter set and get errors
alexcjohnson Apr 25, 2016
607277e
no wait/warn on zero delay, and error on bad delay
alexcjohnson Apr 25, 2016
c81ce8f
no threads_map if it would only be one thread
alexcjohnson Apr 25, 2016
28eb9f5
idn parser
Apr 25, 2016
0a29c55
parameter step/delay refactor
alexcjohnson Apr 25, 2016
2248d29
new dict for dataset.store every time we measure in a loop
alexcjohnson Apr 25, 2016
6952c75
Instrument channel
Apr 26, 2016
915493a
Merge pull request #112 from qdev-dk/data-error
alexcjohnson Apr 26, 2016
c0200a5
Use larges buffer possible while staying save
Apr 25, 2016
cdfa77f
test VisaInstrument, including new error reporting
alexcjohnson Apr 26, 2016
f8cd67e
Revert "Instrument channel"
Apr 26, 2016
f4ada37
more precise testing of visa errors
alexcjohnson Apr 26, 2016
101e283
Merge pull request #109 from qdev-dk/visa-error
alexcjohnson Apr 26, 2016
d638f52
enable local version of pyqtgraph
eendebakpt Apr 26, 2016
3fae1db
Merge pull request #85 from qdev-dk/inst-constructor-docs
alexcjohnson Apr 26, 2016
9e88d50
improve code with suggestions from PR
eendebakpt Apr 26, 2016
2a1224b
Merge pull request #113 from qdev-dk/qtplot
peendebak Apr 26, 2016
d1790cf
fix for remote plotting bug
eendebakpt Apr 26, 2016
b6f0ee1
Merge pull request #114 from qdev-dk/qtplot2
peendebak Apr 26, 2016
a766185
added tests for plotting
eendebakpt Apr 26, 2016
20ccced
Merge branch 'master' of https://github.com/qdev-dk/Qcodes into qtplot2
eendebakpt Apr 26, 2016
16b6426
update
eendebakpt Apr 26, 2016
6d47122
fix intermittent multiprocessing test error
alexcjohnson Apr 26, 2016
7942b27
small changes to parameter and tests, tests still use the old syntax
alexcjohnson Apr 26, 2016
e41fa8e
test that delay messages disappear when delay is really zero
alexcjohnson Apr 26, 2016
5be57f3
add and test delay without steps
alexcjohnson Apr 26, 2016
adc02a9
remove old sys.path comments in readme
alexcjohnson Apr 26, 2016
9bf0b1c
Merge branch 'master' into delays
alexcjohnson Apr 26, 2016
94eed85
convert existing drivers and parameter tests to new step/delay names
alexcjohnson Apr 26, 2016
f46a383
Update CONTRIBUTING.md
alexcjohnson Apr 26, 2016
9d43721
Update CONTRIBUTING.md
alexcjohnson Apr 26, 2016
4cd5e6b
Update TESTING.md
alexcjohnson Apr 26, 2016
d709562
remove deprecated parameter kwargs
alexcjohnson Apr 26, 2016
0dd2d4a
Merge pull request #116 from qdev-dk/delays
alexcjohnson Apr 26, 2016
9f76f63
fix loop running fg/bg and data_manager or not
alexcjohnson Apr 27, 2016
27c31e1
test loops with fg/bg and data_manager or not
alexcjohnson Apr 27, 2016
1dcafec
test that data arrays are present but empty on return from bg loop
alexcjohnson Apr 27, 2016
94c1a82
Update FAQ.md
alexcjohnson Apr 27, 2016
03ddda8
update run() comment on data_manager - it DOES store now.
alexcjohnson Apr 27, 2016
bb59b0b
Make sure connection message is actually displayed
AdriaanRol Apr 27, 2016
73fbc82
Don't know why it split these commits
AdriaanRol Apr 27, 2016
bb7ce87
Add a warning when the not ready exception is caugth
AdriaanRol Apr 27, 2016
a1f760a
Adjust Pep8 in AWG driver
CJvanDiepen Apr 28, 2016
5984acf
Changes in `send_waveform_to_list`
CJvanDiepen Apr 28, 2016
da399f1
Minor correction
CJvanDiepen Apr 28, 2016
1db358a
Merge pull request #102 from qdev-dk/AWG
CJvanDiepen Apr 28, 2016
621b92e
Port of 520 ready for testing
AdriaanRol Apr 28, 2016
5b0986a
Tested driver and fixed bug in 5014
AdriaanRol Apr 28, 2016
03ad96c
added basic check to IVVI driver
peendebak Apr 28, 2016
294b13d
Update LICENSE.md
alexcjohnson Apr 28, 2016
613ae1d
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
Apr 29, 2016
8988c67
added optional parameters to IVVI; added get_delay method to Instrume…
peendebak Apr 29, 2016
7b3b7e1
pep8 IVVI
alexcjohnson Apr 29, 2016
cc725ef
use traceback for printing
peendebak Apr 29, 2016
299d50e
Merge pull request #127 from qdev-dk/IVVI
peendebak Apr 29, 2016
af8996f
Merge pull request #125 from qdev-dk/AWG520_driver
AdriaanRol Apr 29, 2016
0490017
Merge pull request #121 from qdev-dk/small_enhancements
AdriaanRol Apr 29, 2016
e0413a3
Merge pull request #118 from qdev-dk/fg-loop
alexcjohnson Apr 29, 2016
6ddf4fa
''' -> """ in data/format.py
alexcjohnson Apr 29, 2016
8c7d694
GNUPlotFormat always_nest (default True) added
alexcjohnson Apr 29, 2016
12f5525
Small bugfix for strings ending in \n
AdriaanRol Apr 29, 2016
ece1b8a
Resolved merge conflict
AdriaanRol Apr 29, 2016
a9ffd0b
Stop Removing obsolete files
Apr 30, 2016
4ecf38a
Fix the automatic reset of the colormap during _update_image
Apr 30, 2016
0ca1daa
Merge pull request #135 from qdev-dk/pyqtgraph_cmap_fix
Apr 30, 2016
afbfe24
don't try to load files with wrong extension
alexcjohnson Apr 30, 2016
c204e85
Merge pull request #134 from qdev-dk/Stop_Removing_obsolete_files
Apr 30, 2016
77d9d19
Merge pull request #130 from qdev-dk/AWG520_driver
AdriaanRol May 1, 2016
4a75c1a
GNUPlotFormat only writes full lines
alexcjohnson May 2, 2016
2c8dda2
move GNUPlotFormat to its own file
alexcjohnson May 2, 2016
24f6ff0
sort arrays within group, so GNUPlotFormat is repeatable
alexcjohnson May 2, 2016
4f0c5d4
remove DataSet.plot - we're not going to do it that way.
alexcjohnson May 2, 2016
4e9387a
test a new edge case of DataArray.mark_saved
alexcjohnson May 2, 2016
2931d5c
fix form and comments for non-default location_providers
alexcjohnson May 2, 2016
1ceefb5
correct sort key for arrays in GNUPlotFormat
alexcjohnson May 2, 2016
43e033b
test load_data (more), new_data, TimestampLocation
alexcjohnson May 2, 2016
3671356
finish testing DataSet
alexcjohnson May 2, 2016
585bf5d
Merge branch 'master' into qtplot2
alexcjohnson May 2, 2016
9ed2f7c
get plot test skeleton working with test.py (on mac)
alexcjohnson May 2, 2016
56fba42
move matplotlib import into MatPlot try block
alexcjohnson May 2, 2016
07e893b
delete some unused methods in format.py
alexcjohnson May 3, 2016
03ff684
add option to test.py
eendebakpt May 3, 2016
664b5b5
add option to hide window during creation
eendebakpt May 3, 2016
ae0a389
fix bug in test_plots.py (noQtPlot->noMatPlot)
eendebakpt May 3, 2016
98227aa
ignore temporary files in git
eendebakpt May 3, 2016
8c3ea9e
Merge pull request #115 from qdev-dk/qtplot2
peendebak May 3, 2016
d5568a6
fix version string
eendebakpt May 3, 2016
cc2e387
test Formatter, start on GNUPlotFormat, and a little code cleanup
alexcjohnson May 3, 2016
c9bc3cf
Merge remote-tracking branch 'refs/remotes/origin/master' into Merlin…
May 3, 2016
13072ab
take out query timeout for all our servers by default
alexcjohnson May 4, 2016
6792bfc
slight simplification to how we handle server errors
alexcjohnson May 4, 2016
184967c
support slices in DataArray.__setitem__
alexcjohnson May 4, 2016
0356afe
test almost all of GNUPlotFormat
alexcjohnson May 4, 2016
64e82d8
BreakIf basic functionality
alexcjohnson May 4, 2016
cd7add9
Merge branch 'master' into formatter-fix
alexcjohnson May 4, 2016
7c1e5be
deferred operations
alexcjohnson May 4, 2016
fdce8a5
test & fix DeferredOperations
alexcjohnson May 4, 2016
cb0bd14
parameters & related classes inherit DeferredOperations!
alexcjohnson May 5, 2016
387dc3e
move is_function into deferred_operations to test without circ. dep.
alexcjohnson May 5, 2016
8b1f5c7
make sure data_manager agrees when a loop has been aborted
alexcjohnson May 6, 2016
19816a5
Merge pull request #148 from qdev-dk/formatter-fix
alexcjohnson May 6, 2016
15fa419
partial sync!
alexcjohnson May 6, 2016
691439e
Merge branch 'master' into partial-sync
alexcjohnson May 6, 2016
ac190b4
drop debug code - the problem with avg_amplitude was fixed by #148
alexcjohnson May 6, 2016
96de0b3
Merge pull request #144 from qdev-dk/no-timeout
alexcjohnson May 7, 2016
658d7b5
more helpful errors on bad Loop actions
alexcjohnson May 7, 2016
036ff87
remove enqueue kwarg in Loop.run
alexcjohnson May 7, 2016
21dc62e
flush so we see the "waiting" message immediately
alexcjohnson May 7, 2016
23480d2
queue messages should respect quiet
alexcjohnson May 7, 2016
b7d39e0
add name/names to the validate_actions error message
alexcjohnson May 7, 2016
0122528
better test for name/names if we're going to tell people they need this!
alexcjohnson May 7, 2016
cd614d5
test minimal parameters in validate_actions
alexcjohnson May 7, 2016
e502340
Merge pull request #153 from qdev-dk/action-errors
alexcjohnson May 8, 2016
3c78b43
Merge branch 'master' into break-if
alexcjohnson May 8, 2016
ee545d8
add BreakIf to validate_actions
alexcjohnson May 8, 2016
27e6533
improve documentation of notebook detection function
eendebakpt May 9, 2016
a78790b
fix plot.update() for plain data_array
eendebakpt May 9, 2016
ea031c4
Merge pull request #151 from qdev-dk/loop-abort
alexcjohnson May 10, 2016
e4565a3
Merge branch 'master' into partial-sync
alexcjohnson May 10, 2016
8161974
Merge pull request #152 from qdev-dk/partial-sync
alexcjohnson May 10, 2016
9756782
fix warnings in plotting
eendebakpt May 10, 2016
b9db5e7
Merge pull request #157 from qdev-dk/fixplot
peendebak May 10, 2016
4c9f61d
lint
alexcjohnson May 10, 2016
5bbdceb
remove function (will be moved to other PR)
eendebakpt May 10, 2016
d2a99c7
Merge pull request #160 from qdev-dk/fixwarnings
peendebak May 10, 2016
6405e1b
Loop.then
alexcjohnson May 10, 2016
c3a6a98
Merge branch 'master' into break-if
alexcjohnson May 10, 2016
42ea2e4
''' -> """ loops.py
alexcjohnson May 10, 2016
e7d8b28
BreakIf docstring
alexcjohnson May 10, 2016
a50fa8c
fix and test .then with nesting
alexcjohnson May 10, 2016
630556d
prohibit __bool__ on DeferredOperations to prevent confusing errors
alexcjohnson May 10, 2016
c013b28
Merge pull request #156 from qdev-dk/notebookhelper
peendebak May 10, 2016
bb51b87
make number validator more generic
eendebakpt May 11, 2016
ec11dc8
better label for Keithley driver
eendebakpt May 11, 2016
4b88e48
added tests for numpy scalars; made Int validator more generic
eendebakpt May 11, 2016
71d9568
Merge pull request #149 from qdev-dk/break-if
alexcjohnson May 11, 2016
176415e
Merge pull request #154 from qdev-dk/no-enqueue
alexcjohnson May 12, 2016
a2498bc
Merge pull request #163 from qdev-dk/numbervalidator
peendebak May 12, 2016
3c771c1
better representation for parameter
eendebakpt May 12, 2016
9f9ddae
use .format to generate string
eendebakpt May 12, 2016
24d063f
convert keithley function into parameter
peendebak May 13, 2016
6ce926a
add __repr__ to remote param and function
peendebak May 13, 2016
27e0f12
add __repr__ to remote instrument
peendebak May 13, 2016
4beeffa
add conversion of name to str
peendebak May 13, 2016
ff59cad
added test for repr
eendebakpt May 13, 2016
b5ed139
add clear() function to MatPlot; add replace() function to BasePlot
eendebakpt May 13, 2016
701e68b
Add info on how to run a single test-file
May 16, 2016
2f7ffa2
enhance: Add more info
May 16, 2016
a17d73b
Merge pull request #176 from qdev-dk/Documentation_improvemet_for_tests
May 16, 2016
f567de4
indentation fix
alexcjohnson May 16, 2016
391a78d
Merge pull request #170 from qdev-dk/repr
peendebak May 16, 2016
ec8f126
pep8
alexcjohnson May 16, 2016
cbf3627
DRYer MatPlot defaults
alexcjohnson May 16, 2016
55cf6f2
add explanation of clear() function
eendebakpt May 17, 2016
b532582
pep8
eendebakpt May 17, 2016
e119fc1
Merge pull request #174 from qdev-dk/plots3
peendebak May 17, 2016
48b6252
magnet visa
May 11, 2016
57ff539
Ugly Magnet update
May 11, 2016
be571ae
Merge branch 'master' into Merlins-instrument-drivers
May 18, 2016
a812e34
Merge remote-tracking branch 'refs/remotes/origin/metadata' into JUNK…
May 18, 2016
99d4fa1
remove idn
May 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ target/
# Generated data
*.csv
*.data
*.hdf5
*.dat
*.hdf5

# Temporary files
*.md~
tmp/

docs/examples/data/*
23 changes: 17 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,28 @@ Figured out a new way to use qcodes? Found a package that makes your life better

### Setup

- Clone and register the package for development as described in [README.md#installation]
- Clone and register the package for development as described in the [README](README.md#installation)

### Running Tests

The core test runner is in `qcodes/test.py:
The core test runner is in `qcodes/test.py`:
```
python qcodes/test.py
# optional extra verbosity
python qcodes/test.py -v
# optional extra verbosity and fail fast
python qcodes/test.py -v -f
```
You should see output that looks something like this:

You can also run single tests with:
```
# python -m unittest module
# python -m unittest module.class
# python -m unittest module.class.function
python -m unittest qcodes.tests.test_metadata
# or
python -m unittest qcodes.tests.test_metadata.TestMetadatable.test_snapshot
```

If you run the core test runner, you should see output that looks something like this:
```
.........***** found one MockMock, testing *****
............................................Timing resolution:
Expand Down Expand Up @@ -122,7 +133,7 @@ Coverage testing is generally meaningless for instrument drivers, as calls to `a

- Write your new feature or fix. Be sure it doesn't break any existing tests, and please write tests that cover your feature as well, or if you are fixing a bug, write a test that would have failed before your fix. Our goal is 100% test coverage, and although we are not there, we should always strive to increase our coverage with each new feature. Please be aware also that 100% test coverage does NOT necessarily mean 100% logic coverage. If (as is often the case in Python) a single line of code can behave differently for different inputs, coverage in itself will not ensure that this is tested.

- The standard test commands are listed above under [Running Tests](#running_tests). More notes on different test runners can be found in [TESTING.md].
- The standard test commands are listed above under [Running Tests](#running_tests). More notes on different test runners can be found in [TESTING](TESTING.md).

- Core tests live in [qcodes/tests](https://github.com/qdev-dk/Qcodes/tree/master/qcodes/tests) and instrument tests live in the same directories as the instrument drivers.

Expand Down
26 changes: 26 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2015, 2016 by Microsoft Corporation and Københavns Universitet.

QCoDeS is currently available only within the Microsoft Station Q collaboration and by specific private arrangement with a beta test group. Please do not share it with anyone who is not part of the beta test program. If you have a coworker who would like access, please contact Alex Johnson (alex.johnson@nbi.ku.dk) to see if they can be added to the program.

Please report all bugs, limitations, or missing functionality as issues on the Qcodes GitHub.

We encourage you to contribute any bug fixes or new functionality you develop, especially device drivers, by creating a GitHub branch and submitting a pull request. Note that any code you contribute may be included in the public open source release of QCoDeS.

We intend to release it as open source software once it is robust and reasonably stable, under the following license terms:

> QCoDeS is available under the [MIT open-source license](https://opensource.org/licenses/MIT):
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software
> and associated documentation files (the "Software"), to deal in the Software without restriction,
> including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
> and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
> subject to the following conditions:

> The above copyright notice and this permission notice shall be included in all copies or
> substantial portions of the Software.

> SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
> LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 0 additions & 8 deletions LICENSE.txt

This file was deleted.

10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ If you registered Qcodes with Python via `setup.py develop`, all you need to do

See the [docs](docs) directory, particularly the notebooks in [docs/examples](docs/examples)

Until we have this prepared as an installable package, you need to make sure Python can find qcodes by adding the repository root directory to `sys.path`:
```
import sys
qcpath = 'your/Qcodes/repository/path'
if qcpath not in sys.path:
sys.path.append(qcpath)
```
For frequently asked questions see the [Qcodes FAQ](docs/FAQ.md).

## Contributing

Expand All @@ -61,4 +55,4 @@ See the [Roadmap](ROADMAP.md) an overview of where the project intends to go.

## License

Qcodes is currently a private development of Microsoft's Station Q collaboration, and IS NOT licensed for distribution outside the collaboration. We intend to release it as open source software once it is robust and reasonably stable, under the MIT license or similar. See [License](LICENSE.txt)
Qcodes is currently a private development of Microsoft's Station Q collaboration, and IS NOT licensed for distribution outside the collaboration except by arrangement. We intend to release it as open source software once it is robust and reasonably stable, under the MIT license. See [License](LICENSE.md).
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Notes on test runners compatible with Qcodes

There is now a test script [test.py] in the root directory that uses the standard `unittest` machinery to run all the core tests (does not include instrument drivers). It has been tested on Mac (terminal), and Windows (cmd, git bash, and PowerShell). It includes coverage testing, but will only print a coverage report if tests pass.
There is now a test script [test.py](qcodes/test.py) in the qcodes directory that uses the standard `unittest` machinery to run all the core tests (does not include instrument drivers). It has been tested on Mac (terminal), and Windows (cmd, git bash, and PowerShell). It includes coverage testing, but will only print a coverage report if tests pass.

The biggest difficulty with testing Qcodes is windows multiprocessing. The spawn method restricts execution in ways that are annoying for regular users (no class/function definitions in the notebook, no closures) but seem to be completely incompatible with some test runners (and/or coverage tracking)

Expand Down
33 changes: 33 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# QCodes FAQ

This FAQ is intended for users for Qcodes. For development, see Github.

## Installation

### How to install Qcodes?

...
## Usage

### What are the different ways to run Loops, and when would you use them?

`Loop.run()` (or `ActiveLoop.run()`) has a two arguments that control where the loop runs and how the data is handled: `background` (`True` (default) or `False`) and `data_manager` (`None` (gets the default `DataManager`) or `False`).

- Default usage: `Loop.run()`:
Involves two extra processes, one `<Measurement>` process that sequences the loop actions and a `<DataServer>` process that the `<Measurement>` feeds data to, then stores it to disk and provides it to other processes that want it. This is the normal way to run loops, because it minimizes the work done in the measurement process, so it runs as fast as possible, and also keeps the main process free for other tasks like live plotting and analysis.

- Foreground with a DataManager: `Loop.run(background=False)`:
The measurement loop runs in the process that started it, rather than making a new process, so the starting process blocks until the loop is finished. You might do this to make debugging easier.

- Background with no DataManager: `Loop.run(data_manager=False)`:
The measurement loop runs in the background, but does not start (or connect to, if one is started already) a `<DataServer>` process; instead, it holds and stores the data itself. If the main process wants to sync this data during acquisition, it will need to read it from disk. Not sure why you would use this mode, but it's possible.

- Foreground with no DataManager: `Loop.run(background=False, data_manager=False)`:
No extra processes are involved; the measurement loop runs in the process that started it, and holds and saves the data itself. If you want to start another measurement loop while one is already running (for example if you have a complex parameter that runs its own measurement loop to determine some derived value), you need to use this mode. That's because only one background measurement is allowed at a time, and only one `DataSet` may be on the `<DataServer>` at a time. But this mode will still save the `DataSet` it makes; in most such complex parameter cases you want an even more stripped-down loop: `Loop.run_temp()` which just calls: `Loop.run(background=False, quiet=True, data_manager=False, location=False)` so it does not save anything, nor does it print the normal messages that `run` prints describing the `DataSet` it makes.

### How to abort a running measurement?

Use `qc.halt_bg()`. To list the active measurements use `qc.active_children()`



61 changes: 56 additions & 5 deletions docs/examples/Load-and-plot-old-data.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Loading data for analysis: the `load_data` function.\n",
"\n",
"`DataSet` objects are not intended to be instantiated directly, but\n",
"rather through the helper functions:\n",
"- `load_data` for existing data sets, including the data currently\n",
" being acquired.\n",
"- `new_data` to make an empty data set to be populated with new\n",
" measurements or simulation data. `new_data` is called internally by\n",
" `Loop.run()` so is also generally not needed directly.\n",
"\n",
"If you omit `location`, or if `location` matches the data set currently\n",
"being acquired, `load_data` and subsequent calls to `data_set.sync()`\n",
"will pull from the `DataServer` (`DataMode.PULL_FROM_SERVER`).\n",
"Otherwise `load_data` and `data_set.sync()` will read from disk\n",
"(`DataMode.LOCAL`).\n",
"\n",
"Note that a `DataServer` is, at least for now, local to one parent\n",
"process / notebook, so if you open a separate notebook for analysis, even\n",
"your live data will be pulled from disk."
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -234,7 +259,7 @@
" min-height: 50px;\n",
" max-height: 400px;\n",
" min-width: 400px;\n",
" max-width: 700px;\n",
" max-width: 1000px;\n",
"}</style>"
],
"text/plain": [
Expand All @@ -248,8 +273,8 @@
"data": {
"text/plain": [
"DataSet: DataMode.LOCAL, location='testsweep'\n",
" amplitude: None\n",
" chan0: None"
" chan0: None\n",
" amplitude: None"
]
},
"execution_count": 1,
Expand All @@ -260,7 +285,7 @@
"source": [
"%matplotlib nbagg\n",
"import qcodes as qc\n",
"data = qc.DataSet('testsweep')\n",
"data = qc.load_data('testsweep')\n",
"data"
]
},
Expand Down Expand Up @@ -1050,7 +1075,7 @@
{
"data": {
"text/plain": [
"<qcodes.plots.matplotlib.MatPlot at 0x104005898>"
"<qcodes.plots.matplotlib.MatPlot at 0x10410e240>"
]
},
"execution_count": 2,
Expand All @@ -1062,6 +1087,32 @@
"qc.MatPlot(data.amplitude)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "RuntimeError",
"evalue": "DataManager has no live data",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-8-22984df78935>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mlive_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mqc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# this will be an error because there is no live data\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mlive_data\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/Users/alex/qdev/Qcodes/qcodes/data/data_set.py\u001b[0m in \u001b[0;36mload_data\u001b[0;34m(location, data_manager, formatter, io)\u001b[0m\n\u001b[1;32m 85\u001b[0m 'not exist or was requested not to be used')\n\u001b[1;32m 86\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 87\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_get_live_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata_manager\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 89\u001b[0m elif (data_manager and\n",
"\u001b[0;32m/Users/alex/qdev/Qcodes/qcodes/data/data_set.py\u001b[0m in \u001b[0;36m_get_live_data\u001b[0;34m(data_manager)\u001b[0m\n\u001b[1;32m 99\u001b[0m \u001b[0mlive_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mask\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'get_data'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 100\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlive_data\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlive_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNoData\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 101\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'DataManager has no live data'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 102\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[0mlive_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmode\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mDataMode\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPULL_FROM_SERVER\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mRuntimeError\u001b[0m: DataManager has no live data"
]
}
],
"source": [
"live_data = qc.load_data() # this will be an error because there is no live data\n",
"live_data"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
Loading