Skip to content

Improvement: added shapes to DatasetDefinition#7891

Open
esbenh4 wants to merge 4 commits intomicrosoft:mainfrom
esbenh4:esh/add_shapes_to_dataset_def
Open

Improvement: added shapes to DatasetDefinition#7891
esbenh4 wants to merge 4 commits intomicrosoft:mainfrom
esbenh4:esh/add_shapes_to_dataset_def

Conversation

@esbenh4
Copy link
Contributor

@esbenh4 esbenh4 commented Mar 2, 2026

Enabled use of shape in DatasetDefinition to set shape of measurement when using datasaver_builder to create measurements.

@esbenh4 esbenh4 requested a review from a team as a code owner March 2, 2026 11:38
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.94%. Comparing base (5d8e488) to head (e6f8ba6).

Files with missing lines Patch % Lines
src/qcodes/dataset/measurement_extensions.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7891      +/-   ##
==========================================
- Coverage   59.94%   59.94%   -0.01%     
==========================================
  Files         352      352              
  Lines       31933    31937       +4     
==========================================
+ Hits        19143    19145       +2     
- Misses      12790    12792       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@esbenh4
Copy link
Contributor Author

esbenh4 commented Mar 2, 2026

@microsoft-github-policy-service agree company="Microsoft"

esbenh4 and others added 2 commits March 2, 2026 15:49
Co-authored-by: Jens Hedegaard Nielsen <jenshnielsen@gmail.com>
Co-authored-by: Jens Hedegaard Nielsen <jenshnielsen@gmail.com>
@samantha-ho
Copy link
Contributor

This implementation looks sound to me, but I do have a question:

What happens if the shape specified here does not match what ends up being actually recorded? e.g. if I specify a DataSetDefinition that includes 11 B-Field points, but I actually take 13, when does the error occur?

@astafan8
Copy link
Contributor

astafan8 commented Mar 4, 2026

What happens if the shape specified here does not match what ends up being actually recorded? e.g. if I specify a DataSetDefinition that includes 11 B-Field points, but I actually take 13, when does the error occur?

At the moment, nothing. THis is also true for the set_shape method on the Measurement context manager itself. It is up to the users to not "lie" when they set the shape and do the measurement.

It is a very good question to raise, however adressing it is an endevour of its own, so let's skip it for this PR.

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.

4 participants