s-goldman / Dusty-Evolved-Star-Kit

SED-fitting python package for fitting evolved stars
https://dusty-evolved-star-kit.readthedocs.io
Other
15 stars 2 forks source link

Improved help for subcommands #166

Closed TomGoffrey closed 3 years ago

TomGoffrey commented 3 years ago

Is your feature request related to a problem? Please describe.

The current result of running commands such as desk subcommand --help are not informative:

$ desk fit --help
usage: desk fit [-h] [--source SOURCE] [--distance DISTANCE] [--grid GRID]
                [--n N] [--min_wavelength MIN_WAVELENGTH]
                [--max_wavelength MAX_WAVELENGTH]
                [--multiprocessing MULTIPROCESSING] [--testing TESTING]

optional arguments:
  -h, --help            show this help message and exit
  --source SOURCE
  --distance DISTANCE
  --grid GRID
  --n N
  --min_wavelength MIN_WAVELENGTH
  --max_wavelength MAX_WAVELENGTH
  --multiprocessing MULTIPROCESSING
  --testing TESTING

I think the requisite information is produced when running desk --help but it's quite hard to read, e.g:

                        sub-command help
    fit                 Fits the seds of sources with specified grid.
                        Parameters ---------- source : str Name of target in
                        array of strings (or one string). distance : str,
                        float Distance to source(s) in kiloparsecs. grid : str
                        Name of model grid. n : str or int Number of times to
                        scale the grid between the lum_min and lum_max
                        specified in the config.py script (essentially grid
                        density). min_wavelength : float Minimum wavelength to
                        fit, the other data will still be shown in the output
                        SED. max_wavelength : float Maximum wavelength to be
                        fit. multiprocessing : bool Flag that, if true, uses
                        all but one of the user's available cores for the
                        fitting. testing : bool Flag for testing that uses
                        only the first 3 rows of the mode grids.

Describe the solution you'd like

Ideally desk subcommand help would return descriptions of the optional arguments. If that's not possible then better formatting of the desk --help output would help.

Additionally the information for multiprocessing should be updated as a result of #163. Currently there's no mention of the new control:

multiprocessing : bool Flag that, if true, uses
                        all but one of the user's available cores for the
                        fitting.

The option of passing an integer should also be mentioned.

Describe alternatives you've considered n/a

Additional context