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

Plotting / support complex numbers in plot_by_id #1592

Merged
merged 17 commits into from
Jul 2, 2019

Conversation

WilliamHPNielsen
Copy link
Contributor

@WilliamHPNielsen WilliamHPNielsen commented Jun 7, 2019

Support the plotting of complex numbers in plot_by_id. Still WIP.

Changes proposed in this pull request:

  • Add a preparser that splits complex-valued parameters into two real-valued ones

Still pending:

  • Actually use the preparser in plot_by_id
  • Update the documentation to show how to plot complex numbers
  • Change phase_and_mag into mag_and_phase

@QCoDeS/core

qcodes/dataset/plotting.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a4697d4). Click here to learn what that means.
The diff coverage is 93.47%.

@@            Coverage Diff            @@
##             master    #1592   +/-   ##
=========================================
  Coverage          ?   72.22%           
=========================================
  Files             ?      116           
  Lines             ?    12459           
  Branches          ?        0           
=========================================
  Hits              ?     8999           
  Misses            ?     3460           
  Partials          ?        0

@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #1592 into master will increase coverage by 0.05%.
The diff coverage is 93.02%.

@@            Coverage Diff             @@
##           master    #1592      +/-   ##
==========================================
+ Coverage   70.49%   70.55%   +0.05%     
==========================================
  Files         123      123              
  Lines       14881    14921      +40     
==========================================
+ Hits        10491    10528      +37     
- Misses       4390     4393       +3

@WilliamHPNielsen WilliamHPNielsen marked this pull request as ready for review June 17, 2019 10:58
@WilliamHPNielsen
Copy link
Contributor Author

@ThorvaldLarsen, you were one of the first people to request this feature. I'd be good to know if you think that this PR does the job, or whether we overlooked something.

Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

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

Apart from minor comments, i think this is ready. Thanks for the example notebook!

qcodes/dataset/plotting.py Show resolved Hide resolved
qcodes/dataset/plotting.py Show resolved Hide resolved
qcodes/dataset/plotting.py Outdated Show resolved Hide resolved
qcodes/tests/dataset/test_plotting.py Outdated Show resolved Hide resolved
@ThorvaldLarsen
Copy link
Contributor

@WilliamHPNielsen this looks great to me! Thanks for getting it done.

@jenshnielsen
Copy link
Collaborator

The notebook should use

load_or_create_experiment and explicitly pass the experiment to the measurement
plot_dataset()

... and pass Experiment object explicitly to Measurement object.
- improve description of plot_by_id behavior
- get rid of divide-by-zero warning from the last plot
- rerun notebook to ensure everything plots correctly
@astafan8
Copy link
Contributor

astafan8 commented Jul 2, 2019

The notebook should use load_or_create_experiment and explicitly pass the experiment to the measurement

Done. plot_dataset() change I would defer to another PR. so that we change plot_by_id for plot_dataset in the whole qcodes at once.

@astafan8 astafan8 merged commit 49b7d58 into microsoft:master Jul 2, 2019
@astafan8 astafan8 deleted the plotting/complex_numbers branch July 2, 2019 10:22
giulioungaretti pushed a commit that referenced this pull request Jul 2, 2019
Merge: aa51d86 ebebdbb
Author: Mikhail Astafev <astafan8@gmail.com>

    Merge pull request #1592 from WilliamHPNielsen/plotting/complex_numbers
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

Successfully merging this pull request may close these issues.

None yet

4 participants