Skip to content

Attach the 'use it?' field to Text output#1203

Merged
MBartkowiakSTFC merged 3 commits intoprotosfrom
plotter-text-selection
Mar 25, 2026
Merged

Attach the 'use it?' field to Text output#1203
MBartkowiakSTFC merged 3 commits intoprotosfrom
plotter-text-selection

Conversation

@MBartkowiakSTFC
Copy link
Copy Markdown
Collaborator

Description of work
In the MDANSE plotter, we are able to select specific rows or columns in a 2D array. However, the same input field is ignored in the Text "plotter". This PR makes it possible to pick a subset of data in the Text viewer and save it to a CSV file instead of saving all the rows and columns.

Fixes

  1. Modify Text plotter to use the curves_vs_axis method.
  2. Minor type hint corrections.

To test
Load a 2D dataset and plot it. Select two specific rows or columns using the Use it? field.
Send the same dataset to the Text plotter. Try to show the same rows/columns in the text. (Disable/enable preview to check if that still works correctly.)

Copy link
Copy Markdown
Collaborator

@oerc0122 oerc0122 left a comment

Choose a reason for hiding this comment

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

Looks good if it works. Do we have any tests for the text dumpers?

Copy link
Copy Markdown
Collaborator

@ChiCheng45 ChiCheng45 left a comment

Choose a reason for hiding this comment

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

Works well. Just one thing. Can we change the first value in the table to be empty instead of zero? Just slightly confusing on first reading.

Image

@MBartkowiakSTFC
Copy link
Copy Markdown
Collaborator Author

Works well. Just one thing. Can we change the first value in the table to be empty instead of zero? Just slightly confusing on first reading.

What would be a good placeholder to put there instead of a zero? The main reason for it being there is not to end up with the top axis misaligned with the array elements below. This only happens when you import the data into some other software like Origin.

@ChiCheng45
Copy link
Copy Markdown
Collaborator

ChiCheng45 commented Mar 25, 2026

Works well. Just one thing. Can we change the first value in the table to be empty instead of zero? Just slightly confusing on first reading.

What would be a good placeholder to put there instead of a zero? The main reason for it being there is not to end up with the top axis misaligned with the array elements below. This only happens when you import the data into some other software like Origin.

can it be some non-numeric character like '_'?

MBartkowiakSTFC and others added 2 commits March 25, 2026 10:57
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
Signed-off-by: Maciej Bartkowiak <108934199+MBartkowiakSTFC@users.noreply.github.com>
@MBartkowiakSTFC
Copy link
Copy Markdown
Collaborator Author

can it be some non-numeric character like '_'?

I think this is done now.

Copy link
Copy Markdown
Collaborator

@ChiCheng45 ChiCheng45 left a comment

Choose a reason for hiding this comment

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

Thanks for that. Looks good.

@MBartkowiakSTFC MBartkowiakSTFC merged commit 2950f56 into protos Mar 25, 2026
36 checks passed
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.

3 participants