Skip to content

Commit

Permalink
Merge pull request #123 from bnaul/bnaul-docs
Browse files Browse the repository at this point in the history
Mock out additional readthedocs libraries
  • Loading branch information
acrellin committed Dec 17, 2015
2 parents 5d9de8f + 35f2e13 commit 0f7d506
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ class Mock(MagicMock):
__version__ = MagicMock()
random = MagicMock()
stats = MagicMock()
MOCK_MODULES = ['numpy', 'xray', 'sklearn', 'pandas', 'scipy', 'scipy.stats',
'scipy.linalg', 'scipy.special', 'sklearn.externals',
'sklearn.base', 'sklearn.ensemble', 'sklearn.linear_model',
'celery', 'dask', 'dask.async',
'mltsp.science_features._lomb_scargle']
MOCK_MODULES = ['requests', 'parse', 'yaml', 'numpy', 'xray', 'sklearn',
'pandas', 'scipy', 'scipy.stats', 'scipy.linalg',
'scipy.special', 'sklearn.externals', 'sklearn.base',
'sklearn.ensemble', 'sklearn.linear_model', 'celery', 'dask',
'dask.async', 'mltsp.science_features._lomb_scargle']
for m in MOCK_MODULES:
sys.modules[m] = Mock()
sys.path.append(os.path.join(os.path.dirname(__name__), '..'))
6 changes: 2 additions & 4 deletions mltsp/science_features/amplitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ def percent_difference_flux_percentile(x, base=10., exponent=-0.4):


def flux_percentile_ratio(x, percentile_range, base=10., exponent=-0.4):
"""
A ratio of ((50+x) flux percentile - (50-x) flux percentile) /
(95 flux percentile - 5 flux percentile),
where x = percentile_range/2.
"""A ratio of ((50+x) flux percentile - (50-x) flux percentile) /
(95 flux percentile - 5 flux percentile), where x = percentile_range/2.
Assumes data is log-scaled; by default we assume inputs are scaled as
x=10^(-0.4*y), corresponding to units of magnitudes. Computations are
Expand Down

0 comments on commit 0f7d506

Please sign in to comment.