-
Notifications
You must be signed in to change notification settings - Fork 3
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
Majority of requested new outputs #85
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There appeared to be a stray comma, turning a return value into a 1-tuple, and then later we took element 0 from the tuple, so it was useless.
This is in preparation for outputting this to a file.
It can still be re-enabled by providing an alternative matplotlibrc file with the `--matplotlibrc FILE` flag.
Removed native LaTeX rendering option from default matplotlibrc
The columns for `Period`, `R^2`, and `MSE` in the output table were not being formatted by the CLI-provided format string. This has now been fixed.
Fixing inconsistent number formatting in output table
Nuff said
Renamed plotypus.py -> cli.py
According to PEP-8 Good: `def f(x): return 2*x` Bad: `f = lambda x: 2*x` We had a few instances of the latter, because I was unaware that nested `def`'s do not bleed into the outer scope, and thought the former was a bad practice.
Replaced named lambdas with nested def's
I have implemented the logic described in #76 for output filenames. I still need to add things like validating inputs, and documentation.
All of the machinery for the new output logic is in place and appears to handle all cases correctly. New output types still need to be added, but they will easily fit into this new architecture.
The help text for `--output-{table,plot}-*` has been updated to describe their overloaded usage (in conjunction with `--output-*-all` options)
Merging from branch nil, which shouldn't exist
Now the option `--output-table-periodogram` allows you to output the periodogram to a tabular file, in units of `--output-periodogram-form={period,frequency}`. The option to output a plot still needs to be added. This required a bit of modification to the periodogram functions, so that they now optionally return the entire periodogram, in addition to the optimal period. This is not the case by default, as it is extra computation, and it can be set with the `output_periodogram` keyword argument.
…into new-outputs
Fourier coefficients (e.g. A_0, A_1) and ratios (e.g. Phi_21) were previously all printed to stdout, creating a huge messy output table, which does not scale to multiple periods. I have now given them their own output table files, and only print A_0 and dA_0 to stdout. I have also included columns for errors, although we do not yet calculate them, except for dA_0 (which needs improvement anyway). To accomodate this new form of output, I have edited `get_lightcurve`, so that it returns the coefficients in an (n+1) by 2 array. I also added a similar output for the fourier ratios, as well as the errors on both of these outputs. I have also taken the liberty of adding headers to all of the output tables including existing ones.
These can still use a lot of touching up, but for now they get the job done.
dwysocki
added a commit
that referenced
this pull request
Nov 2, 2015
I think everything is in a good shape to merge with develop. Everything could probably use a little polish, but it's in a usable state.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily adds a number of additional output formats, and refactors the existing formats.
The formats are described in #75. The ones implemented are: