Skip to content

Commit

Permalink
Merge pull request #2507 from nikhartman/nik/as_xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 27, 2021
2 parents b3b7240 + 8dc3634 commit afbcadf
Show file tree
Hide file tree
Showing 10 changed files with 1,003 additions and 512 deletions.
28 changes: 26 additions & 2 deletions docs/examples/15_minutes_to_QCoDeS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"An experimental setup comprises of many instruments. We call an experimental setup as \"station\". A station is connected to many instruments or devices. QCoDeS provides a way to interact with all these instruments to help users ",
"An experimental setup comprises of many instruments. We call an experimental setup as \"station\". A station is connected to many instruments or devices. QCoDeS provides a way to interact with all these instruments to help users \n",
"the measurements and store the data in a database. To interact (read, write, trigger, etc) with the instruments, we have created a [library of drivers](http://qcodes.github.io/Qcodes/api/generated/qcodes.instrument_drivers.html) for commonly used ones. These drivers implement the most needed functionalities of the instruments. \n",
"\n",
"An \"Instrument\" can perform many functions. For example, on an oscilloscope instrument, we first set a correct trigger level and other parameters and then obtain a trace. In QCoDeS lingo, we call \"trigger_level\" and \"trace\" as `parameter` of this `instrument`. An instrument at any moment will have many such parameters which together define the state of the instrument, hence a parameter can be thought of as a state variable of the instrument. QCoDeS provides a method to set values of these parameters (set trigger level) and get the values from them (obtain a trace). By this way, we can interact with all the needed parameters of an instrument and are ready to set up a measurement. \n",
Expand Down Expand Up @@ -1243,6 +1243,30 @@
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Export data to xarray"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It's also possible to export data stored within a QCoDeS database to an `xarray.DataArray`. This can be achieved via:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"xarray = dataset.to_xarray_dataarray_dict()['dmm_v1']\r\n",
"xarray.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1358,7 +1382,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.7.9-final"
},
"toc": {
"base_numbering": 1,
Expand Down
379 changes: 171 additions & 208 deletions docs/examples/DataSet/Accessing-data-in-DataSet.ipynb

Large diffs are not rendered by default.

651 changes: 413 additions & 238 deletions docs/examples/DataSet/Working-With-Pandas-and-XArray.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
- scipy
- gitpython
- pandas
- xarray
- testpath>=0.4.4
- tqdm
- tabulate
Expand Down
Loading

0 comments on commit afbcadf

Please sign in to comment.