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

StationConfigurator #1256

Closed

Conversation

Dominik-Vogel
Copy link
Contributor

@Dominik-Vogel Dominik-Vogel commented Sep 3, 2018

Migrating the StationConfigurator from qdev-wrappers.
qdev-dk/qdev-wrappers#68

Merging the StationConfigurator with the Station. The StationConfigurator has been a separate object in qdev_wrappers because the Station lives in qcodes core, but it conceptionally belongs into the Station.
The Station is meant to be a representation of the physical setup. And this description is given by the station config yaml file.
So far the station has methods for snapshotting:

  • snapshot_base
  • add_component

and default measurements:

  • set_measurement
  • measure

and in this pr methods for serialization from a yaml are added:

  • load_config_file
  • load_instrument

I suggest that we deprecate the default measurement funcitonality in another PR, because as far as I know it is not used and it is only used by the legacy loop. Removing these function would further decouple dependencies.
I also suggest that we accommodate the control over the sample name in the Station object. (this would also satisfy @ThorvaldLarsen s request.)

Previous bootstrapping looked like this:

-create station (no arguments)
-create StationConfigurator, pass station
-call init_function to specify sample name

With this an experiment is bootstrapped by simply

-create station with sample name as argument

To go in small steps this PR addresses the minimal integration of the station configurator in the station. In late PRs documentation and possible refactorings of the internal structure might follow. Lets think about what we are committing to with this PR.

@ThorvaldLarsen
Copy link
Contributor

Was it decided that the stationconfigurator should not set up the part of the station concerning sample name and folder structure on the computer?
If so what is there already a suggested way of doing this for the new dataset (thinking about a replacement for my_init() in wrappers).

@Dominik-Vogel

@Dominik-Vogel
Copy link
Contributor Author

Thank you @ThorvaldLarsen we are currently discussing were to set the sample name.

I think there should not be anything to setup for the folder structure other than some entries in the qcodesrc.

def load_file(self, filename: Optional[str] = None):

# 1. load config from file
if use_pyyaml:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to support usage of pyyaml? Seems like a good time to choose using ruamel (at least I think it is just better) instead of having two versions of dependencies spread in lab.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there is unfortunately. There has been an issue with writing back the meta data with ruamel.. I still haven't found out why this happens but I am happy they have pyaml.

@astafan8
Copy link
Contributor

astafan8 commented May 8, 2019

@QCoDeS/core I've added some minimal documentation about Station configuration and Station itself. Please feel free to review that as well.

Dominik-Vogel and others added 19 commits May 9, 2019 10:50
Mikhail Astafev.

When building docs locally, the “dataset context manager”
example notebook takes too much time to execute to_xarray
in the scatter plot example.

is it because xarray is trying to make a grid out of 5000 ungridded points?

It's weird because the conversion is executed on a 10-rows
dataframe - a very small one. But the resulting xarray
has 5000 in its dimensions, as if it was made out of the
original huge dataframe.

I tried with "copy" - still the same problem. to_dict, to_json,
etc - work on a copy, no problem, but to_xarray goes nuts and
processes all the 5000 rows from the parent dataframe which it
should not know about since I made a “copy”.
of Station example notebook
not the old 'station_configurator'
... in Dataset context manager example notebook.

Based on this pandas-dev/pandas#3686.
@Dominik-Vogel
Copy link
Contributor Author

Moving this to a new clean PR before final merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants