op3 / hdtv-unattached Goto Github PK
View Code? Open in Web Editor NEWNuclear Spectrum Analysis Tool
License: GNU General Public License v2.0
Nuclear Spectrum Analysis Tool
License: GNU General Public License v2.0
When trying to autocomple fit parameter status
on the hdtv prompt an exception is encountered.
Same for fit parameter reset
.
No problems for fit parameter status background
which likewise has no options.
My bash prompt acts strange after exiting hdtv by closing the spectra window (clicking the X button).
E.g. typed input on the bash does not appear in the terminal, although recognized by bash (can execute the invisible command), and entering an empty line (just return) does not create a new line, but shows a new prompt anyway:
jk@JK-PC:~$ jk@JK-PC:~$ I echoed this by echo
jk@JK-PC:~$ but the command did not show up when I typed it!
jk@JK-PC:~$ jk@JK-PC:~$
I have to execute reset
for it to work properly again.
The @
prefix to execute a HDTV command file can not be used as a non-first statement in a one-liner multicommand e.g. s g spectrum.tv ; @file
yields ERROR: Command not recognized
and s g spectrum.tv @file
yields WARNING: @file.hdtv: no such file
with the later example being bad syntax anyway.
This is unfortunate when using the -e
HDTV command line toggle to execute commands at startup when the @
command is used as a second instruction, e.g. hdtv -e "s g spectrum.tv ; @file"
again yields ERROR: Command not recognized
and also
hdtv -e "s g spectrum.tv
@file"
yields WARNING: @file.hdtv: no such file
as well.
As stated in issue #2 it might be nice to introduce a proper command in addition of @
(keeping it only for backwards-compatibility) to benefit from tab-completition on the HDTV prompt and allowing to introduce an help message (and possibly other command options later on).
HDTV allows to store a fit without any peaks, e.g. by setting region markers (and optionally background markers), executing "fit execute" (or "fit intergral execute") and then "fit store" (or using the -S flag in the previous step.
Altough at first a bit strange, I get that this behaviour is intended to be able to treat and store proper fits and integrals without any actual peaks fitted in the same manner.
A current drawback of this is, however, that stored fits without any peaks are not listed by fit list, while still being counted at its last line. This can be confusing.
Especially it's not straightfoward to find out which fit IDs are used and which are free.
It should be considered to let "fit list" list existing fits without peaks for example as a single line with the peak id being -
and all other properties being either --
or the respective integral values.
E.g. for fit ID 2 being non-existent (deleted) and ID 3 being an integral:
id stat chi channel pos vol width
1.0 V 19 3802.3(1.4) 2841.5(1.0) 1.4(8)e+02 3.6(1.3)
3.- I -- -- -- -- --
4.0 V 21 3.43(10)e+03 2.56(8)e+03 3(9)e+05 6(6)e+01
5.0 V 200 675.37(19) 510.99(15) 5.8(4)e+02 4.18(32)
5.1 V 200 806.5(4) 608.74(31) 170(28) 4.18(32)```
4 peaks in 4 fits.
Executing fit parameter status
yields ERROR: not enough arguments for format string
.
The problem does not appear when the background model is set to exponential
via fit function background activate exponential
, so maybe that is a hint?
The % prefix to execute a single shell command (also still found in the documentation) does not work anymore.
E.g. %sleep 4
should execute sleep 4
on the system shell waiting for the commands termination.
This prefix can be especially useful in HDTV batch files being executed using the @
prefix, but also in the interactive commandline itself (altough there one can use the currently undocumented Alt+!
keyboard shortcut for shell command execution).
In the meanwhile one can workaround the issue for batch files by using the :
prefix to execute a python command by
:hdtv>import subprocess
:hdtv>subprocess.run(["command","arg"])
When fixing the issue, one could think about improving the shell
command to take arguments like shell sleep 5
or shell bash
with just shell
defaulting to shell sh
for an interactive shell, kind of adding an alias to %
.
The shell
command should then also give a help message via shell -h
and later on could add even more options (e.g. an option to not wait for command termination or so).
The advantage would be a more consistent and readable interface superseding the cryptic %
command (which is also not included in tab-autocompletion).
The same naturally holds for the :
command to execute a python statement, altough this currently still works unlike the %
command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.