Skip to content
Snippets Groups Projects
Commit 50e2ca0a authored by Peter Lünenschloß's avatar Peter Lünenschloß
Browse files

some comments

parent c78dc048
No related branches found
No related tags found
No related merge requests found
!coverage.py: This is a private format, don't read it directly!{"lines":{"/home/luenensc/PyPojects/saqc/saqc/__init__.py":[4,5],"/home/luenensc/PyPojects/saqc/saqc/core/__init__.py":[4],"/home/luenensc/PyPojects/saqc/saqc/core/core.py":[3,5,6,8,9,10,11,12,15,31,62,66,147,67,63,68,32,35,38,41,47,50,53,56,69,72,73,80,20,21,22,23,24,26,27,28,81,82,83,86,91,94,97,100,101,102,104,105,108,112,113,115,117,119,120,121,122,123,124,131,133,134,135,136,137,138,139,142,144,48,126,127,148,149,150,151,152,129,153,154,155,25],"/home/luenensc/PyPojects/saqc/saqc/core/reader.py":[4,5,7,8,11,20,53,92,55,58,59,60,63,65,69,70,71,74,76,77,78,79,80,84,86,87,89,93,21,22,28,29,36,37,40,41,42,50,38,12,13,14,16,17,43,44,45,46,47,48,15,30,31,32,33,24,25],"/home/luenensc/PyPojects/saqc/saqc/core/config.py":[5,6,7,8,9,10,11,12,15,16,17],"/home/luenensc/PyPojects/saqc/saqc/core/evaluator.py":[4,5,6,8,9,11,12,15,16,17,20,24,28,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,65,70,71,90,106,109,115,118,119,120,121,125,126,129,134,154,170,176,183,187,201,209,202,203,177,180,204,30,31,32,33,34,35,36,37,38,66,67,205,130,131,132,171,173,135,136,138,140,143,144,145,148,149,152,206,184,211,212,188,190,191,192,193,194,195,198,155,156,160,163,164,165,161,139,168,137,157,110,112,107,72,73,76,78,80,83,84,85,86,88,91,92,95,96,98,99,81,100,102,104,158,21,93,77,74,25],"/home/luenensc/PyPojects/saqc/saqc/funcs/__init__.py":[5,6,7,8,9,10,11,12],"/home/luenensc/PyPojects/saqc/saqc/funcs/register.py":[3,4,7,8,11,21,24,25,34,26,9,27,29,32,30,13,14,15,16,17],"/home/luenensc/PyPojects/saqc/saqc/funcs/functions.py":[4,5,7,9,12,33,42,51,59,60,71,81,101,107,113,121,53,54,55,56,35,36,37,39,44,45,46,48,84,86,87,90,91,94,97,98,103,104,109,110,125,127,129,130,135,136,138,139,141,145,146,181,183,151,154,155,157,158,161,162,164,165,172,173,174,175,176,177,178,179,23,24,25,27,29,30,61,62,63,67,68],"/home/luenensc/PyPojects/saqc/saqc/lib/__init__.py":[1],"/home/luenensc/PyPojects/saqc/saqc/lib/tools.py":[4,5,7,8,9,11,14,22,23,31,42,54,89,93,120,151,160,172,173,203,268,277,282,291,300,15,17,24,26,28,27,25,16,18,131,132,133,135,138,139,144,103,105,106,107,108,109,110,111,115,116,148,168,157,175,178,179,180,182,186,194,197,199,200,187,188,189,190,221,225,226,227,228,233,249,251,254,255,258,262,265,240,241,242,244,246,247,256,257,259,260,263,90,57,59,61,64,65,66,68,69,70,71,73,74,75,78,79,81,82,86,76],"/home/luenensc/PyPojects/saqc/saqc/lib/types.py":[4,6,7,9,10,11],"/home/luenensc/PyPojects/saqc/saqc/funcs/break_detection.py":[4,5,7,9,10,13,26,84,86,87,92,93,94,96,99,100,103,106,109,111,114,115,116,117,118,119,120,122,124,128,129,130,131,134,136,180,138,139,140,143,144,145,146,147,148,149,151,153,158,159,161,162,169,170,171,173,176,177,165,182,184,186],"/home/luenensc/PyPojects/saqc/saqc/funcs/constants_detection.py":[4,5,7,8,9,17,18,48,53,54,55,56,82,84,86,87,89,92,90,91,96,99,102,104,105],"/home/luenensc/PyPojects/saqc/saqc/lib/statistic_functions.py":[4,5,8,25,39,53,48,9,10,49],"/home/luenensc/PyPojects/saqc/saqc/funcs/soil_moisture_tests.py":[4,6,7,8,10,11,12,13,14,21,31,56,69,97,104,152,164,260,265,266,267,268,269,270,271,272,273,274,133,134,135,136,138,140,142,145,146,148,149,220,223,225,227,230,232,234,235,240,243,244,248,249,251,252,253,256,257,292,293,294,296,298,300,303,304,305,307,309,310,311,312,314,315,317,321,323,327,328,331,332,333,334,335,336,337,338,340,342,343,344,345,346,347,348,350,352],"/home/luenensc/PyPojects/saqc/saqc/funcs/spike_detection.py":[4,6,7,8,9,10,11,13,21,23,146,147,180,181,266,277,348,351,352,353,356,357,361,362,363,365,373,374,375,376,378,381,382,383,385,386,387,388,389,392,393,394,397,399,400,401,402,404,409,411,413,414,164,165,166,170,171,172,173,174,176,177,52,53,54,56,67,69,71,74,76,80,87,89,102,105,106,107,108,109,111,115,119,116,117,121,122,123,124,126,130,131,132,134,90,91,92,137,138,140,141,142,143,57,58,59,60,112,94,96,97,98,212,214,215,217,218,222,239,240,241,242,243,247,248,223,224,227,228,229,230,231,232,249,252,253,254,255,257,258,259,261,262,263],"/home/luenensc/PyPojects/saqc/saqc/funcs/harm_functions.py":[4,5,6,8,9,10,17,18,19,20,21,22,23,27,28,29,30,31,32,36,194,47,48,49,50,51,52,53,54,124,191,195,196,201,236,249,267,268,269,270,416,492,493,494,495,630,711,718,60,61,64,69,713,714,73,74,75,76,77,81,82,85,86,222,224,225,226,227,230,231,233,90,91,92,93,94,95,96,97,326,327,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,345,346,244,245,246,347,348,351,374,390,392,258,259,393,394,395,396,397,398,437,438,440,442,443,452,454,456,485,400,410,411,413,101,102,103,104,105,106,107,108,109,538,539,540,542,544,546,550,555,556,558,559,563,565,566,569,626,114,115,116,117,118,119,721,722,723,725,728,729,732,733,122,127,135,136,139,142,143,144,145,146,147,232,152,153,154,155,156,157,634,635,636,638,639,663,664,666,669,674,675,677,678,679,680,682,683,684,685,688,689,692,695,698,699,700,701,705,706,708,159,162,164,165,166,169,170,171,173,174,176,177,178,179,180,181,182,736,738,740,742,745,757,758,759,760,185,186,189,547,548,667,668,551,552,670,671,641,644,650,651,653,654,656,658,659,660,642,643,645,646,375,376,377,387,128,129,130,132,379,380,381,384,385,352,355,356,358,359,360,370,362,364,747,748,750,751,753,763,764,765,766,767,769,770,772,776,777,570,571,368,371,401,460,461,463,483,464,465,466,475,476,478,479,446,447,448,449],"/home/luenensc/PyPojects/saqc/saqc/funcs/machine_learning.py":[1,2,3,6,7,10,30,36,37,38],"/home/luenensc/PyPojects/saqc/saqc/lib/plotting.py":[5,6,7,8,11,13,16,21,38,94,153,158,23,17,43,45,49,52,55,56,58,59,60,63,64,65,68,69,70],"/home/luenensc/PyPojects/saqc/saqc/flagger/__init__.py":[4,5,6,7,8],"/home/luenensc/PyPojects/saqc/saqc/flagger/baseflagger.py":[4,5,6,7,8,10,11,13,17,18,19,20,21,22,26,27,29,30,31,34,35,45,46,61,84,85,97,98,114,116,133,134,146,148,157,164,165,173,182,187,197,198,201,202,203,207,208,209,213,214,215,219,220,38,41,42,53,55,56,57,59,190,192,193,194,195,158,159,160,161,66,69,70,72,73,74,75,78,79,81,102,103,104,105,166,167,168,169,170,171,106,89,90,91,92,94,117,119,183,185,121,122,175,177,178,180,124,125,126,128,129,130,149,150,151,152,153,154,155,191,135,136,137,184,93],"/home/luenensc/PyPojects/saqc/saqc/flagger/categoricalflagger.py":[4,6,8,9,12,13,23,24,28,38,42,46,50,25,19,20,26,40,48,32,36,44,34],"/home/luenensc/PyPojects/saqc/saqc/flagger/simpleflagger.py":[5,8,11,12,13],"/home/luenensc/PyPojects/saqc/saqc/flagger/dmpflagger.py":[3,4,5,6,7,9,11,12,15,16,19,20,21,22,25,26,27,30,33,34,47,70,78,93,119,120,127,35,36,37,38,39,40,41,43,44,45,54,55,56,57,121,122,123,124,58,68,130,131,132,133,134,137,136,138,60,61,79,80,81,82,83,72,73,74,75,76,96,98,100,102,103,104,108,109,110,111,112,114,115,116,62,63,64],"/home/luenensc/PyPojects/saqc/saqc/flagger/continuousflagger.py":[4,5,6,8,11,12,27,44,51,55,59,63,13,14,15,16,17,53,61,32,33,34,35,36,45,49,37,38,57,48]}}
\ No newline at end of file
......@@ -13,6 +13,8 @@ from saqc.lib.tools import (
offset2periods,
)
# todo: flagConstant does not flag the constant plateau data from test_constants properly
# todo: maybe generalize flag_constant to work on non harmonized data as well.
@register("constant")
def flagConstant(data, field, flagger, eps, length, thmin=None, **kwargs):
......
......@@ -4,7 +4,7 @@
import pytest
import numpy as np
from saqc.funcs.constants_detection import flagConstant_varianceBased
from saqc.funcs.constants_detection import flagConstant_varianceBased, flagConstant
from saqc.funcs.soil_moisture_tests import flagSoilMoistureByConstantsDetection
from test.common import TESTFLAGGER, initData
......@@ -25,11 +25,19 @@ def test_flagConstants_varianceBased(data, flagger):
expected = np.arange(5, 25)
field, *_ = data.columns
flagger = flagger.initFlags(data)
data, flagger_result = flagConstant_varianceBased(
data, flagger_result1 = flagConstant_varianceBased(
data, field, flagger, plateau_window_min="1h"
)
flag_result = flagger_result.getFlags(field)
test_sum = (flag_result[expected] == flagger.BAD).sum()
#data, flagger_result2 = flagConstant(
# data, field, flagger, eps=0.1, length='1h'
#)
flag_result1 = flagger_result1.getFlags(field)
test_sum = (flag_result1[expected] == flagger.BAD).sum()
assert test_sum == len(expected)
#flag_result2 = flagger_result2.getFlags(field)
#test_sum = (flag_result2[expected] == flagger.BAD).sum()
#assert test_sum == len(expected)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment