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

tabplot/tabhist in native python #87

Open
teuben opened this issue Oct 29, 2021 · 2 comments
Open

tabplot/tabhist in native python #87

teuben opened this issue Oct 29, 2021 · 2 comments

Comments

@teuben
Copy link
Owner

teuben commented Oct 29, 2021

NEMO's tabplot (and also tabhist) are very useful for quick analysis of tabular
data without having to open complex programs and a complex user interface.
For a given table (or CSV file) it's usually as simple as

   tabplot file.tab

which would plot columns 1 and 2. However, in NEMO's C program there is no further
interaction possible. In python's matplotlib there is an additional pan and zoom
option. We would like to make a simple version of tabplot and tabhist that will use
python. There are the following design issues:

  1. The command line user interface?

    1. Clone NEMO's key=value
    2. Use the unix style --key value, e.g. using parseargs
    3. Use docopt's self-describing, it also allows -key=val
    4. something else
  2. How to read the table. We have simple SSV (space separated values), the TSV, CSV
    and perhaps a few others.

    1. astropy tables https://docs.astropy.org/en/stable/table/index.html
      This sometimes also gives columns a name, so instead of column 1 vs. column 2,
      this could allow names, not 1-based integers.
    2. build something from scratch
  3. In matplotlib it's a bit tricky to run interactive (this should be the default) and
    in a pipeline. In NEMO this is usually done via the yapp_pgplot style, e.g.
    yapp=2/xs would open XS window 2, but yapp=plot2.png/png would write it to a PNG file.

  4. Only a few basic options should be implemented (at first). The current programs have a rather large set of options that we probably don't need. However, the layout= keyword could be an interesting one that needs some thought.

@teuben
Copy link
Owner Author

teuben commented Oct 29, 2021

Reminder: there is a very simple tabplot.py in $NEMO/src/scripts/python

@teuben
Copy link
Owner Author

teuben commented Nov 4, 2021

another example is a commandline wrapper around hyperfit.readthedocs.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant