Commit 48e2ef2e authored by Niklas Selke's avatar Niklas Selke
Browse files

Merge branch 'niklas_issue008_refac_restructure-the-package-layout' into 'develop'

Niklas issue008 refac restructure the package layout

See merge request !2
parents 37997e86 6f6d0851
Welcome to toarstats's documentation!
=====================================
.. autofunction:: toarstats.interface.calculate_statistics
.. autofunction:: toarstats.metrics.interface.calculate_statistics
.. toctree::
:maxdepth: 2
......
......@@ -10,8 +10,6 @@ if "%SPHINXBUILD%" == "" (
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
......@@ -25,6 +23,8 @@ if errorlevel 9009 (
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
......
"""The toarstats package.
This package contains many different statistics and metrics that can be
calculated over different time series.
This package exports the following function:
calculate_statistics - public interface for the toarstats package
"""
from toarstats.interface import calculate_statistics
__all__ = ["calculate_statistics"]
"""The metrics subpackage.
This subpackage contains many different statistics and metrics that can
be calculated over different time series.
This subpackage exports the following function:
calculate_statistics - public interface for the metrics subpackage
"""
from toarstats.metrics.interface import calculate_statistics
__all__ = ["calculate_statistics"]
......@@ -27,8 +27,10 @@ from collections import namedtuple
import numpy as np
import pandas as pd
from toarstats.constants import (ALLOWED_CROPS_VALUES, ALLOWED_SAMPLING_VALUES,
CLIMATIC_ZONE, SEASON_DICT, STATISTICS_LIST)
from toarstats.metrics.constants import (
ALLOWED_CROPS_VALUES, ALLOWED_SAMPLING_VALUES, CLIMATIC_ZONE, SEASON_DICT,
STATISTICS_LIST
)
def is_correct_type(parameter, allowed_types, allowed_collection_types=None):
......
......@@ -6,11 +6,12 @@ calculate_statistics - calculate the requested statistics
import pandas as pd
from toarstats import stats, ozone_metrics
from toarstats.defaults import DEFAULT_CROPS, DEFAULT_DATA_CAPTURE
from toarstats.input_checks import check_input_parameters
from toarstats.stats_utils import (create_reference_series, get_seasons,
harmonize_time)
from toarstats.metrics import stats, ozone_metrics
from toarstats.metrics.defaults import DEFAULT_CROPS, DEFAULT_DATA_CAPTURE
from toarstats.metrics.input_checks import check_input_parameters
from toarstats.metrics.stats_utils import (
create_reference_series, get_seasons, harmonize_time
)
def calculate_statistics(
......
......@@ -39,11 +39,11 @@ nvgtall - calculate all nvgt metrics together
import numpy as np
import pandas as pd
from toarstats.stats_utils import (aot40stat, dma8_processor,
get_elevation_angle, kth_highest,
prepare_data, resample_with_date,
somo_processor, stat_processor_1,
threshold_processor, w126stat)
from toarstats.metrics.stats_utils import (
aot40stat, dma8_processor, get_elevation_angle, kth_highest, prepare_data,
resample_with_date, somo_processor, stat_processor_1, threshold_processor,
w126stat
)
def max1h_values(ser, ref, mtype, metadata, seasons, data_capture):
......
......@@ -34,9 +34,10 @@ diurnal_cycle - calculate the diurnal cycle
import pandas as pd
from toarstats.stats_utils import (calc_data_capture, get_elevation_angle,
perc, prepare_data, stat_processor_1,
stat_processor_2)
from toarstats.metrics.stats_utils import (
calc_data_capture, get_elevation_angle, perc, prepare_data,
stat_processor_1, stat_processor_2
)
def value_count(ser, ref, mtype, metadata, seasons, data_capture):
......
......@@ -24,9 +24,9 @@ w126stat - evaluate the sum of values
import numpy as np
import pandas as pd
from toarstats.constants import RSTAGS, SEASON_DICT
from toarstats.defaults import DEFAULT_SEASONS
from toarstats.solar_position import calc_zenith
from toarstats.metrics.constants import RSTAGS, SEASON_DICT
from toarstats.metrics.defaults import DEFAULT_SEASONS
from toarstats.metrics.solar_position import calc_zenith
def aot40stat(ser, ref, sampling, how, mincount=None, minfrac=0.75,
......
"""The trends subpackage.
This subpackage contains trend analysis tools for time series.
"""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment