diff --git a/wafo/sg_filter/__init__.py b/wafo/sg_filter/__init__.py index 40c606d..eebc78c 100644 --- a/wafo/sg_filter/__init__.py +++ b/wafo/sg_filter/__init__.py @@ -1,2 +1,2 @@ -from wafo.sg_filter._core import * +from wafo.sg_filter._core import * # pylint: disable=wildcard-import from wafo.sg_filter import demos diff --git a/wafo/sg_filter/_core.py b/wafo/sg_filter/_core.py index b2278c1..f23dea4 100644 --- a/wafo/sg_filter/_core.py +++ b/wafo/sg_filter/_core.py @@ -12,10 +12,10 @@ from wafo.dctpack import dctn, idctn __all__ = ['SavitzkyGolay', 'Kalman', 'HodrickPrescott', 'smoothn', - 'HampelFilter', 'SmoothNd'] + 'HampelFilter', 'SmoothNd', 'noise'] # noise = np.random.randn(2**8)/10 -noise = [-0.0490483773397234, 0.07101522794824691, 0.043129450693516064, 0.07858516767729644, -0.04489848540755172, -0.012710090966021995, 0.022967442347004003, -0.1593564930543959, 0.14752458454255937, -0.1220055819473534, -0.030151822649201642, 0.009880871420067841, 0.0401050562035102, -0.10931262882008379, -0.14550620919429919, -0.06632845063372966, 0.07773893951749064, -0.009527784302072342, 0.06002486046176557, 0.11972670522904964, -0.14436696992162384, 0.06009486605688445, -0.05802790838575894, 0.16964239368289297, 0.09088881573238144, -0.003398259264109856, 0.059830811447018004, -0.08189024981767952, -0.05455483548325317, 0.056651518536760745, -0.05211609539593189, -0.07848323826083178, -0.03921692262168154, -0.04755275276447492, -0.05855172473750038, 0.06480280696345982, -0.05237889271019207, -0.05891912551792037, -0.04045907452295067, -0.09058522124919187, 0.1406515441218336, 0.15557979603588584, -0.09096515320242772, 0.1724190189462715, -0.04978942687488187, -0.0855435866249914, 0.09439718859306868, -0.14758639479507882, -0.07225230856508442, 0.008364508824556314, 0.06704423745152435, -0.01718113731784587, 0.07473943576290255, 0.028133087670974395, 0.026270590730899095, 0.13175770484080895, -0.01821821552644416, 0.11325945472394446, 0.04694754851273185, -0.23899404962137366, -0.1528175431702195, 0.151870532421663, -0.07353204927616248, 0.11604199430172217, -0.09111623325687843, -0.11887366073405607, -0.029872397510562025, 0.047672685028458936, -0.18340065977268627, 0.06896217941210328, 0.042997912112300564, 0.15416998299846174, -0.0386283794526545, 0.14070600624229804, 0.020984623041646142, -0.1892741373898864, 0.03253519397457513, -0.06182705494266229, -0.1326495728975159, 0.026234150321195537, 0.0550541170409239, 0.029275813927566702, 0.042742104678489906, -0.2170004668366198, -0.00035991761313413197, -0.0638872684868346, -0.11769436550364845, -0.017792813824766808, -0.022786402363044914, -0.10668279890162544, 0.05979507681729831, -0.1008100479486818, 0.0703474638610785, 0.1630534776572414, 0.06682406484481357, -0.0527228810042394, -0.046515310355062636, 0.04609515154732255, 0.11503753838360875, 0.11517599661346192, -0.05596425736274815, -0.06149119758833357, 0.10599964719188917, -0.012076380140185552, 0.0436828262270732, -0.03910174791470852, -0.03263251315745414, -0.012513843545007558, 0.004590611827089213, 0.0762719171282112, 0.06497715695411535, -0.003280826953794463, 0.13524154885565484, -0.020441364843140027, -0.09488214173137496, 0.1385755359902911, -0.23883052310744746, -0.10110537386421652, -0.1588981058869149, 0.06645444828058467, -0.2103306051703948, 0.15215327561190056, -0.03582175680076989, 0.013593833383013293, -0.11542058494732854, -0.05613268116816099, 0.012711037661355899, 0.04242805633100794, -0.011799315325220794, 0.12141794601099387, 0.054285270560662645, 0.07549385527022169, -0.04549437694653443, 0.11009856942530691, 0.05233482224379645, -0.042246830306136955, -0.1737197924666796, -0.10589427330127077, 0.04895472597843757, 0.06756519832636187, 0.083376600742245, -0.07502859751328732, -0.09493802498812245, -0.01058967186080922, -0.23759763247649018, 0.08439637862616411, -0.2021754550870607, 0.07365816800912013, 0.07435401663661081, 0.047992791325423556, -0.005250092450514997, 0.1693610927865244, 0.030338113772413154, -0.18010537945928004, 0.01744129379023785, 0.1902505975745975, -0.004598733688659104, 0.13663542585715657, -0.04100719174496187, -0.15406303185009937, -0.05297118247908407, 0.04435144348234146, 0.022377061632995063, 0.05491057192661079, -0.08473062163887303, -0.03907641665824873, 0.008686833182075315, -0.06053451866471732, -0.051735892949367854, -0.1902071038920444, 0.11508817132666356, 0.08903045262390544, -0.028537865059606825, -0.07160660523436188, 0.05994760363400714, 0.03637820115278829, 0.027604828657436364, 0.04168122074675033, -0.021707671111253164, 0.06770739385070886, -0.04848505599153394, -0.14377853380839264, 0.17448368721141166, -0.05972663746675887, -0.1615729579782888, -0.09508063624538736, -0.05501964872264433, -0.14370852991216054, -0.1025241548369181, -0.14751000180775747, -0.05402976681470177, -0.05847606145915367, 0.015603559358987138, 0.040327317968149784, 0.015596571983936361, 0.08721780106901023, 0.13669912032986667, -0.07070030973798198, 0.04821782065785363, 0.05266507025196321, -0.013775127999269254, 0.07032239356769251, 0.04685048562398681, 0.004648720572365418, -0.19364418622487742, 0.013662994215276983, 0.04703494294810789, 0.04863794676207257, -0.09883919097676001, -0.004798538894290822, -0.22183503742087135, 0.062096556899520906, 0.07098373434409047, -0.05335639719762188, -0.09150459514627822, -0.1329311651202703, -0.037376442133682145, 0.1238732233009325, -0.01232052797514208, 0.007151238520555889, -0.04772828461473576, -0.029830395387364726, -0.03277336781995001, 0.09964048194066656, 0.09306408040020697, -0.03761782769337173, 0.07059549032551317, -0.15490333414875848, 0.12599077783991805, 0.23520519946427365, 0.021640305946603107, 0.014851729969403227, -0.039035437601777224, -0.12087588583684257, -0.07207855860199022, -0.002800081649022032, 0.2543907308881692, -0.07966223382328289, -0.1014419766425384, -0.11243061225437859, -0.08744845956375621, -0.05540140267769189, -0.04995531421885231, -0.13274847220288336, 0.06435474943034288, 0.015640361472736924, -0.11210644205346465, -0.04080648821849449, -0.011452694652695428, 0.22044736923317904, 0.024322228245949113, 0.09622705616884256, 0.05793212184654495, -0.10620553812614748, 0.06762504431789758, 0.19135075519983785] # nopep8 @IgnorePep8 +noise = [-0.0490483773397234, 0.07101522794824691, 0.043129450693516064, 0.07858516767729644, -0.04489848540755172, -0.012710090966021995, 0.022967442347004003, -0.1593564930543959, 0.14752458454255937, -0.1220055819473534, -0.030151822649201642, 0.009880871420067841, 0.0401050562035102, -0.10931262882008379, -0.14550620919429919, -0.06632845063372966, 0.07773893951749064, -0.009527784302072342, 0.06002486046176557, 0.11972670522904964, -0.14436696992162384, 0.06009486605688445, -0.05802790838575894, 0.16964239368289297, 0.09088881573238144, -0.003398259264109856, 0.059830811447018004, -0.08189024981767952, -0.05455483548325317, 0.056651518536760745, -0.05211609539593189, -0.07848323826083178, -0.03921692262168154, -0.04755275276447492, -0.05855172473750038, 0.06480280696345982, -0.05237889271019207, -0.05891912551792037, -0.04045907452295067, -0.09058522124919187, 0.1406515441218336, 0.15557979603588584, -0.09096515320242772, 0.1724190189462715, -0.04978942687488187, -0.0855435866249914, 0.09439718859306868, -0.14758639479507882, -0.07225230856508442, 0.008364508824556314, 0.06704423745152435, -0.01718113731784587, 0.07473943576290255, 0.028133087670974395, 0.026270590730899095, 0.13175770484080895, -0.01821821552644416, 0.11325945472394446, 0.04694754851273185, -0.23899404962137366, -0.1528175431702195, 0.151870532421663, -0.07353204927616248, 0.11604199430172217, -0.09111623325687843, -0.11887366073405607, -0.029872397510562025, 0.047672685028458936, -0.18340065977268627, 0.06896217941210328, 0.042997912112300564, 0.15416998299846174, -0.0386283794526545, 0.14070600624229804, 0.020984623041646142, -0.1892741373898864, 0.03253519397457513, -0.06182705494266229, -0.1326495728975159, 0.026234150321195537, 0.0550541170409239, 0.029275813927566702, 0.042742104678489906, -0.2170004668366198, -0.00035991761313413197, -0.0638872684868346, -0.11769436550364845, -0.017792813824766808, -0.022786402363044914, -0.10668279890162544, 0.05979507681729831, -0.1008100479486818, 0.0703474638610785, 0.1630534776572414, 0.06682406484481357, -0.0527228810042394, -0.046515310355062636, 0.04609515154732255, 0.11503753838360875, 0.11517599661346192, -0.05596425736274815, -0.06149119758833357, 0.10599964719188917, -0.012076380140185552, 0.0436828262270732, -0.03910174791470852, -0.03263251315745414, -0.012513843545007558, 0.004590611827089213, 0.0762719171282112, 0.06497715695411535, -0.003280826953794463, 0.13524154885565484, -0.020441364843140027, -0.09488214173137496, 0.1385755359902911, -0.23883052310744746, -0.10110537386421652, -0.1588981058869149, 0.06645444828058467, -0.2103306051703948, 0.15215327561190056, -0.03582175680076989, 0.013593833383013293, -0.11542058494732854, -0.05613268116816099, 0.012711037661355899, 0.04242805633100794, -0.011799315325220794, 0.12141794601099387, 0.054285270560662645, 0.07549385527022169, -0.04549437694653443, 0.11009856942530691, 0.05233482224379645, -0.042246830306136955, -0.1737197924666796, -0.10589427330127077, 0.04895472597843757, 0.06756519832636187, 0.083376600742245, -0.07502859751328732, -0.09493802498812245, -0.01058967186080922, -0.23759763247649018, 0.08439637862616411, -0.2021754550870607, 0.07365816800912013, 0.07435401663661081, 0.047992791325423556, -0.005250092450514997, 0.1693610927865244, 0.030338113772413154, -0.18010537945928004, 0.01744129379023785, 0.1902505975745975, -0.004598733688659104, 0.13663542585715657, -0.04100719174496187, -0.15406303185009937, -0.05297118247908407, 0.04435144348234146, 0.022377061632995063, 0.05491057192661079, -0.08473062163887303, -0.03907641665824873, 0.008686833182075315, -0.06053451866471732, -0.051735892949367854, -0.1902071038920444, 0.11508817132666356, 0.08903045262390544, -0.028537865059606825, -0.07160660523436188, 0.05994760363400714, 0.03637820115278829, 0.027604828657436364, 0.04168122074675033, -0.021707671111253164, 0.06770739385070886, -0.04848505599153394, -0.14377853380839264, 0.17448368721141166, -0.05972663746675887, -0.1615729579782888, -0.09508063624538736, -0.05501964872264433, -0.14370852991216054, -0.1025241548369181, -0.14751000180775747, -0.05402976681470177, -0.05847606145915367, 0.015603559358987138, 0.040327317968149784, 0.015596571983936361, 0.08721780106901023, 0.13669912032986667, -0.07070030973798198, 0.04821782065785363, 0.05266507025196321, -0.013775127999269254, 0.07032239356769251, 0.04685048562398681, 0.004648720572365418, -0.19364418622487742, 0.013662994215276983, 0.04703494294810789, 0.04863794676207257, -0.09883919097676001, -0.004798538894290822, -0.22183503742087135, 0.062096556899520906, 0.07098373434409047, -0.05335639719762188, -0.09150459514627822, -0.1329311651202703, -0.037376442133682145, 0.1238732233009325, -0.01232052797514208, 0.007151238520555889, -0.04772828461473576, -0.029830395387364726, -0.03277336781995001, 0.09964048194066656, 0.09306408040020697, -0.03761782769337173, 0.07059549032551317, -0.15490333414875848, 0.12599077783991805, 0.23520519946427365, 0.021640305946603107, 0.014851729969403227, -0.039035437601777224, -0.12087588583684257, -0.07207855860199022, -0.002800081649022032, 0.2543907308881692, -0.07966223382328289, -0.1014419766425384, -0.11243061225437859, -0.08744845956375621, -0.05540140267769189, -0.04995531421885231, -0.13274847220288336, 0.06435474943034288, 0.015640361472736924, -0.11210644205346465, -0.04080648821849449, -0.011452694652695428, 0.22044736923317904, 0.024322228245949113, 0.09622705616884256, 0.05793212184654495, -0.10620553812614748, 0.06762504431789758, 0.19135075519983785] # nopep8 def _assert(cond, msg): diff --git a/wafo/sg_filter/demos.py b/wafo/sg_filter/demos.py index fcc3438..e75a9e1 100644 --- a/wafo/sg_filter/demos.py +++ b/wafo/sg_filter/demos.py @@ -2,8 +2,8 @@ import numpy as np from scipy.sparse.linalg import expm from scipy.signal import medfilt from wafo.plotbackend import plotbackend as plt -from wafo.sg_filter import (SavitzkyGolay, smoothn, Kalman, HodrickPrescott, - HampelFilter) +from wafo.sg_filter._core import (SavitzkyGolay, smoothn, Kalman, + HodrickPrescott, HampelFilter) def demo_savitzky_on_noisy_chirp(): diff --git a/wafo/sg_filter/tests/conftest.py b/wafo/sg_filter/tests/conftest.py index 5c8859b..b267c86 100644 --- a/wafo/sg_filter/tests/conftest.py +++ b/wafo/sg_filter/tests/conftest.py @@ -8,5 +8,4 @@ https://pytest.org/latest/plugins.html """ from __future__ import print_function, absolute_import, division - import pytest # @UnusedImport diff --git a/wafo/sg_filter/tests/test_sg_filter.py b/wafo/sg_filter/tests/test_sg_filter.py index 233924f..51f6136 100644 --- a/wafo/sg_filter/tests/test_sg_filter.py +++ b/wafo/sg_filter/tests/test_sg_filter.py @@ -6,7 +6,7 @@ Created on 26. feb. 2016 import unittest import numpy as np -from wafo.sg_filter import HampelFilter, SavitzkyGolay, Kalman +from wafo.sg_filter._core import HampelFilter, SavitzkyGolay, Kalman from numpy.ma.testutils import assert_array_almost_equal @@ -24,10 +24,10 @@ class Test(unittest.TestCase): n = 50 # truth = np.random.randn(n) * np.sqrt(q) + V0 - truth = np.array([12.0000146639, 12.0000065349, 12.0000032619, 11.9999884321, 11.9999738705, 11.9999717554, 12.000012208, 12.0000269596, 12.0000235391, 12.0000420788, 11.9999763588, 12.0000272251, 11.9999278487, 11.9999775611, 12.0000280208, 11.9999788802, 11.9999531533, 11.9999963402, 11.9999318055, 11.9999537065, 12.0000011098, 11.9999750291, 12.000012755, 11.9999355349, 11.9999960117, 12.0000033276, 12.0000100317, 11.9999962376, 12.0000527124, 12.000019087, 12.0000273276, 11.9999461331, 12.0000527385, 11.9999990413, 11.9999850764, 12.0000031025, 11.9999868222, 11.9999830042, 11.9999881952, 12.0000064122, 12.0000343455, 11.9999779108, 12.0000134648, 12.0000329604, 12.0000536949, 11.999990415, 11.9999935299, 11.9999850717, 12.0000048284, 12.000060395]) # @IgnorePep8 + truth = np.array([12.0000146639, 12.0000065349, 12.0000032619, 11.9999884321, 11.9999738705, 11.9999717554, 12.000012208, 12.0000269596, 12.0000235391, 12.0000420788, 11.9999763588, 12.0000272251, 11.9999278487, 11.9999775611, 12.0000280208, 11.9999788802, 11.9999531533, 11.9999963402, 11.9999318055, 11.9999537065, 12.0000011098, 11.9999750291, 12.000012755, 11.9999355349, 11.9999960117, 12.0000033276, 12.0000100317, 11.9999962376, 12.0000527124, 12.000019087, 12.0000273276, 11.9999461331, 12.0000527385, 11.9999990413, 11.9999850764, 12.0000031025, 11.9999868222, 11.9999830042, 11.9999881952, 12.0000064122, 12.0000343455, 11.9999779108, 12.0000134648, 12.0000329604, 12.0000536949, 11.999990415, 11.9999935299, 11.9999850717, 12.0000048284, 12.000060395]) # nopep8 # print(', '.join(['{0}'.format(y) for y in truth])) # noise = np.random.randn(n) * np.sqrt(r) - noise = np.array([0.0621366489443, 0.0247330994998, 0.109271521369, -0.0567657373852, -0.0315244553453, -0.0025701462034, 0.00181288937042, 0.109022849782, 0.0241169949603, -0.0543790728855, 0.0380117839575, 0.0582078684346, -0.0734606815139, -0.0665977120387, 0.0270631615171, 0.0369150024436, 0.0788445252483, 0.0111006834355, 0.0169567513801, 0.057081645789, -0.0293106512335, 0.0120282068494, 0.0211769283138, -0.0703228625119, -0.0222740803259, 0.0636500853308, 0.0302268639638, 0.0823316446844, 0.0504871636818, -0.0295402185417, 0.0780534199429, -0.0275453184976, -0.0613567940452, -0.0416930336494, -0.0972202720552, 0.0367572628693, 0.0150242119742, -0.0269063072041, 0.0654834111234, 0.0281867030757, -0.0978716452136, -0.0209143055692, -0.0236015624104, 0.0215804707908, -0.0525669442916, -0.00999304544556, -0.120029281573, -0.0255283929591, -0.00426938028504, -0.0487170747831]) # @IgnorePep8 + noise = np.array([0.0621366489443, 0.0247330994998, 0.109271521369, -0.0567657373852, -0.0315244553453, -0.0025701462034, 0.00181288937042, 0.109022849782, 0.0241169949603, -0.0543790728855, 0.0380117839575, 0.0582078684346, -0.0734606815139, -0.0665977120387, 0.0270631615171, 0.0369150024436, 0.0788445252483, 0.0111006834355, 0.0169567513801, 0.057081645789, -0.0293106512335, 0.0120282068494, 0.0211769283138, -0.0703228625119, -0.0222740803259, 0.0636500853308, 0.0302268639638, 0.0823316446844, 0.0504871636818, -0.0295402185417, 0.0780534199429, -0.0275453184976, -0.0613567940452, -0.0416930336494, -0.0972202720552, 0.0367572628693, 0.0150242119742, -0.0269063072041, 0.0654834111234, 0.0281867030757, -0.0978716452136, -0.0209143055692, -0.0236015624104, 0.0215804707908, -0.0525669442916, -0.00999304544556, -0.120029281573, -0.0255283929591, -0.00426938028504, -0.0487170747831]) # nopep8 # print('noise') # print(', '.join(['{0}'.format(y) for y in noise])) z = truth + noise # measurement @@ -36,8 +36,8 @@ class Test(unittest.TestCase): for i, zi in enumerate(z): x[i] = filt(zi, u) # perform a Kalman filter iteration - print(', '.join(['{0}'.format(y) for y in x])) - assert_array_almost_equal(x, [12.0621513128, 12.0434454699, 12.065388589, 12.0348470726, 12.0215675093, 12.0175398445, 12.0152948689, 12.0270143185, 12.0266950063, 12.0185917138, 12.0203550503, 12.0235117738, 12.0160466547, 12.0101417447, 12.0112717378, 12.0128731715, 12.0167512202, 12.0164370857, 12.0164608484, 12.0184896738, 12.0162133963, 12.0160220138, 12.0162467099, 12.0126366982, 12.0112399981, 12.01325607, 12.0138850472, 12.0163296762, 12.0175094638, 12.0159415984, 12.0179463317, 12.0165228489, 12.0141641309, 12.0125210028, 12.0093846209, 12.0101451843, 12.0102767167, 12.0092975878, 12.0107382282, 12.01117469, 12.0085152867, 12.0078138971, 12.0070834443, 12.0074137537, 12.0060816948, 12.0057319401, 12.0030552687, 12.0024592874, 12.0023220236, 12.0013021198]) # @IgnorePep8 + # print(', '.join(['{0}'.format(y) for y in x])) + assert_array_almost_equal(x, [12.0621513128, 12.0434454699, 12.065388589, 12.0348470726, 12.0215675093, 12.0175398445, 12.0152948689, 12.0270143185, 12.0266950063, 12.0185917138, 12.0203550503, 12.0235117738, 12.0160466547, 12.0101417447, 12.0112717378, 12.0128731715, 12.0167512202, 12.0164370857, 12.0164608484, 12.0184896738, 12.0162133963, 12.0160220138, 12.0162467099, 12.0126366982, 12.0112399981, 12.01325607, 12.0138850472, 12.0163296762, 12.0175094638, 12.0159415984, 12.0179463317, 12.0165228489, 12.0141641309, 12.0125210028, 12.0093846209, 12.0101451843, 12.0102767167, 12.0092975878, 12.0107382282, 12.01117469, 12.0085152867, 12.0078138971, 12.0070834443, 12.0074137537, 12.0060816948, 12.0057319401, 12.0030552687, 12.0024592874, 12.0023220236, 12.0013021198]) # nopep8 def test_savitzky_golay(self): t = np.linspace(-4, 4, 100) @@ -58,16 +58,7 @@ class Test(unittest.TestCase): def test_hampelfilter(self): - Y = np.array([4979, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, - 4996, 5026, 5000, 5003, 4988, 4991, 5017, 5013, 5004, - 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, - 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, - 5003, 4986, 4996, 4994, 4997, 5003, 5012, 5002, 5001, - 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, - 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, - 4994, 4991, 4995, 5018, 5007, 5008, 4990, 5010, 4986, - 5009, 4999, 5008, 5000, 5001, 5000, 5004, 5032, 5009, - 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 5000, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5024, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4988, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 4990, 5013, 5015, 5011, 4987, 5004, 4999, 5030, 5000, 5000, 4999, 5013, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 4984, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 4994, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5014, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 4986, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4987, 5000, 5000, 5009, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5022, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 4974, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5013, 4988, 5001, 5002, 4986, 4985, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 4986, 5013, 4997, 5000, 4997, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 5001, 5010, 4991, 4990, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5010, 5000, 4999, 5000, 4977, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5018, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5018, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5021, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5028, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 4983, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 5023, 4971, 5001, 4990, 5025, 5003, 4996, 5006, 5005, 4995, 4994, 5023, 5003, 5005, 4991, 5001, 5028, 4996, 5001, 5005, 5001, 5001, 5028, 4983, 5000, 5005, 5001, 4999, 5003, 4982, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 4974, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 4974, 5009, 5006, 5009, 4984, 5010, 5023, 5000, 5008, 4992, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 5007, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 4981, 5000, 4999, 5003, 4988, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 4999, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5020, 4995, 5003, 5006, 5000, 4997, 4996, 5010, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5012, 4998, 5005, 5005, 5005, 4995, 4971, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5020, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 5006, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 4989, 5010, 5010, 5012, 4990, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5026, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 5030, 4997, 5002, 5004, 4999, 5000, 4992, 4977, 4997, 4998, 5000, 4987, 5032, 4998, 5014, 4978, 5001, 4988, 5006, 5003, 5005, 5021, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 5002, 4998, 4989, 4995, 5007, 5004, 5019, 5001, 5004, 5000, 4996, 4988, 5022, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 4995, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 4980, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5015, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 4987, 5003, 5002, 5016, 4997, 5022, 5005, 4998, 4999, 5001, 5000, 5008, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004], dtype=float) # @IgnorePep8 + Y = np.array([4979, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5026, 5000, 5003, 4988, 4991, 5017, 5013, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 4986, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 4990, 5010, 4986, 5009, 4999, 5008, 5000, 5001, 5000, 5004, 5032, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 5000, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5024, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4988, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 4990, 5013, 5015, 5011, 4987, 5004, 4999, 5030, 5000, 5000, 4999, 5013, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 4984, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 4994, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5014, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 4986, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4987, 5000, 5000, 5009, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5022, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 4974, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5013, 4988, 5001, 5002, 4986, 4985, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 4986, 5013, 4997, 5000, 4997, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 5001, 5010, 4991, 4990, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5010, 5000, 4999, 5000, 4977, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5018, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5018, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5021, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5028, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 4983, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 5023, 4971, 5001, 4990, 5025, 5003, 4996, 5006, 5005, 4995, 4994, 5023, 5003, 5005, 4991, 5001, 5028, 4996, 5001, 5005, 5001, 5001, 5028, 4983, 5000, 5005, 5001, 4999, 5003, 4982, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 4974, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 4974, 5009, 5006, 5009, 4984, 5010, 5023, 5000, 5008, 4992, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 5007, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 4981, 5000, 4999, 5003, 4988, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 4999, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5020, 4995, 5003, 5006, 5000, 4997, 4996, 5010, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5012, 4998, 5005, 5005, 5005, 4995, 4971, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5020, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 5006, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 4989, 5010, 5010, 5012, 4990, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5026, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 5030, 4997, 5002, 5004, 4999, 5000, 4992, 4977, 4997, 4998, 5000, 4987, 5032, 4998, 5014, 4978, 5001, 4988, 5006, 5003, 5005, 5021, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 5002, 4998, 4989, 4995, 5007, 5004, 5019, 5001, 5004, 5000, 4996, 4988, 5022, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 4995, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 4980, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5015, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 4987, 5003, 5002, 5016, 4997, 5022, 5005, 4998, 4999, 5001, 5000, 5008, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004], dtype=float) # nopep8 # randint = np.random.randint # Y = 5000 + np.int_(10*np.random.randn(1000)) # outliers = randint(0, 1000, size=(10,)) @@ -76,16 +67,22 @@ class Test(unittest.TestCase): noise = np.array([932, 286, 736, 427, 858, 63, 243, 264, 668, 844]) # print(', '.join(['{0:d}'.format(y) for y in Y])) Y[outliers] = Y[outliers] + noise - YY, _res = HampelFilter(fulloutput=True)(Y) + YY, res = HampelFilter(fulloutput=True)(Y) + + self.assert_(sum(res['outliers'] == True) == 76) + valid_names = set(('Y0', 'outliers', 'LB', 'ADX', 'UB')) + for name in res: + self.assert_(name in valid_names) + assert_array_almost_equal(YY[outliers], [5002, 5000, 5003, 5008, 5000, 4997, 4998, 4999, 5009, 4997]) - assert_array_almost_equal(np.int_(YY), [5001, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5000, 5000, 5003, 4988, 4991, 5017, 4997, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 4997, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5009, 5010, 5008, 5009, 4999, 5000, 5000, 5001, 5000, 5004, 5005, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4999, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5004, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4998, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5011, 5013, 5015, 5011, 4987, 5004, 4999, 5000, 5000, 5000, 4999, 5001, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 5002, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 5000, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 5000, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4987, 5000, 5000, 5000, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5002, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5001, 5001, 5001, 5002, 4986, 5001, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 5000, 5013, 4997, 5000, 5003, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 4991, 4991, 4991, 5004, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5000, 5000, 4999, 5000, 5000, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5002, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5002, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5002, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 5001, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4997, 4971, 5001, 4990, 5001, 5003, 4996, 5006, 5005, 4995, 5005, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5001, 5001, 5000, 5005, 5001, 4999, 5003, 5001, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 5003, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5004, 5009, 5006, 5009, 5009, 5010, 5023, 5000, 5008, 5008, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 4990, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 5000, 5000, 4999, 5003, 5003, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 5009, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5002, 4995, 5003, 5006, 5000, 4997, 4996, 4998, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5000, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 4997, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 5010, 5010, 5010, 5012, 5010, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5000, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4998, 4997, 4998, 5000, 5000, 5032, 4998, 5014, 4978, 5001, 5003, 5006, 5003, 5005, 5005, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4998, 4998, 4989, 4995, 5007, 5004, 5004, 5001, 5004, 5000, 4996, 4988, 5000, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 5004, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5002, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 5002, 5003, 5002, 5016, 4997, 5002, 5005, 4998, 4999, 5001, 5000, 5000, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004]) # @IgnorePep8 + assert_array_almost_equal(np.int_(YY), [5001, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5000, 5000, 5003, 4988, 4991, 5017, 4997, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 4997, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5009, 5010, 5008, 5009, 4999, 5000, 5000, 5001, 5000, 5004, 5005, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4999, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5004, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4998, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5011, 5013, 5015, 5011, 4987, 5004, 4999, 5000, 5000, 5000, 4999, 5001, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 5002, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 5000, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 5000, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4987, 5000, 5000, 5000, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5002, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5001, 5001, 5001, 5002, 4986, 5001, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 5000, 5013, 4997, 5000, 5003, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 4991, 4991, 4991, 5004, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5000, 5000, 4999, 5000, 5000, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5002, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5002, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5002, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 5001, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4997, 4971, 5001, 4990, 5001, 5003, 4996, 5006, 5005, 4995, 5005, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5001, 5001, 5000, 5005, 5001, 4999, 5003, 5001, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 5003, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5004, 5009, 5006, 5009, 5009, 5010, 5023, 5000, 5008, 5008, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 4990, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 5000, 5000, 4999, 5003, 5003, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 5009, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5002, 4995, 5003, 5006, 5000, 4997, 4996, 4998, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5000, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 4997, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 5010, 5010, 5010, 5012, 5010, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5000, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4998, 4997, 4998, 5000, 5000, 5032, 4998, 5014, 4978, 5001, 5003, 5006, 5003, 5005, 5005, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4998, 4998, 4989, 4995, 5007, 5004, 5004, 5001, 5004, 5000, 4996, 4988, 5000, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 5004, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5002, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 5002, 5003, 5002, 5016, 4997, 5002, 5005, 4998, 4999, 5001, 5000, 5000, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004]) # nopep8 - YY1, _res1 = HampelFilter(dx=1, t=3, adaptive=0.1, fulloutput=True)(Y) - assert_array_almost_equal(np.int_(YY1), [4999, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5026, 5000, 5003, 4988, 4991, 5017, 5003, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 5001, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5006, 5010, 4986, 5009, 4999, 5008, 5000, 5001, 5000, 5004, 5004, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4998, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5024, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4988, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5009, 5013, 5015, 5011, 5005, 5004, 4999, 5002, 5000, 5000, 4999, 5013, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 4984, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 4994, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 4986, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4999, 5000, 5000, 5009, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5022, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5013, 4988, 5001, 5002, 4986, 4985, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 4986, 5013, 4997, 5000, 5002, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 5001, 5010, 4991, 4990, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5010, 5000, 4999, 5000, 4977, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5003, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5021, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5028, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 4999, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4998, 4998, 5001, 4990, 5025, 5003, 4996, 5006, 5005, 4995, 4994, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5000, 5000, 5000, 5005, 5001, 4999, 5003, 4982, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 4974, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5001, 5009, 5006, 5009, 4984, 5010, 5023, 5000, 5008, 5007, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 5007, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 4981, 5000, 4999, 5003, 4988, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 4999, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5001, 4995, 5003, 5006, 5000, 4997, 4996, 5010, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5012, 4998, 5005, 5005, 5005, 4995, 5004, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5020, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 5006, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 4989, 5010, 5010, 5012, 4990, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5026, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4999, 4997, 4998, 5000, 5002, 5032, 4998, 5014, 4978, 5001, 4988, 5006, 5003, 5005, 5002, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4999, 4998, 4989, 4995, 5007, 5004, 5019, 5001, 5004, 5000, 4996, 4988, 5001, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 4980, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5015, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 4987, 5003, 5002, 5016, 4997, 5022, 5005, 4998, 4999, 5001, 5000, 4999, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004]) # @IgnorePep8 + YY1 = HampelFilter(dx=1, t=3, adaptive=0.1, fulloutput=False)(Y) + assert_array_almost_equal(np.int_(YY1), [4999, 5002, 5004, 5000, 4987, 4989, 5008, 5013, 5000, 4996, 5026, 5000, 5003, 4988, 4991, 5017, 5003, 5004, 4990, 4997, 5010, 5007, 5001, 4970, 5002, 4986, 5032, 5003, 4994, 5001, 4988, 4998, 5002, 4996, 4988, 5009, 5003, 5001, 4996, 4994, 4997, 5003, 5012, 5002, 5001, 5006, 5006, 4986, 4998, 4978, 4995, 4999, 4987, 5015, 5009, 5016, 4995, 5007, 5013, 4996, 5018, 4992, 4989, 4994, 4991, 4995, 5018, 5007, 5008, 5006, 5010, 4986, 5009, 4999, 5008, 5000, 5001, 5000, 5004, 5004, 5009, 5005, 5014, 5000, 4992, 4994, 4991, 4993, 5000, 5005, 4993, 5003, 4995, 4980, 4995, 4999, 5007, 5000, 4988, 4982, 5030, 4997, 4993, 5009, 4993, 5020, 5010, 4997, 4987, 4999, 5006, 4984, 4998, 4987, 4986, 5006, 5002, 5001, 5003, 4996, 4994, 5002, 4989, 4998, 4996, 5007, 4993, 4998, 5001, 4989, 5012, 5001, 5010, 4996, 5004, 5008, 5002, 5024, 4997, 5001, 5010, 5023, 4996, 5018, 5002, 4990, 5009, 4997, 5016, 5000, 5013, 5008, 4990, 5011, 4996, 5010, 5004, 5023, 4999, 5004, 4996, 5011, 4998, 5000, 4988, 5000, 4993, 4998, 5000, 5006, 5010, 4988, 5000, 4997, 4995, 4996, 5005, 5003, 5009, 5009, 4997, 5010, 5014, 5009, 5013, 5015, 5011, 5005, 5004, 4999, 5002, 5000, 5000, 4999, 5013, 5012, 5001, 5012, 4995, 4997, 4995, 4985, 4989, 5007, 5010, 4997, 5011, 4995, 5000, 5011, 4998, 4991, 5021, 5003, 4985, 4991, 4995, 5018, 4979, 5003, 5011, 5009, 5001, 4998, 5008, 4994, 5016, 4992, 5008, 4993, 4983, 5010, 5023, 4975, 4987, 4994, 5002, 4984, 5005, 5006, 5005, 5000, 4996, 5000, 4999, 5004, 4994, 5000, 4981, 5001, 4994, 4993, 5000, 5004, 5001, 4992, 5002, 5006, 4997, 4987, 5001, 5008, 5011, 4995, 5006, 4976, 4999, 4989, 5008, 4996, 4997, 5006, 5005, 5007, 4990, 5010, 4996, 4998, 5000, 5000, 5002, 5001, 4996, 4997, 5000, 5003, 5000, 4986, 5013, 5001, 4990, 4990, 5010, 5000, 5021, 5000, 5006, 4995, 5012, 5019, 5000, 5006, 4999, 5007, 5014, 5000, 4994, 4991, 5010, 4985, 4988, 5007, 5005, 5000, 5005, 4997, 4995, 4999, 5000, 5000, 5009, 5000, 4999, 5011, 5018, 4994, 5000, 4995, 5000, 5008, 4994, 4992, 5000, 4998, 4992, 5006, 4996, 5000, 5018, 5000, 5022, 5002, 5007, 5000, 5012, 5014, 5010, 4997, 4996, 5014, 4995, 4991, 5006, 4992, 5008, 5004, 4995, 5016, 5000, 5005, 5000, 4985, 5002, 5000, 5009, 4991, 4995, 5004, 4987, 5014, 4986, 5008, 4985, 4995, 5010, 5000, 5001, 5013, 4988, 5001, 5002, 4986, 4985, 5001, 4995, 5004, 4998, 4998, 4992, 5003, 5000, 4991, 4998, 5002, 5011, 4986, 5013, 4997, 5000, 5002, 5003, 5014, 4998, 5002, 5006, 5015, 4992, 4992, 4995, 4998, 4994, 5007, 4977, 5004, 5005, 4990, 4991, 5001, 5010, 4991, 4990, 5006, 5004, 5004, 4997, 5001, 4992, 5000, 5000, 4996, 4987, 4993, 5001, 5006, 4999, 4993, 4999, 5001, 5001, 5014, 4985, 5010, 5006, 4989, 5002, 5011, 4999, 5010, 5005, 5002, 5010, 4990, 4994, 5000, 4985, 5010, 5000, 4999, 5000, 4977, 5007, 5005, 4990, 5000, 4985, 5003, 5009, 5012, 5012, 5000, 5003, 4997, 5002, 4992, 4999, 4997, 5005, 5009, 4989, 5005, 4988, 5001, 5000, 5000, 4999, 5005, 4997, 5015, 5001, 4988, 4983, 5013, 4992, 5002, 5012, 4999, 5013, 5000, 4988, 4989, 4996, 5000, 5002, 4999, 5021, 4991, 5009, 5005, 4994, 5000, 4994, 4985, 4999, 4980, 5013, 5014, 5000, 4996, 5008, 5028, 5002, 5004, 4999, 5012, 4992, 5002, 4987, 5004, 5009, 5004, 5013, 4989, 5027, 4992, 5016, 5007, 5003, 5013, 5003, 4999, 5000, 4987, 5001, 4998, 4994, 4998, 4997, 4998, 4998, 5001, 4990, 5025, 5003, 4996, 5006, 5005, 4995, 4994, 5023, 5003, 5005, 4991, 5001, 5001, 4996, 5001, 5005, 5001, 5001, 5000, 5000, 5000, 5005, 5001, 4999, 5003, 4982, 5000, 5012, 5011, 5008, 5000, 4998, 4994, 4988, 5013, 4998, 5017, 4991, 5007, 5016, 5007, 4997, 4974, 4997, 5006, 5003, 5010, 5003, 4997, 4997, 4994, 4998, 4987, 5004, 5001, 5009, 5006, 5009, 4984, 5010, 5023, 5000, 5008, 5007, 5008, 4993, 5010, 5012, 4989, 5002, 4993, 5007, 4985, 4990, 4988, 4997, 5000, 4994, 5004, 4981, 5000, 4999, 5003, 4988, 5006, 5019, 5003, 4992, 4977, 4998, 4987, 4995, 4987, 5000, 4986, 4998, 4996, 5008, 5011, 5009, 5000, 4999, 5010, 4999, 5009, 5010, 4992, 4998, 4994, 5009, 4998, 5013, 5011, 4997, 5016, 4995, 5003, 4986, 5010, 4995, 4986, 5025, 4990, 5010, 4990, 4996, 5000, 5002, 4994, 5002, 5000, 5001, 4995, 5003, 5006, 5000, 4997, 4996, 5010, 4992, 5013, 4998, 4988, 4999, 5004, 5004, 5002, 5002, 5001, 4986, 5011, 5012, 4988, 5000, 5000, 5012, 5004, 5004, 4984, 5012, 4998, 5005, 5005, 5005, 4995, 5004, 5006, 5000, 5008, 5015, 4999, 4999, 4996, 5000, 4992, 5019, 5020, 4999, 4991, 5020, 5000, 5002, 5000, 5003, 4985, 4990, 5011, 5012, 4997, 4989, 4999, 5006, 4997, 4992, 4999, 4985, 4999, 5012, 5003, 4989, 5010, 5010, 5012, 4990, 4986, 5014, 5000, 4994, 5017, 4995, 5005, 5003, 5000, 5000, 4988, 5018, 5007, 5009, 5002, 5004, 4999, 5026, 4987, 4986, 5000, 4994, 5012, 5022, 4996, 5002, 4986, 4990, 4989, 4997, 4997, 5002, 5004, 4999, 5000, 4992, 4999, 4997, 4998, 5000, 5002, 5032, 4998, 5014, 4978, 5001, 4988, 5006, 5003, 5005, 5002, 5005, 5000, 5003, 4990, 4991, 4990, 5016, 5006, 4981, 4999, 4998, 4989, 4995, 5007, 5004, 5019, 5001, 5004, 5000, 4996, 4988, 5001, 5003, 5009, 4998, 5003, 4991, 5000, 4988, 5004, 5002, 4991, 4998, 4996, 4991, 5013, 5007, 5010, 5004, 5006, 5007, 4993, 5000, 5002, 4992, 4999, 4992, 5001, 4989, 4992, 5015, 5011, 5008, 5004, 4990, 4995, 4993, 5004, 5000, 4982, 5008, 5000, 4993, 5000, 5000, 4991, 5005, 5008, 5003, 4994, 4997, 5012, 4995, 5009, 5020, 5010, 5019, 4979, 5013, 4990, 5002, 5000, 5015, 4989, 5009, 4998, 5004, 5010, 4988, 4994, 5004, 4985, 4998, 4991, 4985, 4994, 4986, 5010, 4990, 5002, 5005, 5008, 5004, 4988, 4980, 5005, 4994, 5004, 4998, 4990, 5010, 5003, 5011, 4992, 5009, 5003, 5013, 4996, 4997, 4989, 4992, 5002, 4992, 4996, 4999, 5000, 5009, 4990, 4992, 5020, 4981, 5011, 5000, 5008, 4997, 4994, 4982, 5014, 5013, 4996, 5002, 5011, 5003, 5000, 5015, 4999, 5001, 5002, 5018, 4984, 5022, 5009, 5006, 5009, 5000, 4974, 4991, 5020, 5000, 4987, 5003, 4987, 5003, 5002, 5016, 4997, 5022, 5005, 4998, 4999, 5001, 5000, 4999, 5000, 5001, 4994, 4991, 4997, 4990, 4991, 4995, 5008, 5007, 4994, 5000, 5007, 4988, 5014, 5003, 4998, 4995, 5000, 5000, 5004]) # nopep8 - YY2, _res2 = HampelFilter(dx=3, t=0, fulloutput=True)(Y) # Y0 = - assert_array_almost_equal(np.int_(YY2), [5001, 5000, 4994, 5000, 5002, 5000, 5000, 5000, 5000, 5003, 5000, 5000, 5000, 5003, 5003, 5003, 4997, 5004, 5007, 5004, 5001, 5001, 5001, 5002, 5002, 5001, 5001, 5001, 4998, 5001, 4998, 4996, 4998, 4998, 5002, 5002, 4996, 4997, 5003, 5003, 5002, 5001, 5002, 5003, 5003, 5002, 5001, 4998, 4998, 4995, 4995, 4998, 4999, 4999, 5007, 5009, 5009, 5009, 5007, 4996, 4996, 4994, 4994, 4994, 4994, 4995, 5007, 5008, 5008, 5009, 5008, 5008, 5008, 5001, 5000, 5001, 5001, 5004, 5004, 5005, 5005, 5005, 5005, 5000, 4994, 4994, 4994, 4993, 4994, 4995, 4995, 4995, 4995, 4995, 4999, 4995, 4995, 4999, 4999, 4997, 4997, 4993, 4997, 5009, 4997, 4997, 4999, 4999, 4999, 4999, 4997, 4987, 4999, 5002, 5001, 5002, 5001, 5001, 5002, 5001, 4998, 4996, 4996, 4996, 4998, 4998, 4998, 4998, 5001, 5001, 5001, 5001, 5004, 5004, 5004, 5004, 5002, 5004, 5008, 5002, 5010, 5002, 5002, 5009, 5002, 5002, 5002, 5002, 5008, 5008, 5008, 5008, 5008, 5008, 5008, 5004, 5004, 5004, 5004, 5004, 5000, 4999, 5000, 4998, 4998, 4998, 5000, 5000, 5000, 5000, 5000, 5000, 4997, 4997, 4997, 5000, 5003, 5003, 5005, 5009, 5009, 5009, 5010, 5011, 5011, 5011, 5004, 5011, 5004, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 4997, 4995, 4995, 4995, 4997, 4997, 4997, 5000, 5007, 5000, 4998, 5000, 5000, 5000, 4998, 4995, 4995, 4995, 4995, 4995, 5003, 5003, 5003, 5003, 5003, 5008, 5001, 5001, 4998, 4994, 4994, 5008, 4993, 4993, 4993, 4994, 4994, 4994, 4994, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4999, 5000, 4999, 4994, 4994, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 5002, 5001, 5001, 5001, 5001, 4999, 4999, 4996, 4997, 4997, 4999, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5006, 5006, 5006, 5006, 5006, 5006, 5007, 5006, 5000, 5000, 5000, 5000, 4994, 4994, 4994, 5000, 5005, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 5000, 4998, 4998, 4998, 4996, 4998, 5000, 5000, 5000, 5002, 5002, 5002, 5007, 5007, 5010, 5007, 5007, 5010, 5010, 4997, 4997, 4996, 4996, 5004, 4995, 5004, 5004, 5004, 5004, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 4995, 4995, 4995, 4995, 5000, 5000, 5001, 5000, 5001, 5001, 5001, 5001, 5001, 4995, 5001, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5000, 4998, 5000, 5002, 5003, 5003, 5003, 5002, 5003, 5006, 5003, 5002, 4998, 4998, 4995, 4995, 4994, 4995, 4998, 4998, 4994, 5001, 5001, 5001, 4991, 4991, 5001, 5004, 5004, 5001, 5001, 5001, 5000, 5000, 4997, 4996, 4996, 5000, 4999, 4996, 4999, 4999, 5001, 5001, 4999, 5001, 5001, 5001, 5002, 5006, 5002, 5006, 5005, 5002, 5005, 5005, 5002, 5002, 5000, 5000, 5000, 4999, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5009, 5009, 5002, 5000, 4999, 4999, 4999, 4999, 4999, 4999, 5001, 5001, 5001, 5000, 5001, 5000, 5001, 5001, 5001, 4999, 5001, 4997, 5001, 5001, 4999, 5002, 5002, 5000, 5000, 4999, 4999, 5000, 4999, 4999, 4999, 5000, 5002, 5002, 5000, 5000, 4994, 4999, 4994, 4994, 4999, 4999, 4999, 5000, 5008, 5008, 5004, 5002, 5004, 5004, 5002, 5002, 5002, 5002, 5004, 5004, 5004, 5004, 5004, 5009, 5007, 5007, 5007, 5007, 5003, 5003, 5003, 5001, 5000, 4998, 4998, 4998, 4998, 4998, 4998, 4997, 4998, 5001, 5001, 5001, 5003, 5003, 5003, 5003, 5003, 5005, 5003, 5001, 5003, 5003, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5000, 5000, 5001, 5001, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4998, 4998, 5007, 5007, 5007, 5007, 4997, 5006, 5003, 5003, 5003, 5003, 5003, 5003, 4998, 4997, 4997, 4997, 4997, 4998, 5004, 5004, 5006, 5009, 5009, 5008, 5009, 5008, 5008, 5008, 5008, 5008, 5008, 5002, 5002, 5002, 4993, 4990, 4993, 4993, 4994, 4994, 4994, 4997, 4999, 5000, 4999, 5000, 5000, 5003, 5003, 5003, 4998, 4998, 4995, 4992, 4992, 4987, 4995, 4995, 4996, 4998, 5000, 5000, 5000, 5008, 5008, 5009, 5009, 5000, 4999, 4999, 4999, 4998, 4998, 4998, 4998, 5009, 5009, 5003, 5003, 5003, 4997, 4995, 4995, 4995, 4995, 4995, 4995, 4996, 5000, 4996, 5000, 5000, 5000, 5000, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4998, 4997, 4998, 4999, 4999, 5002, 5002, 5002, 5002, 5002, 5002, 5002, 5001, 5000, 5000, 5004, 5004, 5000, 5004, 5004, 5004, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5000, 4999, 4999, 4999, 4999, 4999, 5000, 5000, 5002, 5000, 5000, 5000, 5000, 5000, 5002, 5000, 4997, 4997, 4999, 4999, 4997, 4997, 4997, 4999, 4999, 4999, 4999, 4999, 5003, 5010, 5010, 5003, 5010, 5010, 5000, 5000, 4995, 5000, 5003, 5000, 5000, 5000, 5000, 5003, 5003, 5002, 5004, 5004, 5007, 5004, 5002, 5000, 4999, 4999, 5000, 4996, 5000, 5000, 4996, 4996, 4996, 4996, 4997, 4997, 4999, 5000, 5000, 4999, 4999, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5001, 5001, 5001, 5001, 5003, 5003, 5005, 5005, 5005, 5003, 5003, 5000, 5000, 5000, 4991, 4991, 4998, 4998, 4998, 4998, 4998, 5004, 5001, 5004, 5004, 5004, 5001, 5001, 5001, 5003, 5000, 5003, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4996, 4998, 4998, 4998, 5004, 5006, 5007, 5007, 5006, 5004, 5002, 5000, 4999, 4999, 4999, 4992, 4992, 4999, 5001, 5004, 5004, 5004, 5004, 5004, 5004, 4995, 4995, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5010, 5010, 5010, 5010, 5010, 5002, 5002, 5000, 5002, 5000, 5002, 5004, 5004, 4998, 5004, 4998, 4998, 4994, 4991, 4994, 4991, 4991, 4991, 4991, 4994, 5002, 5004, 5004, 5002, 5004, 5004, 5004, 4998, 4994, 4998, 5003, 5003, 5003, 5003, 5003, 5009, 5003, 5003, 4997, 4997, 4997, 4996, 4996, 4996, 4996, 4999, 4999, 4996, 4999, 4999, 5000, 5000, 5000, 5000, 5000, 4997, 5000, 5000, 4997, 4997, 5002, 5003, 5003, 5003, 5002, 5002, 5002, 5002, 5001, 5002, 5002, 5006, 5009, 5009, 5006, 5006, 5006, 5000, 5000, 5000, 4991, 5000, 5002, 5002, 5002, 5003, 5003, 5003, 5002, 5001, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 4997, 4994, 4994, 4994, 4995, 4995, 4995, 5000, 5000, 5007, 5003, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000]) # @IgnorePep8 + YY2 = HampelFilter(dx=3, t=0, fulloutput=False)(Y) # Y0 = + assert_array_almost_equal(np.int_(YY2), [5001, 5000, 4994, 5000, 5002, 5000, 5000, 5000, 5000, 5003, 5000, 5000, 5000, 5003, 5003, 5003, 4997, 5004, 5007, 5004, 5001, 5001, 5001, 5002, 5002, 5001, 5001, 5001, 4998, 5001, 4998, 4996, 4998, 4998, 5002, 5002, 4996, 4997, 5003, 5003, 5002, 5001, 5002, 5003, 5003, 5002, 5001, 4998, 4998, 4995, 4995, 4998, 4999, 4999, 5007, 5009, 5009, 5009, 5007, 4996, 4996, 4994, 4994, 4994, 4994, 4995, 5007, 5008, 5008, 5009, 5008, 5008, 5008, 5001, 5000, 5001, 5001, 5004, 5004, 5005, 5005, 5005, 5005, 5000, 4994, 4994, 4994, 4993, 4994, 4995, 4995, 4995, 4995, 4995, 4999, 4995, 4995, 4999, 4999, 4997, 4997, 4993, 4997, 5009, 4997, 4997, 4999, 4999, 4999, 4999, 4997, 4987, 4999, 5002, 5001, 5002, 5001, 5001, 5002, 5001, 4998, 4996, 4996, 4996, 4998, 4998, 4998, 4998, 5001, 5001, 5001, 5001, 5004, 5004, 5004, 5004, 5002, 5004, 5008, 5002, 5010, 5002, 5002, 5009, 5002, 5002, 5002, 5002, 5008, 5008, 5008, 5008, 5008, 5008, 5008, 5004, 5004, 5004, 5004, 5004, 5000, 4999, 5000, 4998, 4998, 4998, 5000, 5000, 5000, 5000, 5000, 5000, 4997, 4997, 4997, 5000, 5003, 5003, 5005, 5009, 5009, 5009, 5010, 5011, 5011, 5011, 5004, 5011, 5004, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 4997, 4995, 4995, 4995, 4997, 4997, 4997, 5000, 5007, 5000, 4998, 5000, 5000, 5000, 4998, 4995, 4995, 4995, 4995, 4995, 5003, 5003, 5003, 5003, 5003, 5008, 5001, 5001, 4998, 4994, 4994, 5008, 4993, 4993, 4993, 4994, 4994, 4994, 4994, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4999, 5000, 4999, 4994, 4994, 5000, 5000, 5000, 5000, 5001, 5001, 5001, 5001, 5001, 5002, 5001, 5001, 5001, 5001, 4999, 4999, 4996, 4997, 4997, 4999, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5001, 5000, 5000, 5000, 5006, 5006, 5006, 5006, 5006, 5006, 5007, 5006, 5000, 5000, 5000, 5000, 4994, 4994, 4994, 5000, 5005, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 5000, 4998, 4998, 4998, 4996, 4998, 5000, 5000, 5000, 5002, 5002, 5002, 5007, 5007, 5010, 5007, 5007, 5010, 5010, 4997, 4997, 4996, 4996, 5004, 4995, 5004, 5004, 5004, 5004, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 4995, 4995, 4995, 4995, 4995, 5000, 5000, 5001, 5000, 5001, 5001, 5001, 5001, 5001, 4995, 5001, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5000, 4998, 5000, 5002, 5003, 5003, 5003, 5002, 5003, 5006, 5003, 5002, 4998, 4998, 4995, 4995, 4994, 4995, 4998, 4998, 4994, 5001, 5001, 5001, 4991, 4991, 5001, 5004, 5004, 5001, 5001, 5001, 5000, 5000, 4997, 4996, 4996, 5000, 4999, 4996, 4999, 4999, 5001, 5001, 4999, 5001, 5001, 5001, 5002, 5006, 5002, 5006, 5005, 5002, 5005, 5005, 5002, 5002, 5000, 5000, 5000, 4999, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5009, 5009, 5002, 5000, 4999, 4999, 4999, 4999, 4999, 4999, 5001, 5001, 5001, 5000, 5001, 5000, 5001, 5001, 5001, 4999, 5001, 4997, 5001, 5001, 4999, 5002, 5002, 5000, 5000, 4999, 4999, 5000, 4999, 4999, 4999, 5000, 5002, 5002, 5000, 5000, 4994, 4999, 4994, 4994, 4999, 4999, 4999, 5000, 5008, 5008, 5004, 5002, 5004, 5004, 5002, 5002, 5002, 5002, 5004, 5004, 5004, 5004, 5004, 5009, 5007, 5007, 5007, 5007, 5003, 5003, 5003, 5001, 5000, 4998, 4998, 4998, 4998, 4998, 4998, 4997, 4998, 5001, 5001, 5001, 5003, 5003, 5003, 5003, 5003, 5005, 5003, 5001, 5003, 5003, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5001, 5000, 5000, 5001, 5001, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4998, 4998, 5007, 5007, 5007, 5007, 4997, 5006, 5003, 5003, 5003, 5003, 5003, 5003, 4998, 4997, 4997, 4997, 4997, 4998, 5004, 5004, 5006, 5009, 5009, 5008, 5009, 5008, 5008, 5008, 5008, 5008, 5008, 5002, 5002, 5002, 4993, 4990, 4993, 4993, 4994, 4994, 4994, 4997, 4999, 5000, 4999, 5000, 5000, 5003, 5003, 5003, 4998, 4998, 4995, 4992, 4992, 4987, 4995, 4995, 4996, 4998, 5000, 5000, 5000, 5008, 5008, 5009, 5009, 5000, 4999, 4999, 4999, 4998, 4998, 4998, 4998, 5009, 5009, 5003, 5003, 5003, 4997, 4995, 4995, 4995, 4995, 4995, 4995, 4996, 5000, 4996, 5000, 5000, 5000, 5000, 5002, 5002, 5002, 5000, 5000, 5000, 5000, 5000, 4998, 4997, 4998, 4999, 4999, 5002, 5002, 5002, 5002, 5002, 5002, 5002, 5001, 5000, 5000, 5004, 5004, 5000, 5004, 5004, 5004, 5004, 5005, 5005, 5005, 5005, 5005, 5005, 5005, 5000, 5000, 5000, 5000, 4999, 4999, 4999, 4999, 4999, 5000, 5000, 5002, 5000, 5000, 5000, 5000, 5000, 5002, 5000, 4997, 4997, 4999, 4999, 4997, 4997, 4997, 4999, 4999, 4999, 4999, 4999, 5003, 5010, 5010, 5003, 5010, 5010, 5000, 5000, 4995, 5000, 5003, 5000, 5000, 5000, 5000, 5003, 5003, 5002, 5004, 5004, 5007, 5004, 5002, 5000, 4999, 4999, 5000, 4996, 5000, 5000, 4996, 4996, 4996, 4996, 4997, 4997, 4999, 5000, 5000, 4999, 4999, 4998, 4998, 4998, 4998, 4998, 5000, 5000, 5001, 5001, 5001, 5001, 5003, 5003, 5005, 5005, 5005, 5003, 5003, 5000, 5000, 5000, 4991, 4991, 4998, 4998, 4998, 4998, 4998, 5004, 5001, 5004, 5004, 5004, 5001, 5001, 5001, 5003, 5000, 5003, 5003, 5003, 5000, 5000, 5000, 5000, 4998, 4998, 4996, 4998, 4998, 4998, 5004, 5006, 5007, 5007, 5006, 5004, 5002, 5000, 4999, 4999, 4999, 4992, 4992, 4999, 5001, 5004, 5004, 5004, 5004, 5004, 5004, 4995, 4995, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5003, 5003, 5003, 5003, 5009, 5010, 5010, 5010, 5010, 5010, 5002, 5002, 5000, 5002, 5000, 5002, 5004, 5004, 4998, 5004, 4998, 4998, 4994, 4991, 4994, 4991, 4991, 4991, 4991, 4994, 5002, 5004, 5004, 5002, 5004, 5004, 5004, 4998, 4994, 4998, 5003, 5003, 5003, 5003, 5003, 5009, 5003, 5003, 4997, 4997, 4997, 4996, 4996, 4996, 4996, 4999, 4999, 4996, 4999, 4999, 5000, 5000, 5000, 5000, 5000, 4997, 5000, 5000, 4997, 4997, 5002, 5003, 5003, 5003, 5002, 5002, 5002, 5002, 5001, 5002, 5002, 5006, 5009, 5009, 5006, 5006, 5006, 5000, 5000, 5000, 4991, 5000, 5002, 5002, 5002, 5003, 5003, 5003, 5002, 5001, 5000, 5001, 5000, 5000, 5000, 5000, 5000, 4997, 4994, 4994, 4994, 4995, 4995, 4995, 5000, 5000, 5007, 5003, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000]) # nopep8 # print(', '.join(['{0:d}'.format(int(y)) for y in YY2]))