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 sensible default values to outfile #68

Merged
merged 15 commits into from
Jul 31, 2017
Merged

Conversation

mirca
Copy link
Member

@mirca mirca commented Jul 27, 2017

work in progress to address #64

@codecov
Copy link

codecov bot commented Jul 27, 2017

Codecov Report

Merging #68 into master will decrease coverage by 0.03%.
The diff coverage is 24.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   13.57%   13.53%   -0.04%     
==========================================
  Files          49       49              
  Lines        9322     9397      +75     
==========================================
+ Hits         1265     1272       +7     
- Misses       8057     8125      +68
Impacted Files Coverage Δ
pyke/kepio.py 25.27% <0%> (ø) ⬆️
pyke/kepdetrend.py 6.59% <10%> (+0.03%) ⬆️
pyke/kepprfphot.py 2.57% <10%> (-0.02%) ⬇️
pyke/tests/test_kepconvert.py 100% <100%> (ø) ⬆️
pyke/kepfilter.py 6.15% <12.5%> (-0.15%) ⬇️
pyke/keprange.py 7.81% <12.5%> (-0.07%) ⬇️
pyke/keptrim.py 6.87% <14.28%> (-0.12%) ⬇️
pyke/kepprf.py 5.39% <14.28%> (-0.04%) ⬇️
pyke/kepsff.py 2.59% <14.28%> (-0.03%) ⬇️
pyke/kephead.py 14.54% <14.28%> (-0.84%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8be1d2...2cad12b. Read the comment docs.

@barentsen
Copy link
Member

We are going to have to update the quickstart and the three tutorials as well.

@mirca mirca changed the title [WIP]: add sensible default values to outfile Add sensible default values to outfile Jul 27, 2017
@mirca
Copy link
Member Author

mirca commented Jul 27, 2017

@barentsen @gully I appreciate any input here. Updating quickstart and tutorials now...

@barentsen
Copy link
Member

Looks good! My only (very minor) comment right now is that it would be nice to mention the default output name or suffix in the --help docstring.

@mirca
Copy link
Member Author

mirca commented Jul 28, 2017

@barentsen regarding the default output file name; how about this:

➜ kepbls --help
usage: kepbls [-h] [--outfile OUTFILE] [--datacol DATACOL] [--errcol ERRCOL]
              [--minper MINPER] [--maxper MAXPER] [--mindur MINDUR]
              [--maxdur MAXDUR] [--nsearch NSEARCH] [--nbins NBINS] [--plot]
              [--overwrite] [--verbose] [--logfile LOGFILE]
              infile

Perform Box-Least Square searches for periodic exoplanet transits

positional arguments:
  infile                Name of input file

optional arguments:
  -h, --help            show this help message and exit
  --outfile OUTFILE     Name of FITS file to output.If None, outfile is a
                        combination of infile andthe name of the pyke task.
                        (default: None)
  --datacol DATACOL     Name of data column to plot (default: DETSAP_FLUX)
  --errcol ERRCOL       Name of data error column to plot (default:
                        DETSAP_FLUX_ERR)
  --minper MINPER       Minimum search period [days] (default: 1.0)
  --maxper MAXPER       Maximum search period [days] (default: 30.0)
  --mindur MINDUR       Minimum transit duration [hours] (default: 0.5)
  --maxdur MAXDUR       Maximum transit duration [hours] (default: 12.0)
  --nsearch NSEARCH     Number of test periods between minper and maxper
                        (default: 1000)
  --nbins NBINS         Number of bins in the folded time series at any test
                        period (default: 1000)
  --plot                Plot result?
  --overwrite           Overwrite output file?
  --verbose             Write to a log file?
  --logfile LOGFILE, -l LOGFILE
                        Name of ascii log file (default: kepbls.log)

@barentsen
Copy link
Member

I would perhaps change
If None, outfile is a combination of infile and the name of the pyke task.
into
By default, the output filename will be the same as the input filename with suffix "-kepbls.fits" added.

@mirca mirca requested review from barentsen and gully July 28, 2017 23:05
Copy link
Member

@barentsen barentsen left a comment

Choose a reason for hiding this comment

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

I think this looks good. In the quickstart/tutorials we may want to use --outfile so that the tutorial can use simple descriptive filenames, but we can merge this now and review the clarity of the tutorials separately.

@mirca mirca merged commit 0922093 into KeplerGO:master Jul 31, 2017
@mirca mirca deleted the default-outfile branch August 24, 2017 19:00
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