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

Add support for custom prefix to dataset variables #412

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

ivandi69
Copy link
Contributor

@ivandi69 ivandi69 commented Dec 27, 2023

The prefix is enclosed between # # in the output file name. If the file name contains a #custom_prefix# section it will be prepended to the dataset variables. Useful for custom simulations where one can set multiple simulations and multiple output files.

Example nutmeg script:

AC DEC 10 1MEG 1G
write custom#ac1#.txt v(out)
destroy all

AC LIN 100 90MEG 110MEG
write custom#ac2#.txt v(out)
destroy all

The dataset will contain:
ac1.ac.v(out) ac1.frequency
ac2.ac.v(out) ac2.frequency

Prevent duplications in simulations QStringList of Ngspice::createNetlist. With current code if one has two nutmeg scripts both scripts are placed twice in the control section of the netlist.

enclosed between # # in the output file name. If the file name contains
a #custom_prefix# section it will be prepended to the dataset variables.
Useful for custom simulations where one can set multiple simulations and
multiple output files.

Example nutmeg script:
============================
AC DEC 10 1MEG 1G
write custom#ac1#.txt v(out)
destroy all

AC LIN 100 90MEG 110MEG
write custom#ac2#.txt v(out)
destroy all
============================

The dataset will contain:
ac1.ac.v(out) ac1.frequency
ac2.ac.v(out) ac2.frequency

Prevent duplications in simulations QStringList of Ngspice::createNetlist.
With current code if one has two nutmeg scripts both scripts are placed
twice in the control section of the netlist.
@ra3xdh ra3xdh added this to the 24.1.0 milestone Jan 2, 2024
@ra3xdh ra3xdh merged commit fc49799 into ra3xdh:current Jan 8, 2024
2 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 8, 2024

Thanks for the contribution! Merged. In the long perspective this feature should be documented somewhere, otherwise it will be lost. Unfortunately I only started to write a new documentation for Qucs-S and there is no place where you can propose a PR with the documentation addition.

@ivandi69
Copy link
Contributor Author

ivandi69 commented Jan 8, 2024 via email

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.

2 participants