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

feature: add native xarray support and concatenation of DataFrames/DataArrays #2507

Merged
merged 47 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1567486
kwarg for concatenation of dataframes
nikhartman Dec 9, 2020
0ee553a
cleanup concat output
nikhartman Dec 9, 2020
45f6aeb
docs for dataframe output
nikhartman Dec 9, 2020
c7df542
add xarray method
nikhartman Dec 10, 2020
cf8200a
use parameter_data to determine if index is the same
nikhartman Dec 10, 2020
2df96af
fix docs
nikhartman Dec 10, 2020
37e3cbe
adding xarray to env files
trevormorgan Jan 14, 2021
9e65dbd
removed douplicated and sorted alphabetically
trevormorgan Jan 15, 2021
d783be9
small example for xarray from dataset
trevormorgan Jan 15, 2021
6d6e85e
return df or xarray dset if concat=True
trevormorgan Jan 15, 2021
cb662ca
add attr for all paramspecs
trevormorgan Jan 16, 2021
bfc07cf
revert atrtr for coords
trevormorgan Jan 16, 2021
1ec7370
add coord attr data from paramspec
trevormorgan Jan 18, 2021
9daf4a1
convert to str
trevormorgan Jan 18, 2021
c97a02b
fixed typing errors
trevormorgan Jan 19, 2021
aa5b65c
trim whitespace
trevormorgan Jan 19, 2021
cde8b21
update doc string, line length
trevormorgan Jan 19, 2021
bb4c536
fix doc string for doc build error
trevormorgan Jan 19, 2021
3aad8ab
remove white space
trevormorgan Jan 19, 2021
9b8c75e
remove white space in doc string
trevormorgan Jan 20, 2021
0e299fa
created seperate functions for xr dataset and dataarray return
trevormorgan Jan 21, 2021
5055035
revert get_data_as_pandas_dataframe
trevormorgan Jan 21, 2021
41ca420
fix spacing
trevormorgan Jan 21, 2021
29a4020
change name to _sp_iterator and add starmap
trevormorgan Jan 24, 2021
c7128f8
add xarray to setup
trevormorgan Jan 24, 2021
f2f7229
added seperate methods for pandas dataframe
trevormorgan Jan 25, 2021
80160a2
updates for seperate pandas dataframe methods on datasets
trevormorgan Jan 25, 2021
cbcbc43
Merge branch 'master' into nik/as_xarray
trevormorgan Jan 25, 2021
ecd910d
added xarray to setup with strict version
trevormorgan Jan 25, 2021
784a094
update to docs for using pandas and xarray
trevormorgan Jan 26, 2021
f0535ab
fix same_setpoint error by using starmap
trevormorgan Jan 26, 2021
53a6d89
add mew blank cell
trevormorgan Jan 26, 2021
296e4f7
Update Accessing-data-in-DataSet.ipynb
trevormorgan Jan 26, 2021
c2f9222
use current release of pandas
trevormorgan Jan 26, 2021
91b88ed
Merge branch 'nik/as_xarray' of https://github.com/nikhartman/Qcodes …
trevormorgan Jan 26, 2021
30dac35
fix xarray old method call
trevormorgan Jan 26, 2021
679f944
fix method call rename
trevormorgan Jan 26, 2021
543a9d8
set min ver to 0.25.0 for xarray
trevormorgan Jan 26, 2021
2a4e888
Update 15_minutes_to_QCoDeS.ipynb
trevormorgan Jan 26, 2021
cdca2c7
Merge branch 'master' into nik/as_xarray
astafan8 Jan 26, 2021
19d3f05
Merge branch 'master' into nik/as_xarray
trevormorgan Jan 26, 2021
e7a5cb3
fix strange syntax issue
trevormorgan Jan 27, 2021
e9928ab
Merge branch 'nik/as_xarray' of https://github.com/nikhartman/Qcodes …
trevormorgan Jan 27, 2021
c7b80ff
assert equals fix for same setpoint
trevormorgan Jan 27, 2021
d9d66cb
added unit test for same_setpoint warning plus rearrange private methods
trevormorgan Jan 27, 2021
fd68f61
respect max line length for readability
astafan8 Jan 27, 2021
8dc3634
Merge branch 'master' into nik/as_xarray
astafan8 Jan 27, 2021
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
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