Skip to content

CLI for exporting waveforms#30

Closed
SBlokhuizen wants to merge 16 commits intodevelopfrom
feature/cli
Closed

CLI for exporting waveforms#30
SBlokhuizen wants to merge 16 commits intodevelopfrom
feature/cli

Conversation

@SBlokhuizen
Copy link
Copy Markdown
Collaborator

@SBlokhuizen SBlokhuizen commented Mar 7, 2025

Note: this PR is build on top of the implementation of the WaveformExporter (#29)
This PR introduces a first draft for the CLI to call the exporter methods described in the WaveformExporter. The user can choose between 3 methods of determining the time arrays:

  • If no time option is given, the time points of the minimal representation are used.
  • if --num_interp is given, the waveform will be linearly interpolated between its start and end time, using this many points. For example, to generate the waveform using 5 points:
    waveform-editor export-ids ./test_yaml.yaml "imas:hdf5?path=./test_equilibrium#equilibrium/time_slice()/boundary/elongation" --num_interp 5
  • If --times is provided, the user can point to a CSV file, containing the time steps, which are expected in a column-based format. For example, create a times.csv containing:
0
1
5
7
12
12.5
13
13.1
14

These can then be provided using:
waveform-editor export-ids ./test_yaml.yaml "imas:hdf5?path=./test_equilibrium#equilibrium/time_slice()/boundary/elongation" --times times.csv
Note: there are no tests for the CLI yet, these can be made once we settle on a syntax for it.

Copy link
Copy Markdown
Collaborator

@maarten-ic maarten-ic left a comment

Choose a reason for hiding this comment

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

Let's first align how the export should work, see #29

@SBlokhuizen
Copy link
Copy Markdown
Collaborator Author

The functionality for exporting through a CLI is moved to #45

@SBlokhuizen SBlokhuizen deleted the feature/cli branch April 25, 2025 13:29
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.

2 participants