# using Base.Test
# include("eegutilities.jl")

data = AnalogData([1.0 2 3 4 5; 2 4 6 8 10], [1.0, 2, 3, 4, 5])

@testset "ad_equals Tests" begin
@test ad_equals(data, data) == true
end

@testset "Normalize Data Tests" begin
@test normalize_data([1, 2, 4]) == [0.25, 0.5, 1]
@test ad_equals(normalize_data(data), AnalogData(
[0.2 0.4 0.6 0.8 1.0; 0.2 0.4 0.6 0.8 1.0],
[1.0,2.0,3.0,4.0,5.0],30000,30000,
[1,2]))
end

@testset "Threshold_01 Tests" begin
@test threshold_01([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.5], 4.0) ==
[false, false, false, true, true, true, true, true, true, true]
@test begin ad_equals(threshold_01(data, 3.0),AnalogData([0.0 0.0 1.0 1.0 1.0;
0.0 1.0 1.0 1.0 1.0],[1.0,2.0,3.0,4.0,5.0],30000,30000,[1,2]))
end
end

@testset "Lowpass Tests" begin
    q = collect(linspace(0,1,150))
    sindata = sin(60*2*pi*q) + sin(200*2*pi*q)
    ad_sindata = AnalogData([(sin(60*2*pi*q) + sin(200*2*pi*q))'; (sin(70*2*pi*q) + sin(210*2*pi*q))'],q,original_fs=150)

    @test begin
        actual = lowpass(sindata, 65.0,150)
        # print(format_full_array(actual))
        expected = [0.0, 0.711807070637017647030120315321, 0.025983875960371365793077913509, -0.975665099512987521457318962348, 1.104035186642847277127543748065, -0.266893794419766960945850087228, -0.817462414627789457632900393946, 1.273099211593460511338093965605, -0.830233202467945186064923746017, -0.003888329466166770814056219407, 0.474927770974582774687888786502, -0.294331015444627863697490965933, -0.127566301914583707377559562701, 0.131323544000171404944055097985, 0.494892464367036377659303525434, -1.240626088402048798897681081144, 1.302335434888988840995693863078, -0.343400446981696749748635966171, -1.111721553004237250661390135065, 2.036359240742044107719266321510, -1.730011944588890848706341785146, 0.403478608388685155983210961494, 0.990167872702820028862902290712, -1.532666760858142573908935446525, 1.052551444354962173477474607353, -0.170022062775824905900279304660, -0.326773876817456787602367285217, 0.187763674268896757491020821362, 0.146564169498526603030441606279, -0.057529027763216084023767393774, -0.578832637767136670703393974691, 1.207478853436902754836523854465, -1.091047778282459912446711314260, 0.039884927127425487403122872365, 1.307929057707019282474902865943, -1.949256586807033730934790582978, 1.344372405710752671481600373227, 0.109491053130903903678472488536, -1.382601769568396754550576588372, 1.639885896977429702303652447881, -0.880674677200861344417148757202, -0.145501185912555924817368691038, 0.640093315106287308324795048975, -0.431111679512735268549050715592, 0.029052304813484038092941119658, -0.048721610875113723071461180325, 0.562060561731893004733251473226, -1.000299739101531137919209868414, 0.705865418684831547047053845745, 0.378596080009681534850329853725, -1.541301848634604398924352608446, 1.847665483545442688395610275620, -0.943115527150253929455914203572, -0.598214195547864813207183942723, 1.704375960385665855767456378089, -1.658411064108016530482814232528, 0.644114636764766990140174129920, 0.471603391112516701078050118667, -0.904332521595982985473938242649, 0.580078862819176310772206761612, -0.087183551539338557945235663738, 0.037383763441795718474036647194, -0.452516109982090131147458578198, 0.753216100712028491237504113087, -0.356763801522777979080558452551, -0.683330236014582315107190879644, 1.615171731525234299908788671019, -1.600021740136899017770133468730, 0.469316531188096186522074049208, 1.056856492254182766643566537823, -1.911321288083325464768336132693, 1.531417497223027668340478157916, -0.291676789834516836386058002972, -0.846093699843214364086918521934, 1.144832920580176605085398477968, -0.652989118473732865766123723006, 0.045267041318355134837947417736, 0.070803178475895220400637697367, 0.274755011126033232837784225921, -0.490419776591868861181922056858, 0.059166485507823399214721860062, 0.877332742508083796018070188438, -1.556847171599081036674760980532, 1.255178536416747592241449638095, 0.019215585174998460471496031232, -1.437087700222884345535590000509, 1.981158376271750176655928044056, -1.270024983572049848135065985844, -0.137021903884364582015820133165, 1.215385365485875501789791996998, -1.311883298766742145247121698048, 0.618730513420476802011194195074, 0.101542682757880475818978993630, -0.254796485497854274804296892398, -0.068185009291064233027945817867, 0.256899703760972208943513805934, 0.151432388052147398616043005859, -0.947540942571093447455155001080, 1.381371620873549366237398317026, -0.851254686391156645264288727049, -0.476164676066124337161511448357, 1.703297939518428893990176220541, -1.903556018810384387052181409672, 0.892885308365814811537575224065, 0.602726192189906195828541513038, -1.535629458780413347795956724440, 1.373414883322082502559169370215, -0.467585576199317620726958466548, -0.338508717113542023646743928111, 0.481057542010681016275697174933, -0.125787367073894290614433089104, -0.088658810550375596881700346330, -0.256775590947932674801279517851, 0.901045284768547505294122856867, -1.120458383179613548463748884387, 0.434207121811082952245186561413, 0.858529210296675837632562888757, -1.832665153056348472659919934813, 1.685344772680893221661335701356, -0.433655467489965196214996012714, -1.058742676522795855831304834282, 1.765400136594332813899654865963, -1.308179596265904853780170924438, 0.204659669373982167073222626641, 0.637620164395538036039567941771, -0.709071750872043993219051571941, 0.267520113166991035935637910370, 0.011773987288183997146351345009, 0.253274159850861324549953224050, -0.759135508045440277058446554292, 0.814273185097985630065409168310, -0.049297464924984539524910331920, -1.133226849006411018905282617197, 1.818015207277915434858073240321, -1.348898163097543623223373288056, -0.064449562171188731762860868457, 1.458370526560116120506904735521, -1.872695321863464990030934131937, 1.110160899194369221731903962791, 0.149495015309392659252907265000, -0.960639862303336644622220319434, 0.896746620694372720272724563984, -0.324851250581566441955061463887, -0.038404435717768810321093297944, -0.152911344755877365297891401497, 0.554886158483838820565381411143, -0.506679353515239183636253983423, -0.264162743790698040236009092041, 1.280817162616812998621185215598, -1.668553304409151172293945819547, ]
        actual ≈ expected
    end

    @test begin
      actual = lowpass(ad_sindata, 65.0)
      expected = AnalogData([0.000000000000000000000000000000 0.711807070637017647030120315321 0.025983875960371365793077913509 -0.975665099512987521457318962348 1.104035186642847277127543748065 -0.266893794419767849124269787353 -0.817462414627790567855925019103 1.273099211593463397917957991012 -0.830233202467941189262035095453 -0.003888329466168325559971563621 0.474927770974581053842200617510 -0.294331015444631194366564841403 -0.127566301914586122112638122417 0.131323544000172875989562726318 0.494892464367033935168649350089 -1.240626088402054572057409131958 1.302335434888984400103595362452 -0.343400446981692974990352240638 -1.111721553004234142036921184626 2.036359240742039666827167820884 -1.730011944588895733687650135835 0.403478608388683823715581411307 0.990167872702828688602494366933 -1.532666760858141463685910821368 1.052551444354959953031425357040 -0.170022062775823046276713057523 -0.326773876817457953336543141631 0.187763674268896590957567127589 0.146564169498538038327595245391 -0.057529027763186503519055037259 -0.578832637767129787320641298720 1.207478853436886545580364327179 -1.091047778282453695197773413383 0.039884927127425487403122872365 1.307929057707013731359779740160 -1.949256586807039726139123558823 1.344372405710742901518983671849 0.109491053130907720070119637512 -1.382601769568398974996625838685 1.639885896977422152787084996817 -0.880674677200865785309247257828 -0.145501185912564917623868154806 0.640093315106284643789535948599 -0.431111679512752532517083636776 0.029052304813472273198327044952 -0.048721610875109795657511568834 0.562060561731884011926752009458 -1.000299739101540019703406869667 0.705865418684834988738430183730 0.378596080009685531653218504289 -1.541301848634600846210673807946 1.847665483545443132484820125683 -0.943115527150255705812753603823 -0.598214195547854932222264778829 1.704375960385703825394898558443 -1.658411064107985444238124728145 0.644114636764734904694762462896 0.471603391112526026951456969982 -0.904332521595913041423386857787 0.580078862819189300381594875944 -0.087183551539339029790021129429 0.037383763441788432635437544604 -0.452516109982094516528405847566 0.753216100712037484044003576855 -0.356763801522787027398209147577 -0.683330236014575542746740666189 1.615171731525230747195109870518 -1.600021740136898351636318693636 0.469316531188087193715574585440 1.056856492254168333744246410788 -1.911321288083319025474793306785 1.531417497223029222652712633135 -0.291676789834499683440327544304 -0.846093699843215696354548072122 1.144832920580170609881065502123 -0.652989118473748075821561087650 0.045267041318305889507911388137 0.070803178475893221999193372085 0.274755011126026738033090168756 -0.490419776591886402705711134331 0.059166485507838519064538473913 0.877332742508084795218792351079 -1.556847171599067269909255628590 1.255178536416748702464474263252 0.019215585174983895733191729960 -1.437087700222934083527093207522 1.981158376271616505803763175209 -1.270024983572114463115099169954 -0.137021903884355283897988897479 1.215385365485851076883250243554 -1.311883298766738592533442897548 0.618730513420482908237829633435 0.101542682757885596722680077164 -0.254796485497828517630125588767 -0.068185009291074197279591828647 0.256899703760971764854303955872 0.151432388052153282798073519189 -0.947540942571131528104899643949 1.381371620873459882261613529408 -0.851254686391215376062291397830 -0.476164676066082537264634311214 1.703297939518414017001646243443 -1.903556018810403038798995112302 0.892885308365833352262086464179 0.602726192189891540884616460971 -1.535629458780350731217367865611 1.373414883322162438616942381486 -0.467585576199365193783563654506 -0.338508717113659429731598038416 0.481057542010610239557877321204 -0.125787367073877887069244252416 -0.088658810550335823141843150097 -0.256775590947915299810944134151 0.901045284768583365497818249423 -1.120458383179671280061029392527 0.434207121810991081289898829709 0.858529210296700817650616954779 -1.832665153056378892770794664102 1.685344772680845926160486669687 -0.433655467490005663844243599669 -1.058742676522788750403947233281 1.765400136594320379401779064210 -1.308179596266009214744485689152 0.204659669374020469767572194542 0.637620164395540922619431967178 -0.709071750872068307103290862869 0.267520113167022344224932339785 0.011773987288173408394253982578 0.253274159850906566138206699179 -0.759135508045458040626840556797 0.814273185097984408820082080638 -0.049297464924972549116244380230 -1.133226849006428116339861844608 1.818015207277932310248047542700 -1.348898163097557167944273714966 -0.064449562171179988756541945349 1.458370526560115232328485035396 -1.872695321863462103451070106530 1.110160899194346573182201609598 0.149495015309351275689664362289 -0.960639862303298452950173214049 0.896746620694396145978544154787 -0.324851250581589146015915048338 -0.038404435717757576251862872141 -0.152911344755837536046882974006 0.554886158483827385268227772031 -0.506679353515242736349932783924 -0.264162743790678222755019532997 1.280817162616815441111839390942 -1.668553304409146953446452243952; 0.000000000000000000000000000000 0.367178287985542528559790298459 -0.148434603285355681823176610123 -0.245350661727222807417803096541 0.523245960090486295079870160407 -0.539834154800677867847014113067 0.292938419904807012539293964437 0.108966892599632964033773419033 -0.502330348874802878889056501066 0.732252854641393224888190616184 -0.706706179930588040960515172628 0.426283838020583727423939990331 0.018077810067520818509967384102 -0.477219253692622191742600534781 0.794483421605277406740697188070 -0.858303446602882047500315820798 0.639651051443422824505091739411 -0.202397145126325533892597263730 -0.316608509124049641858533732375 0.751242382059499336222074816760 -0.959531386007704378826588254014 0.869658623016273724104507891752 -0.503792511798103581632801706292 -0.027956135001096768522010904690 0.561643385732960576106620464998 -0.930934079088742261198774485820 1.019614329897048365936029767909 -0.798533886373247181467149857781 0.335229320555614385135356769752 0.226903762509706480310356369046 -0.713401291163638484604803124967 0.973413208347256864172436507943 -0.927059334269278223494836765894 0.590525266873730636518757819431 -0.070965839065717559175361373036 -0.467206084612226957286651440882 0.854047396584220686044375270285 -0.967546827211191895479203139985 0.771985564018999093072181949537 -0.329114663937242757363321743469 -0.221368419593328535910359278205 0.705887286216079212763929717767 -0.971706363992990818090333959844 0.935055561826204972852849550691 -0.607493945736369056476178229786 0.092209391903763426867612906790 0.448568812933345661964068540328 -0.844759633561266043422222082881 0.972073839793912153339761061943 -0.791192612668926931185353623732 0.360127605561861074967566764826 0.184130373229081989450151013443 -0.668879319904991498368929114804 0.940237045721428410516296025889 -0.911730111765356565634021990263 0.591611280378837367521782653057 -0.080287121203661021562325572631 -0.461333266503340555519940835438 0.862584230755310432670057707583 -0.996876452625591547018757410115 0.821634941944776486799639769742 -0.391743096074436858433642782984 -0.157749228321221179882627438928 0.654200534991401294604429494939 -0.941807179215542800143623480835 0.930719819010186855123833993275 -0.625354822301169233078610432131 0.122970986333551884905901374623 0.417038996349832047361161357912 -0.823455507512007467418868600362 0.967268629140842772784480985138 -0.802399083544751978713804874133 0.380258131439903113157896541452 0.166447143374078787569914084088 -0.665555945620725286637764384068 0.959746124345772444463875672227 -0.956152306279031138913637732912 0.655659432135422215459641392954 -0.152631879537580505967753197183 -0.394836636082556813320820765512 0.814769038949787804959612458333 -0.975524946149379346138630353380 0.827293514486152181675038264075 -0.417772411821809352971968110069 -0.122911356867897808564649153595 0.623281155420350230222936716018 -0.924632172423912046532734620996 0.931122226834995347921619668341 -0.640030980892703493800865999219 0.142642098664941263663763493241 0.404530739033027664230957043401 -0.829098625254633958547856309451 0.997165813937323730620221340359 -0.855562873414334013055793093372 0.448623292173877585842234338998 0.095788407253709365041238754657 -0.606590410798585666363180735061 0.923423939727270104427248043066 -0.947206928267015135780582113512 0.671356202870264651139109446376 -0.183831045050140223784396198425 -0.360645275155316247239767335486 0.789422797032598433375483182317 -0.966415351319862558909790095640 0.835055477270243540210969968030 -0.436163700638646401053222234623 -0.104905175059390953773430510410 0.617785198396164192402579828922 -0.940825902551284620756177901058 0.972076190217055602360574084742 -0.701444119404286636765277762606 0.213888567153751291138874535136 0.337364257757256869041384561569 -0.779131836202800909241261706484 0.972876188836066746468134169845 -0.858373064523599182962243503425 0.472676221084734504707114410849 0.061603835889612330867226575037 -0.575008287424867314818754948647 0.904714832672305124816602983628 -0.945927343248847640744259024359 0.684959701243015195437635611597 -0.203577373342639811326648668910 -0.346773597678364076113410874314 0.792722111740307266991578671878 -0.993649336286965612075050557905 0.886041613103401348716658958438 -0.503529056488997261986639841780 -0.033710976870905705327086110401 0.556843553980598593433626319893 -0.901608291574267362022965244250 0.960104084040511951414487157308 -0.714793279257812885774114874948 0.244000677743537480735014355560 0.302825981113619357998345549277 -0.752289400957548037851552180655 0.961769164621362970812867843051 -0.864438043161998570518278484087 0.490367883590721087561092872420 0.042933186553304247823348305246 -0.567568260533613089258153650007 0.918198830596379522717143117916 -0.984191272057787114313498477713 0.744514594388773542910087144264 -0.274381843029912697584649095006 -0.278459979654296863049722787764 0.740313257585879958000418810116 -0.966293590386943512804407419026 0.886001191400488163907311900402 -0.525695048837751754966518547008 ], [0.000000000000000000000000000000, 0.006711409395973154216885614431, 0.013422818791946308433771228863, 0.020134228187919461783295105306, 0.026845637583892616867542457726, 0.033557046979865771951789810146, 0.040268456375838923566590210612, 0.046979865771812082120284514986, 0.053691275167785233735084915452, 0.060402684563758392288779219825, 0.067114093959731543903579620292, 0.073825503355704702457273924665, 0.080536912751677847133180421224, 0.087248322147651005686874725598, 0.093959731543624164240569029971, 0.100671140939597308916475526530, 0.107382550335570467470169830904, 0.114093959731543626023864135277, 0.120805369127516784577558439651, 0.127516778523489943131252744024, 0.134228187919463087807159240583, 0.140939597315436232483065737142, 0.147651006711409404914547849330, 0.154362416107382549590454345889, 0.161073825503355694266360842448, 0.167785234899328866697842954636, 0.174496644295302011373749451195, 0.181208053691275156049655947754, 0.187919463087248328481138059942, 0.194630872483221473157044556501, 0.201342281879194617832951053060, 0.208053691275167790264433165248, 0.214765100671140934940339661807, 0.221476510067114107371821773995, 0.228187919463087252047728270554, 0.234899328859060396723634767113, 0.241610738255033569155116879301, 0.248322147651006713831023375860, 0.255033557046979886262505488048, 0.261744966442953030938411984607, 0.268456375838926175614318481166, 0.275167785234899320290224977725, 0.281879194630872464966131474284, 0.288590604026845665153189202101, 0.295302013422818809829095698660, 0.302013422818791954505002195219, 0.308724832214765099180908691778, 0.315436241610738243856815188337, 0.322147651006711388532721684896, 0.328859060402684588719779412713, 0.335570469798657733395685909272, 0.342281879194630878071592405831, 0.348993288590604022747498902390, 0.355704697986577167423405398949, 0.362416107382550312099311895508, 0.369127516778523512286369623325, 0.375838926174496656962276119884, 0.382550335570469801638182616443, 0.389261744966442946314089113002, 0.395973154362416090989995609561, 0.402684563758389235665902106120, 0.409395973154362435852959833937, 0.416107382550335580528866330496, 0.422818791946308725204772827055, 0.429530201342281869880679323614, 0.436241610738255014556585820173, 0.442953020134228214743643547990, 0.449664429530201359419550044549, 0.456375838926174504095456541108, 0.463087248322147648771363037667, 0.469798657718120793447269534227, 0.476510067114093938123176030786, 0.483221476510067138310233758602, 0.489932885906040282986140255161, 0.496644295302013427662046751720, 0.503355704697986627849104479537, 0.510067114093959772525010976096, 0.516778523489932917200917472655, 0.523489932885906061876823969214, 0.530201342281879206552730465773, 0.536912751677852351228636962333, 0.543624161073825495904543458892, 0.550335570469798640580449955451, 0.557046979865771785256356452010, 0.563758389261744929932262948569, 0.570469798657718074608169445128, 0.577181208053691330306378404202, 0.583892617449664474982284900761, 0.590604026845637619658191397320, 0.597315436241610764334097893880, 0.604026845637583909010004390439, 0.610738255033557053685910886998, 0.617449664429530198361817383557, 0.624161073825503343037723880116, 0.630872483221476487713630376675, 0.637583892617449632389536873234, 0.644295302013422777065443369793, 0.651006711409395921741349866352, 0.657718120805369177439558825427, 0.664429530201342322115465321986, 0.671140939597315466791371818545, 0.677852348993288611467278315104, 0.684563758389261756143184811663, 0.691275167785234900819091308222, 0.697986577181208045494997804781, 0.704697986577181190170904301340, 0.711409395973154334846810797899, 0.718120805369127479522717294458, 0.724832214765100624198623791017, 0.731543624161073879896832750092, 0.738255033557047024572739246651, 0.744966442953020169248645743210, 0.751677852348993313924552239769, 0.758389261744966458600458736328, 0.765100671140939603276365232887, 0.771812080536912747952271729446, 0.778523489932885892628178226005, 0.785234899328859037304084722564, 0.791946308724832181979991219123, 0.798657718120805326655897715682, 0.805369127516778471331804212241, 0.812080536912751727030013171316, 0.818791946308724871705919667875, 0.825503355704698016381826164434, 0.832214765100671161057732660993, 0.838926174496644305733639157552, 0.845637583892617450409545654111, 0.852348993288590595085452150670, 0.859060402684563739761358647229, 0.865771812080536884437265143788, 0.872483221476510029113171640347, 0.879194630872483173789078136906, 0.885906040268456429487287095981, 0.892617449664429574163193592540, 0.899328859060402718839100089099, 0.906040268456375863515006585658, 0.912751677852349008190913082217, 0.919463087248322152866819578776, 0.926174496644295297542726075335, 0.932885906040268442218632571894, 0.939597315436241586894539068453, 0.946308724832214731570445565012, 0.953020134228187876246352061571, 0.959731543624161020922258558130, 0.966442953020134276620467517205, 0.973154362416107421296374013764, 0.979865771812080565972280510323, 0.986577181208053710648187006882, 0.993288590604026855324093503441, 1.000000000000000000000000000000, ],150,150,[1,2])
      ad_equals(actual,expected)
    end


end

@testset "Highpass Tests" begin
  q = collect(linspace(0,1,410))
  sindata = sin(60*2*pi*q) + sin(200*2*pi*q)
  ad_sindata = AnalogData([(sin(60*2*pi*q) + sin(200*2*pi*q))'; (sin(50*2*pi*q) + sin(190*2*pi*q))'],q,original_fs=410)

  @test begin
    actual = highpass(sindata, 200.0,410)
    # print(format_full_array(actual))
    expected = [0.000000000000000000000000000000, 0.000000063279720057517188228247, -0.000000556787815483628244424849, 0.000002447037502237382589580358, -0.000007437182243313686567606248, 0.000018127729527215758088950701, -0.000038338230326758409661006000, 0.000073410573006519989642387758, -0.000130552862798369567060019492, 0.000219243035414957141739089597, -0.000351533135797742906942381369, 0.000542361744551471576525347729, -0.000809848600130297401403223212, 0.001175450096092083267923511514, -0.001664112243309027799539889791, 0.002304349780909928108868500729, -0.003128181375785384858018156606, 0.004171064413675893388366855419, -0.005471719987973687124305222085, 0.007071836748058528063221039872, -0.009015781913737733535563201315, 0.011350185582207811957333731812, -0.014123445862215616708468246543, 0.017385248804658328530825528446, -0.021185962575321522216587055709, 0.025576004894820616314410344216, -0.030605229688826042500071622499, 0.036322205031261184382529449977, -0.042773518829063675306123570863, 0.050003103666789755488153446095, -0.058051483491153868521372771738, 0.066955097060894419591647874768, -0.076745636499099254002054237844, 0.087449348163865930905203072143, -0.099086447922444170766098636705, 0.111670545133408016802434303827, -0.125208074926004442328775212445, 0.139697867198766340068871727453, -0.155130717884209623491642560111, 0.171489014977482590040835930267, -0.188746506578465006453981800405, 0.206868067011024947543518237580, -0.225809559504158957610187030696, 0.245517829694371858550994147663, -0.265930697040999308722319938170, 0.286977075158511896191271262069, -0.308577197813793058234210775481, 0.330642847541369744313044520823, -0.353077732236209362870482664221, 0.375777932339616815848870601258, -0.398632359928728474685044602666, 0.421523369091286792542661032712, -0.444327396864331758408184214204, 0.466915628529857407169600946872, -0.489154801015090345828184581478, 0.510907997045660255963639428956, -0.532035476953957142676188141195, 0.552395620044101476331377398310, -0.571845821828830924715703076799, 0.590243440212907644060180700762, -0.607446810205277687444436196529, 0.623316188217785671632498178951, -0.637714751699211768176667192165, 0.650509618133695455277631936042, -0.661572778142356598962692260102, 0.670782082978395033379115375283, -0.678022199387516621982285869308, 0.683185474442860485311257434660, -0.686172844997156916591052322474, 0.686894665303077411877552549413, -0.685271450774829204988236597273, 0.681234647506466672872704748443, -0.674727278863383794771380053135, 0.665704522270370802061734138988, -0.654134284963767242970789084211, 0.639997628155373088354451738269, -0.623289140024677057461133244942, 0.604017275443944678947616466758, -0.582204530738642200837773543753, 0.557887586819726277731490426959, -0.531117384947200066314110245003, 0.501959040485371210671416974947, -0.470491742049426231453423952189, 0.436808551515388443498011383781, -0.401016060460994139269530478487, 0.363234043811548890090534769115, -0.323594989202423688468002183072, 0.282243514093557745781026824261, -0.239335785163953151943871944241, 0.195038798678518809914805842709, -0.149529588824283243830848277867, 0.102994436487523779999442297139, -0.055627937393061217818956976089, 0.007632042492195871205562518469, 0.040784908784910721413208278818, -0.089409283128454086764236308227, 0.138023232409120039099192922549, -0.186405790874674265333865719185, 0.234334073456736818874546202096, -0.281584420860306827716357247482, 0.327933574158531915276881818500, -0.373159911957970547025098539962, 0.417044605908000243221778191582, -0.459372814162286202677165647401, 0.499934890729196945713397326472, -0.538527496179347475724341620662, 0.574954748858498843055997440388, -0.609029341902918242013242888788, 0.640573556657611731246504405135, -0.669420311117200239614533074928, 0.695414125926943516020628521801, -0.718411992828523082721403625328, 0.738284263689681252706975556066, -0.754915415814247148240667684149, 0.768204734315536819089231812541, -0.778066992197266049657855546684, 0.784432976753091870669720719889, -0.787249952842263400754063695786, 0.786482094520409846793995711778, -0.782110747400680872409850508120, 0.774134649093641158401624124963, -0.762570085366807370874653315695, 0.747450877205193986441145170829, -0.728828344901939151334602229326, 0.706771175973472054465673863888, -0.681365139466780012078572781320, 0.652712791062097119620943885820, -0.620933055163606972826073615579, 0.586160682013565192960413696710, -0.548545702378145150213128999894, 0.508252741459239154586668973934, -0.465460245985454212913623450731, 0.420359708237342921677281992743, -0.373154743750154394010820624317, 0.324060125312110147710598084814, -0.273300806833622123015459237649, 0.221110809350950510143718474865, -0.167732106492012061904617326036, 0.113413488543542606556968621589, -0.058409311260060138570882060094, 0.002978282729134967745515671922, 0.052617783556039417203198382822, -0.108115295709332995266471755258, 0.163250142141734250200713063350, -0.217758994120941073990849190523, 0.271380643845157698557102321502, -0.323857254695513518960581222927, 0.374935659878117888421655834463, -0.424368647000155752024852517934, 0.471916146960157378842382058792, -0.517346467692851308406432053744, 0.560437464341183022575876293558, -0.600977616771430356301664232888, 0.638767139031852115849119400082, -0.673618980955421164935614797287, 0.705359748868403357846545986831, -0.733830636080987197544800437754, 0.758888211042445193221794852434, -0.780405141902821064547879359452, 0.798270901076540306817719283572, -0.812392306236706773781008905644, 0.822694016840758601816219197644, -0.829118976236130400536694651237, 0.831628684094513626057221244992, -0.830203441673637243525263329502, 0.824842507554858439533518321696, -0.815564092854320299430526119977, 0.802405341692908891104707436170, -0.785422190782360751803992116038, 0.764689091238798912542051766650, -0.740298721254698310900721480721, 0.712361554568237242968109512731, -0.681005324376602771963007398881, 0.646374476263856134750085402629, -0.608629465216835474627998792130, 0.567945987548525432764279230469, -0.524514193369441161785005078855, 0.478537745374489675853624248703, -0.430232853533185077843370436312, 0.379827277351925729487192029410, -0.327559191345412836771089359900, 0.273676064349806402731246635085, -0.218433491990839473428920314291, 0.162093922903732368112628137169, -0.104925429801749334202121133330, 0.047200421379256021769954543288, 0.010805710523381976267964788008, -0.068815877510611384026972814354, 0.126552647167383514048566439669, -0.183739611897060256540115119606, 0.240102680914864918815254668516, -0.295371436631977346554123187161, 0.349280456894021318348109161889, -0.401570560173516666324644575070, 0.451990103597011860792065363057, -0.500296199548091458098042494385, 0.546255863582012057833026119624, -0.589647193390401391788202545285, 0.630260427038599302385080136446, -0.667898946489535516590763108979, 0.702380281491668645443837704079, -0.733536965249329098170960605785, 0.761217351416869303371015575976, -0.785286394640790197385626925097, 0.805626269612277567944147449452, -0.822136965943165431980332868989, 0.834736807537890257435719831847, -0.843362812121341898219384347613, 0.847971036470235306481413317670, -0.848536809379524692431573384965, 0.845054820293637543038300918852, -0.837539196815366371318134497415, 0.826023440046827595040213054745, -0.810560242343645764862003488815, 0.791221289646661163352803214366, -0.768096902593389807556434334401, 0.741295594223672082989651244134, -0.710943601159731985994483238755, 0.677184248232069685435874362156, -0.640177266858633409185586060630, 0.600098071006008537686682302592, -0.557136876313301998564497807820, 0.511497808613573301528276715544, -0.463397952409618063551732802807, 0.413066266864906439515436886722, -0.360742521388000225712744395423, 0.306676155438914133100070102955, -0.251125042692798783328100853396, 0.194354296675207566247323143216, -0.136634990430269609440472322603, 0.078242826246853747207410378905, -0.019456858953747373230935835409, -0.039441868305826965901417224813, 0.098171688357057196316901581667, -0.156451618311548440454217256956, 0.214002746293211254524635478447, -0.270549569291126501546784766106, 0.325821280820340619666097836671, -0.379553116604704088299371278481, 0.431487608373174680309602990746, -0.481375798714018920954060831718, 0.528978483276089872511249723175, -0.574067328160880463450155275495, 0.616425961708150671469752523990, -0.655851055182241404750698166026, 0.692153258698156581552041188843, -0.725158123424319067673593508516, 0.754706970243995245439805330534, -0.780657607936260600212108329288, 0.802885044946603065874057847395, -0.821282105753160296401915729803, 0.835759904790316476841383064311, -0.846248314507059506972552753723, 0.852696301528879097020308108767, -0.855072140089349175262611879589, 0.853363612454153597219885796221, -0.847578050711928487892521388858, 0.837742283860222314295640444470, -0.823902557577602889793411122810, 0.806124281775468909394533056911, -0.784491715640620590477283258224, 0.759107605807385454887992182194, -0.730092653815690550977990369574, 0.697584953090675585762880928087, -0.661739357284647389256804217439, 0.622726694723792939534234847088, -0.580732980314433100410553834081, 0.535958538560775132886249139119, -0.488617003264130322914837734061, 0.438934335531920960526974795357, -0.387147738026861809590428720185, 0.333504487086723477862193476540, -0.278260795234076374615739268847, 0.221680563848496381407215949366, -0.164034101165977025393871713277, 0.105596873790983883378835628264, -0.046648153516543305885377890263, -0.012530321801662962222234654064, 0.071655658424588541954847187299, -0.130445204195131253532835557962, 0.188617886973504400582868356651, -0.245895533906643815047488033088, 0.302004248893628313155090836517, -0.356675694215414673671205036953, 0.409648364739888748431440035347, -0.460668881737944069243440026185, 0.509493165507946987879961397994, -0.555887610780100627216882003268, 0.599630237228212736866339582775, -0.640511706645085165945374683361, 0.678336348394293020547252126562, -0.712923114088497733575877646217, 0.744106400071078866176321753301, -0.771736876635954027747743566579, 0.795682204159009365262988922041, -0.815827629901883732976841656637, 0.832076581891793676248880728963, -0.844351115680519348494215137180, 0.852592263468159750061658996856, -0.856760362873424718976878011745, 0.856835216714461278542103173095, -0.852816181867662503890414882335, 0.844722214371368518293081706361, -0.832591738375963119622724661895, 0.816482471771911799685028654494, -0.796471181699038632828546724340, 0.772653272309149818930507080950, -0.745142353823373571053423347621, 0.714069715960081397021497195965, -0.679583656671182478881121369341, 0.641848810742888464808686421748, -0.601045362189779330819305869227, 0.557368147065961272446088514698, -0.511025766818115290135438044672, 0.462239573540551285102395695503, -0.411242588879973447468785252568, 0.358278435866323907710295770812, -0.303600142302325570753396277723, 0.247468924401858331174608451875, -0.190152978498003694118878570407, 0.131926157033778135296842037860, -0.073066669792704305730346447945, 0.013855783401319919992400464537, 0.045423569193614066197284273585, -0.104488115187094138258672160191, 0.163055581690472378708633982569, -0.220846088647472404975502513480, 0.277583448623560380408292758148, -0.332996489787719063269122443671, 0.386820387242387597748205507742, -0.438797884101834290149213302357, 0.488680540678292474332522488112, -0.536229943723668944777216438524, 0.581218800796911017059187543055, -0.623432060199185511528696679306, 0.662667944172690814852444418648, -0.698738874041378910106914190692, 0.731472409628154185412540755351, -0.760712061609905454417912551435, 0.786318011604439925932297228428, -0.808167826642161135630715307343, 0.826157017019741979346747484669, -0.840199523191877517547254683450, 0.850228170193875087967683157331, -0.856194949757509204957273141190, 0.858071254374994762947892468219, -0.855848048022976315429843907623, 0.849535864259627349071024582372, -0.839164777004228312762279529124, 0.824784276963858919984318163188, -0.806462990207007179854770129168, 0.784288384885176048655353042705, -0.758366356727737667142719146796, 0.728820684552848430115545852459, -0.695792482157451375179846309038, 0.659439510336282785907258130464, -0.619935396435600249986919152434, 0.577468850711195358371696784161, -0.532242735714104853173012088519, 0.484473085949010007222881313282, -0.434388117833969022996143394266, 0.382227099171487949558212449119, -0.328239212019868942249445353809, 0.272682394598660282625246509269, -0.215822063213891329747085023882, 0.157929866498321774814783680085, -0.099282405747556728980995899292, 0.040159868527559747231059361638, 0.019155274493449506861830755611, -0.078379617701826900799666475450, 0.137230212321042793766068257355, -0.195425874588430442679864995625, 0.252688544762505185037326782549, -0.308744640974697726054642998861, 0.363326320598753027546479188459, -0.416172790349445043123211007696, 0.467031561715507637089217496396, -0.515659615913436675249670315679, 0.561824605973420099225279500388, -0.605305959034162510690180170059, 0.645895898981995064680461382522, -0.683400485020224768284435867827, 0.717640514347008151574414114293, -0.748452361691744338934029201482, 0.775688805399907366222578275483, -0.799219694139652325759470841149, 0.818932568980049846452118345042, -0.834733237281077067315493422939, 0.846546178429915086027790493972, -0.854314921782356462287566500891, 0.858002340209396252568296858954, -0.857590781789958289671460534009, 0.853082185759069355768247078231, -0.844498080827732255926321158768, 0.831879441640509975641748496855, -0.815286534693696607334345571871, 0.794798620770578279071116867271, -0.770513546281784034164274999057, 0.742547321710313457110430590546, -0.711033541860292661596076868591, 0.676122732518888880370866445446, -0.637981675035957707109446346294, 0.596792571721388442895772641350, -0.552752177303325376023224180244, 0.506070894342633081919302640017, -0.456971723231581195001638207032, 0.405689215490019017273937151913, -0.352468375343825024437194315396, 0.297563443689414952597616093044, -0.241236716275035983914065695899]
    actual ≈ expected
  end

@test begin
  actual = highpass(ad_sindata, 200.0)
  expected = AnalogData([0.000000000000000000000000000000 0.000000063279720057517188228247 -0.000000556787815483628244424849 0.000002447037502237382589580358 -0.000007437182243313684873540353 0.000018127729527215751312687123 -0.000038338230326758382555951687 0.000073410573006519935432279134 -0.000130552862798369431534747931 0.000219243035414956870688546475 -0.000351533135797742527471620999 0.000542361744551470926004044237 -0.000809848600130296208780833478 0.001175450096092080882678732046 -0.001664112243309023896412068844 0.002304349780909922471017203804 -0.003128181375785377485443383705 0.004171064413675883847387737546 -0.005471719987973674981240890247 0.007071836748058514185433232058 -0.009015781913737716188328441547 0.011350185582207791140652020090 -0.014123445862215592422339582868 0.017385248804658297305802960864 -0.021185962575321487522117536173 0.025576004894820578150493872727 -0.030605229688825997397261247102 0.036322205031261135810272122626 -0.042773518829063612856078435698 0.050003103666789686099214407022 -0.058051483491153792193539828759 0.066955097060894336324921027881 -0.076745636499099170735327390958 0.087449348163865833760688417442 -0.099086447922444045866008366374 0.111670545133407864146768417868 -0.125208074926004275795321518672 0.139697867198766118024266802422 -0.155130717884209373691462019451 0.171489014977482312485079773978 -0.188746506578464728898225644116 0.206868067011024669987762081291 -0.225809559504158652298855258778 0.245517829694371525484086760116 -0.265930697040998975655412550623 0.286977075158511674146666337037 -0.308577197813792947211908312966 0.330642847541369633290742058307 -0.353077732236209362870482664221 0.375777932339616871360021832515 -0.398632359928728585707347065181 0.421523369091287014587265957744 -0.444327396864332035963940370493 0.466915628529857629214205871904 -0.489154801015090345828184581478 0.510907997045660033919034503924 -0.532035476953956809609280753648 0.552395620044100810197562623216 -0.571845821828830036537283376674 0.590243440212906533837156075606 -0.607446810205276244154504183825 0.623316188217784006297961241216 -0.637714751699209880797525329399 0.650509618133693456876187610760 -0.661572778142355044650457784883 0.670782082978393701111485825095 -0.678022199387515400736958781636 0.683185474442859375088232809503 -0.686172844997155917390330159833 0.686894665303076412676830386772 -0.685271450774828094765211972117 0.681234647506465451627377660770 -0.674727278863382462503750502947 0.665704522270369358771802126284 -0.654134284963765910703159534023 0.639997628155372089153729575628 -0.623289140024676280305016007333 0.604017275443944234858406616695 -0.582204530738641978793168618722 0.557887586819726166709187964443 -0.531117384947200177336412707518 0.501959040485371543738324362494 -0.470491742049426786564936264767 0.436808551515389054120674927617 -0.401016060460994860914496484838 0.363234043811549611735500775467 -0.323594989202424521135270651939 0.282243514093558689470597755644 -0.239335785163954178900169722510 0.195038798678519864626679236608 -0.149529588824284326298297287394 0.102994436487524904100254730110 -0.055627937393062362736451120782 0.007632042492197065562675728501 0.040784908784909479351199479424 -0.089409283128452782252182373668 0.138023232409118651320412141104 -0.186405790874672822043933706482 0.234334073456735264562311726877 -0.281584420860305106870669078489 0.327933574158530027897739955733 -0.373159911957968493112502983422 0.417044605907998133798031403785 -0.459372814162284037742267628346 0.499934890729194836289650538674 -0.538527496179345477322897295380 0.574954748858497066699158040137 -0.609029341902916687701008413569 0.640573556657610510001177317463 -0.669420311117199351436113374803 0.695414125926942849886813746707 -0.718411992828522749654496237781 0.738284263689681252706975556066 -0.754915415814247592329877534212 0.768204734315537818289953975182 -0.778066992197267714992392484419 0.784432976753093869071165045170 -0.787249952842265843244717871130 0.786482094520412955418464662216 -0.782110747400684647168134233652 0.774134649093645710316025088105 -0.762570085366812810967473978963 0.747450877205200092667780609190 -0.728828344901945923695052442781 0.706771175973479492959938852437 -0.681365139466788116706652544963 0.652712791062105890382838424557 -0.620933055163616409721782929410 0.586160682013575184967635323119 -0.548545702378155475287258013850 0.508252741459249812727705375437 -0.465460245985465259632718471039 0.420359708237354134929830706824 -0.373154743750165773796823032171 0.324060125312121527496600492668 -0.273300806833633502801461645504 0.221110809350961751151842804575 -0.167732106492023191890439193230 0.113413488543553583887124602825 -0.058409311260070970184266059277 0.002978282729145645835872047158 0.052617783556028904778933963371 -0.108115295709322684070130549117 0.163250142141724119415613358797 -0.217758994120931220761505642258 0.271380643845148039616788082640 -0.323857254695504026553720677839 0.374935659878108618059400214406 -0.424368647000146703707201822908 0.471916146960148441547033826282 -0.517346467692842648666839977523 0.560437464341174584880889142369 -0.600977616771422140651282006729 0.638767139031844011221039636439 -0.673618980955413615419047346222 0.705359748868396030374583460798 -0.733830636080979981095140374237 0.758888211042437976772134788916 -0.780405141902813737075916833419 0.798270901076533090368059220054 -0.812392306236699557331348842126 0.822694016840751274344256671611 -0.829118976236123184087034587719 0.831628684094506409607561181474 -0.830203441673629805030998340953 0.824842507554850890016950870631 -0.815564092854312971958563593944 0.802405341692901452610442447622 -0.785422190782353535354332052520 0.764689091238791696092391703132 -0.740298721254691316495666342234 0.712361554568230470607659299276 -0.681005324376595999602557185426 0.646374476263849806478845039237 -0.608629465216829479423665816284 0.567945987548519659604551179655 -0.524514193369435610669881953072 0.478537745374484457805408510467 -0.430232853533180192862062085624 0.379827277351921122061639835010 -0.327559191345408340367839628016 0.273676064349802128372601828232 -0.218433491990835393359304816840 0.162093922903728454576466333492 -0.104925429801745573321625215613 0.047200421379252371911761088086 0.010805710523385539389984444369 -0.068815877510614853473924767968 0.126552647167386900228791546397 -0.183739611897063559453613379446 0.240102680914868082950874850212 -0.295371436631980344156289675084 0.349280456894024093905670724780 -0.401570560173519275348752444188 0.451990103597014247771568307144 -0.500296199548093678544091744698 0.546255863582013945212167982390 -0.589647193390403057122739483020 0.630260427038600634652709686634 -0.667898946489536737836090196652 0.702380281491669755666862329235 -0.733536965249330208393985230941 0.761217351416870413594040201133 -0.785286394640791529653256475285 0.805626269612279233278684387187 -0.822136965943167541404079656786 0.834736807537892699926374007191 -0.843362812121344562754643447988 0.847971036470238304083579805592 -0.848536809379527912078344797919 0.845054820293640984729677256837 -0.837539196815370257098720685462 0.826023440046831924910009092855 -0.810560242343650538821009376989 0.791221289646666381401018952602 -0.768096902593395469693859922700 0.741295594223678078193984219979 -0.710943601159738314265723602148 0.677184248232076457796324575611 -0.640177266858640625635246124148 0.600098071006016198225552216172 -0.557136876313310103192577571463 0.511497808613581739223263866734 -0.463397952409626723291324879028 0.413066266864915265788482656717 -0.360742521388009218519243859191 0.306676155438923292440023260497 -0.251125042692808164712658935969 0.194354296675217114165334919562 -0.136634990430279240625210945836 0.078242826246863406147724617767 -0.019456858953757004415674458642 -0.039441868305817424922299352374 0.098171688357047801054555691280 -0.156451618311539253358688483786 0.214002746293202317229287245937 -0.270549569291117952829495152400 0.325821280820332459526866841770 -0.379553116604696372249350133643 0.431487608373167352837640464713 -0.481375798714011982060156924490 0.528978483276083544240009359783 -0.574067328160874801312729687197 0.616425961708145786488444173301 -0.655851055182237185903204590431 0.692153258698153139860664850858 -0.725158123424316736205241795687 0.754706970243994246239083167893 -0.780657607936261044301318179350 0.802885044946604620186292322614 -0.821282105753163182981779755210 0.835759904790320362621969252359 -0.846248314507064391953861104412 0.852696301528884870180036159582 -0.855072140089355947623062093044 0.853363612454161368781058172317 -0.847578050711936925587508540048 0.837742283860231196079837445723 -0.823902557577612104644515511609 0.806124281775478457312544833258 -0.784491715640630471462202422117 0.759107605807395668939818733634 -0.730092653815701098096724308562 0.697584953090686465948522254621 -0.661739357284658602509352931520 0.622726694723804818920598336263 -0.580732980314445201841522248287 0.535958538560787567384124940872 -0.488617003264142979457318460845 0.438934335531933728091757984657 -0.387147738026874799199816834516 0.333504487086736745027337747160 -0.278260795234089919336639695757 0.221680563848510064905994454421 -0.164034101165990708892650218331 0.105596873790997497488675094246 -0.046648153516556822850702701544 -0.012530321801649596177852252765 0.071655658424575385812005379194 -0.130445204195118347190174290517 0.188617886973491827307114476753 -0.245895533906631602594217156366 0.302004248893616544791029809858 -0.356675694215403349396353860357 0.409648364739877979268101171328 -0.460668881737933855191613474744 0.509493165507937328939647159132 -0.555887610780091634410382539500 0.599630237228204521215957356617 -0.640511706645077394384202307265 0.678336348394285915119894525560 -0.712923114088491183260032357794 0.744106400071073204038896165002 -0.771736876635949031744132753374 0.795682204159005368460100271477 -0.815827629901880513330070243683 0.832076581891791233758226553618 -0.844351115680517905204283124476 0.852592263468159083927844221762 -0.856760362873424718976878011745 0.856835216714462055698220410704 -0.852816181867663947180346895038 0.844722214371370405672223569127 -0.832591738375965562113378837239 0.816482471771914686264892679901 -0.796471181699042074519923062326 0.772653272309153704711093268998 -0.745142353823377789900916923216 0.714069715960085948935898159107 -0.679583656671187252840127257514 0.641848810742893460812297234952 -0.601045362189784548867521607463 0.557368147065966490494304252934 -0.511025766818120619205956245423 0.462239573540556558661762664997 -0.411242588879978776539303453319 0.358278435866329236780813971563 -0.303600142302330899823914478475 0.247468924401863632489551036997 -0.190152978498008995433821155530 0.131926157033783436611784622983 -0.073066669792709579289713417438 0.013855783401325131101722298865 0.045423569193608931415795382236 -0.104488115187089058988334500100 0.163055581690467354949447553736 -0.220846088647467408971891700276 0.277583448623555439915833176201 -0.332996489787714233798965324240 0.386820387242382823789199619569 -0.438797884101829460679056182926 0.488680540678287644862365368681 -0.536229943723664170818210550351 0.581218800796906354122484117397 -0.623432060199180848591993253649 0.662667944172686262938043455506 -0.698738874041374691259420615097 0.731472409628150410654257029819 -0.760712061609901901704233750934 0.786318011604436595263223352958 -0.808167826642157804961641431873 0.826157017019738648677673609200 -0.840199523191873964833575882949 0.850228170193870980142492044251 -0.856194949757504430998267253017 0.858071254374988878765861954889 -0.855848048022969321024788769137 0.849535864259619355465247281245 -0.839164777004218986888872677810 0.824784276963848594910189149232 -0.806462990206995744557616490056 0.784288384885163392112872315920 -0.758366356727723789354911332339 0.728820684552833442104713412846 -0.695792482157435610012896631815 0.659439510336266243584191215632 -0.619935396435583152552339925023 0.577468850711177483781000319141 -0.532242735714086423470803310920 0.484473085948991077920311454363 -0.434388117833949594093212454027 0.382227099171468132077222890075 -0.328239212019848847212699638476 0.272682394598640076566198331420 -0.215822063213871040421309999147 0.157929866498301568755735502236 -0.099282405747536620066462376144 0.040159868527539860361130763522 0.019155274493469123114897101345 -0.078379617701846190924719337545 0.137230212321061667557486885016 -0.195425874588448844626498157595 0.252688544762523059628023247569 -0.308744640974715101044978382561 0.363326320598769791914151028323 -0.416172790349461252379370534982 0.467031561715523013678108554814 -0.515659615913451219171292905230 0.561824605973433643946179927298 -0.605305959034174945188055971812 0.645895898982006388955312559119 -0.683400485020234982336262419267 0.717640514347017255403216040577 -0.748452361691752221517504040094 0.775688805399914360627633413969 -0.799219694139658543008408742025 0.818932568980055286544939008309 -0.834733237281081841274499311112 0.846546178429919082830679144536 -0.854314921782359903978942838876 0.858002340209399028125858421845 -0.857590781789960399095207321807 0.853082185759070688035876628419 -0.844498080827732922060135933862 0.831879441640510197686353421886 -0.815286534693696385289740646840 0.794798620770577612937302092178 -0.770513546281782923941250373900 0.742547321710311902798196115327 -0.711033541860290774216935005825 0.676122732518886437880212270102 -0.637981675035954820529582320887 0.596792571721385556315908615943 -0.552752177303322378421057692321 0.506070894342630195339438614610 -0.456971723231578308421774181625 0.405689215490016297227526820279 -0.352468375343822526435388908794 0.297563443689412621129264380215 -0.241236716275033930001470139359;0.000000000000000000000000000000 0.000000066932087258518232082638 -0.000000611172415994284501549101 0.000002860488371934106485239627 -0.000009448231495926972552503245 0.000025218862328148437227000322 -0.000058205141132299378708362531 0.000120574373832883229604000241 -0.000229478328590217481959198653 0.000407660824292099810677719729 -0.000683719234723637611997326680 0.001092014484372551275104257229 -0.001672130200704249414558888454 0.002467915272749999448104185618 -0.003526145114576761333685661626 0.004894798869548506667359610844 -0.006621093647939881206287981996 0.008749327020455600206760848891 -0.011318628510305881601505362255 0.014360785670716441631000748202 -0.017898193722033918506841843055 0.021942085635027464701751753751 -0.026491144682060437098858329819 0.031530535909528305260618452621 -0.037031487208707289382481064877 0.042951410201574315161909822791 -0.049234576557136831842509394619 0.055813379121169563734650154174 -0.062610068713701200193710860731 0.069538951172793850297182416398 -0.076508947351337411313387804057 0.083426367751033569941654377544 -0.090197847995720503710970206157 0.096733263072136449478577446826 -0.102948504558324979707428781239 0.108768035154167344580322662750 -0.114127043519979792796092965546 0.118973162209567315250602348442 -0.123267658678948316408607865924 0.126986018145722301397881892626 -0.130117961977850638000120397919 0.132666849571382944317221586061 -0.134648520657810188971836851124 0.136089668881558906177176027086 -0.137025768779637541205929096577 0.137498721990994721142698153926 -0.137554315161210027884663986697 0.137239591165571162001413085818 -0.136600323172946708227826206894 0.135678652222072315680634346791 -0.134511031890729187976418756989 0.133126598144851837624003110250 -0.131545982328839405894882474968 0.129780684757782149851834674337 -0.127833000689687448225839716542 0.125696480484243200415050978336 -0.123356950457721700753488391911 0.120793971935814092866223745659 -0.117982696288587887711862833839 0.114896027638791864422529442891 -0.111506924998825654449241540078 0.107790787628308015744238446132 -0.103727756473624879718364866221 0.099304803163415680811176855514 -0.094517545725299828562881998550 0.089371627111098139728539990756 -0.083883625067122796759022662627 0.078081442701063735745137250888 -0.072004105504968315965008684998 0.065701033949771753261970275162 -0.059230772886760423012741938464 0.052659236590052165005726436675 -0.046057594198719568889810460632 0.039499828232600217581271806466 -0.033060132425835664360391774608 0.026810265477642696019255907913 -0.020816946427950025477748852154 0.015139482019413145683084387372 -0.009827686104763510774318113761 0.004920202567051802471087551538 -0.000443349028642380676469569867 -0.003589528373531525838602274092 0.007178102609119114962954455450 -0.010334530715308851839262516137 0.013082396305691393681436274221 -0.015455118502066343688650107424 0.017493964346219182531827485150 -0.019245741866839725237037228567 0.020760257923351909531417547328 -0.022087727482047535276787897374 0.023276200244260556587727606370 -0.024369154778222209406512988039 0.025403401724455022814286309085 -0.026407336759258753094981031495 0.027399689294534800704239430047 -0.028388796898314569427945741609 0.029372417776100223640867170616 -0.030338145959401298379365385927 0.031264341718963542526843468750 -0.032121560913855873309330490883 0.032874425294039368028453651505 -0.033483781569472070849258216185 0.033909103803828354040117432078 -0.034110979899876159304739076106 0.034053544126376289469249059039 -0.033706785661707545920240391979 0.033048550011535803017093115841 -0.032066171676376681309861282898 0.030757661180735175465716935150 -0.029132333716265560591418548597 0.027210911334844361392226730345 -0.025025046490126514470153651359 0.022616285117040980934266514168 -0.020034565643911581012126532642 0.017336259327087547715828819150 -0.014581893891584006561767949961 0.011833668741397858348296523445 -0.009152837984375173860374097501 0.006597154902530452322273468724 -0.004218451948921691889438090328 0.002060481033237438266980667834 -0.000157160613527341553891797377 -0.001468750524188120864382822717 0.002806434739788939754928653869 -0.003857225513628599004173347353 0.004634273433498614126746506514 -0.005161620158407024053226486160 0.005472782300673243935373868396 -0.005608899589228385357264627942 0.005616505209232161913157632682 -0.005545092042272026754134994775 0.005444536356657719670948392121 -0.005362525772887277546174811249 0.005342147402073458076210421552 -0.005419692139720662382718074923 0.005622843086183720515136563733 -0.005969312278950198065452514840 0.006465966766646111252292428162 -0.007108546834565566269192871118 0.007881927030898877584164097243 -0.008760934424719528379466026990 0.009711703375605040475249118970 -0.010693439779761068977870230867 0.011660569809514150993456915728 -0.012565132974035947074908925458 0.013359283271720168509433257498 -0.013997829983125247704789373415 0.014440626496228611830296983953 -0.014654724304803523615703397809 0.014616196543539600183336801820 -0.014311485656310796166224008630 0.013738272860891539636774005828 -0.012905784947106075863376695168 0.011834514456645161759040796312 -0.010555417141712470849301830356 0.009108559222168426464105728257 -0.007541324066648879415053485786 0.005906268986778238222479231467 -0.004258688967057768989810107030 0.002654073143105038085076685661 -0.001145531806899574697386490207 -0.000218678080099470712426013019 0.001397362302392782772153534410 -0.002358291278320746864327617232 0.003079650691659051395948631935 -0.003550975722323169211230853293 0.003773564516766902791899962466 -0.003760285020634551288870595087 0.003534838048497128404346057096 -0.003130502508073532749038880851 0.002588387101157815350233049045 -0.001955339927498327655397414304 0.001281563549062186445001709778 -0.000618068438769029402171661935 0.000014124451067901011485435266 0.000485227877449206468178644069 -0.000841425376738618737391950386 0.001024298385636746586482836996 -0.001013590516880301774585437791 0.000799944682510704118544309082 -0.000385367152167876076459401835 -0.000216876788583301647033579895 0.000982955764208064434669931408 -0.001879658193168312488655069536 0.002866073985016322211993866631 -0.003895660373008802673105988035 0.004918567841010277469360190139 -0.005884169727335137288493083219 0.006743606619750716103800503021 -0.007452251505134747412706364145 0.007971990466268712854924771705 -0.008273148959983302186405040857 0.008336032588056206324433894395 -0.008151969643778076216045214153 0.007723790824542258598439659067 -0.007065776244765707876649418751 0.006203006487902750810958796279 -0.005170189215371562112266712319 0.004010027032206235284017559195 -0.002771155358797813481053218254 0.001505817867097245790417026079 -0.000267350595558564453277372586 -0.000892404789594607107845736227 0.001925582518445249739780233966 -0.002790612916561872013099243617 0.003454220081914759730989938902 -0.003892999563677831259544959153 0.004094543558875209966763097924 -0.004057991997842975290256006815 0.003794032327379727193711334010 -0.003324342503936763074112725747 0.002680462959773430645094016711 -0.001902219140863027320789702124 0.001035719803033955353777084696 -0.000131040149089764235189672914 -0.000760257515808329068646154170 0.001587708214992076182978109067 -0.002304450711609431524939939351 0.002869546760932018079209848693 -0.003250033039763665278915061307 0.003422540367527474557129973931 -0.003374458128111130963272534800 0.003104567390181191960385476136 -0.002623081203399511840412827723 0.001951152983575012937050852102 -0.001119817514148593005918197463 0.000168440470538481232385535913 0.000857220527232737837183829122 -0.001907308498608876329294403718 0.002930338137049104049736136801 -0.003875750661499630968231944195 0.004696448021797366631502335110 -0.005351121820241428947428907748 0.005806324935543788132163989246 -0.006038151565688598676473475280 0.006033424909750987122358800718 -0.005790390671051247849232535003 0.005318817486186963941485750240 -0.004639534839167716931407348113 0.003783444272550066239668709045 -0.002789998032553314341597250348 0.001705285551197301087064661651 -0.000579782731031791348161319455 -0.000534133492664400164745552857 0.001584730767853816460477567318 -0.002523467404876912102695829532 0.003307370170040659085319845190 -0.003901122333785111886278462734 0.004278807751053203059510288142 -0.004425158622282101932021713964 0.004336291760119678935503362283 -0.004019896514637445739115406695 0.003494819454633106906027428806 -0.002790132575593270818081759188 0.001943681536928784907986011987 -0.001000190787442372135004897693 0.000009061465737504557295032247 0.000978094958466095652088734269 -0.001910012937968679717221087699 0.002738302339442648218603704180 -0.003419864804514635356347262984 0.003919012410034058285779323683 -0.004209239122748223080328067169 0.004274543389956712326205323649 -0.004110201751199362221744770807 0.003723019496371665279510487778 -0.003130988465400028758489625602 0.002362387543230404750305151396 -0.001454401171133500730858756356 0.000451261270591712883477886198 0.000597935850599238573332971924 -0.001641652616469732855336571831 0.002628480219649543224436083477 -0.003509667177513380031950163129 0.004241542937513841787788848592 -0.004787689524302298979541170354 0.005120731414728272451464263781 -0.005223714592794668348796349733 0.005090943485711146333783094775 -0.004728265655498600436579259565 0.004152808197414936848546052062 -0.003392121514720678084053862023 0.002482837064256775572862467882 -0.001468870092776208531940018709 0.000399242491032936273193110210 0.000674311839715839534889485485 -0.001699906108916909505679448955 0.002628058787242621308771761690 -0.003414115297646257585900686493 0.004020465780774143231546258193 -0.004418383465974253659913628667 0.004589435486645952917694746276 -0.004526401017086523377586093630 0.004233602170953610147052792456 -0.003726697560078562256741241399 0.003031902681151905226686338324 -0.002184675682319819640248015347 0.001227979495201753220787188603 -0.000210139988363928516658732382 -0.000817544781426303998964066899 0.001803330671175951095339118346 -0.002697606710651438265829993313 0.003455334158102642532622850169 -0.004038277012961305478810913883 0.004416904627327794888302925358 -0.004571833386782500098510784170 0.004494801510931737548171227559 -0.004189073941546604326613412184 0.003669270984360516792838202704 -0.002960664418666374142485864240 0.002097911540505686261992579489 -0.001123347026478580630223791381 0.000084898939957803106230380119 0.000966299388894820750900427342 -0.001978420497133797934657950535 0.002901512301463956416958112072 -0.003689976530847714503852374790 0.004304806428088327370506949165 -0.004715534653290115972568141700 0.004901733762135467714626813063 -0.004854021808686498004603571133 0.004574546276911808234677536689 -0.004076862721840277328788637590 0.003385277029298743457080833608 -0.002533652932160007122119882439 0.001563725120339548406434015959 -0.000523058833509503352636460516 -0.000537307473989860704538523706 0.001565385107136359546520232300 -0.002510784959190646460636120452 0.003327223358706536508744289193 -0.003974794930830785957831530197 0.004421938806628346839422416537 -0.004647010657677322353897864105 0.004639330410923246487964188844 -0.004399719740617842080043775610 0.003940460527440931004505841884 -0.003284671273425943203300159112 0.002465181847668000778700525544 -0.001522895962415030720465969338 0.000504767984897793353833705954 0.000538505441917912414974412005 -0.001555011297539832856168251496 0.002494172540888776705425566860 -0.003309249693774817761143802741 0.003959663954847866124131527954 -0.004412984032987644737733301525 0.004646544486231631194972369059 -0.004648563736487360334437290987 0.004418715160195543605048396074 -0.003968162472756454547950788481 0.003318992299439745777972499141 -0.002503126567369669958074140936 0.001560755308694512701744860905 -0.000538331663719806077783580633 -0.000513707378605267870642914207 0.001543438921502372079830323059 -0.002500029726049556814265750759 0.003336230407301819366611139728 -0.004010728240877190452218226113 0.004490183063068719539201456570 -0.004750867638940238155131901010 0.004779859054182764195595201073 -0.004575660533078164567133416796 0.004148284103217641377581159645 -0.003518763763079616260776028014 0.002718099806253889035023707521 -0.001785746363393032410185612413 0.000767654119100495517524773703 0.000286004694189614559144546613 -0.001323297558050027817461158364 0.002293115373205486997448820929 -0.003147686852519372170677858236 0.003844933747068266655100288176 -0.004350565155367470439318200448 0.004639752005854764181635996323 -0.004698364074282851583774789361 0.004523670196407727356335826130 -0.004124456952065476238178387547 0.003520612743724397825789695915 -0.002742132024326477020281789265 0.001827630747838293687884680949 -0.000822451981604563125624607345 -0.000223594599015487901973869844 0.001258681445191747608550181248 -0.002231524408998550659810611307 0.003093930998218208990729882757 -0.003803162932312636503040526037 0.004324062511311805440117339572 -0.004630789179436204348883077131 0.004708084048059836893007634728 -0.004552043297351287230723126953 0.004170296232514793428880484072 -0.003581630743483881374605859449 0.002815076540585345708095355022 -0.001908451628568492855833604871 0.000906509292299515975765977771 0.000141277137367072912763413250 -0.001183169610239968557244272240 0.002167703357000136041299320766 -0.003046246717639716598824417559 0.003775399509486176800876489068 -0.004319128541588166010634086689 0.004650566910163233050323761120 -0.004753324773719588142162351119 0.004622305850429187304428957361 -0.004263967783609795558774635538 0.003695985422999655857501100087 -0.002946395558797243810489341342 0.002052204410349127254586942826 ], [0.000000000000000000000000000000, 0.002444987775061124683773083888, 0.004889975550122249367546167775, 0.007334963325183374051319251663, 0.009779951100244498735092335551, 0.012224938875305624286227157427, 0.014669926650366748102638503326, 0.017114914425427871919049849225, 0.019559902200488997470184671101, 0.022004889975550123021319492977, 0.024449877750611248572454314854, 0.026894865525672370654142184776, 0.029339853300733496205277006652, 0.031784841075794621756411828528, 0.034229828850855743838099698451, 0.036674816625916872858681472280, 0.039119804400977994940369342203, 0.041564792176039117022057212125, 0.044009779951100246042638985955, 0.046454767726161368124326855877, 0.048899755501222497144908629707, 0.051344743276283619226596499630, 0.053789731051344741308284369552, 0.056234718826405870328866143382, 0.058679706601466992410554013304, 0.061124694376528114492241883227, 0.063569682151589243512823657056, 0.066014669926650365594511526979, 0.068459657701711487676199396901, 0.070904645476772609757887266824, 0.073349633251833745717362944561, 0.075794621026894867799050814483, 0.078239608801955989880738684406, 0.080684596577017111962426554328, 0.083129584352078234044114424250, 0.085574572127139370003590101987, 0.088019559902200492085277971910, 0.090464547677261614166965841832, 0.092909535452322736248653711755, 0.095354523227383858330341581677, 0.097799511002444994289817259414, 0.100244498777506116371505129337, 0.102689486552567238453192999259, 0.105134474327628360534880869182, 0.107579462102689482616568739104, 0.110024449877750604698256609026, 0.112469437652811740657732286763, 0.114914425427872862739420156686, 0.117359413202933984821108026608, 0.119804400977995106902795896531, 0.122249388753056228984483766453, 0.124694376528117364943959444190, 0.127139364303178487025647314113, 0.129584352078239595229547376221, 0.132029339853300731189023053957, 0.134474327628361867148498731694, 0.136919315403422975352398793802, 0.139364303178484111311874471539, 0.141809290953545219515774533647, 0.144254278728606355475250211384, 0.146699266503667491434725889121, 0.149144254278728599638625951229, 0.151589242053789735598101628966, 0.154034229828850843802001691074, 0.156479217603911979761477368811, 0.158924205378973115720953046548, 0.161369193154034223924853108656, 0.163814180929095359884328786393, 0.166259168704156468088228848501, 0.168704156479217604047704526238, 0.171149144254278740007180203975, 0.173594132029339848211080266083, 0.176039119804400984170555943820, 0.178484107579462092374456005928, 0.180929095354523228333931683665, 0.183374083129584364293407361401, 0.185819070904645472497307423509, 0.188264058679706608456783101246, 0.190709046454767716660683163354, 0.193154034229828852620158841091, 0.195599022004889988579634518828, 0.198044009779951096783534580936, 0.200488997555012232743010258673, 0.202933985330073340946910320781, 0.205378973105134476906385998518, 0.207823960880195612865861676255, 0.210268948655256721069761738363, 0.212713936430317857029237416100, 0.215158924205378965233137478208, 0.217603911980440101192613155945, 0.220048899755501209396513218053, 0.222493887530562345355988895790, 0.224938875305623481315464573527, 0.227383863080684589519364635635, 0.229828850855745725478840313372, 0.232273838630806833682740375480, 0.234718826405867969642216053217, 0.237163814180929105601691730953, 0.239608801955990213805591793061, 0.242053789731051349765067470798, 0.244498777506112457968967532906, 0.246943765281173593928443210643, 0.249388753056234729887918888380, 0.251833740831295838091818950488, 0.254278728606356974051294628225, 0.256723716381418110010770305962, 0.259168704156479190459094752441, 0.261613691931540326418570430178, 0.264058679706601462378046107915, 0.266503667481662598337521785652, 0.268948655256723734296997463389, 0.271393643031784814745321909868, 0.273838630806845950704797587605, 0.276283618581907086664273265342, 0.278728606356968222623748943079, 0.281173594132029358583224620816, 0.283618581907090439031549067295, 0.286063569682151574991024745032, 0.288508557457212710950500422769, 0.290953545232273846909976100505, 0.293398533007334982869451778242, 0.295843520782396063317776224721, 0.298288508557457199277251902458, 0.300733496332518335236727580195, 0.303178484107579471196203257932, 0.305623471882640607155678935669, 0.308068459657701687604003382148, 0.310513447432762823563479059885, 0.312958435207823959522954737622, 0.315403422982885095482430415359, 0.317848410757946231441906093096, 0.320293398533007311890230539575, 0.322738386308068447849706217312, 0.325183374083129583809181895049, 0.327628361858190719768657572786, 0.330073349633251855728133250523, 0.332518337408312936176457697002, 0.334963325183374072135933374739, 0.337408312958435208095409052476, 0.339853300733496344054884730213, 0.342298288508557480014360407949, 0.344743276283618560462684854429, 0.347188264058679696422160532165, 0.349633251833740832381636209902, 0.352078239608801968341111887639, 0.354523227383863104300587565376, 0.356968215158924184748912011855, 0.359413202933985320708387689592, 0.361858190709046456667863367329, 0.364303178484107592627339045066, 0.366748166259168728586814722803, 0.369193154034229809035139169282, 0.371638141809290944994614847019, 0.374083129584352080954090524756, 0.376528117359413216913566202493, 0.378973105134474352873041880230, 0.381418092909535433321366326709, 0.383863080684596569280842004446, 0.386308068459657705240317682183, 0.388753056234718841199793359920, 0.391198044009779977159269037656, 0.393643031784841057607593484136, 0.396088019559902193567069161872, 0.398533007334963329526544839609, 0.400977995110024465486020517346, 0.403422982885085601445496195083, 0.405867970660146681893820641562, 0.408312958435207817853296319299, 0.410757946210268953812771997036, 0.413202933985330089772247674773, 0.415647921760391225731723352510, 0.418092909535452306180047798989, 0.420537897310513442139523476726, 0.422982885085574578098999154463, 0.425427872860635714058474832200, 0.427872860635696794506799278679, 0.430317848410757930466274956416, 0.432762836185819066425750634153, 0.435207823960880202385226311890, 0.437652811735941338344701989627, 0.440097799511002418793026436106, 0.442542787286063554752502113843, 0.444987775061124690711977791580, 0.447432762836185826671453469316, 0.449877750611246962630929147053, 0.452322738386308043079253593532, 0.454767726161369179038729271269, 0.457212713936430314998204949006, 0.459657701711491450957680626743, 0.462102689486552586917156304480, 0.464547677261613667365480750959, 0.466992665036674803324956428696, 0.469437652811735939284432106433, 0.471882640586797075243907784170, 0.474327628361858211203383461907, 0.476772616136919291651707908386, 0.479217603911980427611183586123, 0.481662591687041563570659263860, 0.484107579462102699530134941597, 0.486552567237163835489610619334, 0.488997555012224915937935065813, 0.491442542787286051897410743550, 0.493887530562347187856886421287, 0.496332518337408323816362099024, 0.498777506112469459775837776760, 0.501222493887530595735313454497, 0.503667481662591676183637900976, 0.506112469437652756631962347456, 0.508557457212713948102589256450, 0.511002444987775028550913702929, 0.513447432762836220021540611924, 0.515892420537897300469865058403, 0.518337408312958380918189504882, 0.520782396088019572388816413877, 0.523227383863080652837140860356, 0.525672371638141844307767769351, 0.528117359413202924756092215830, 0.530562347188264005204416662309, 0.533007334963325196675043571304, 0.535452322738386277123368017783, 0.537897310513447468593994926778, 0.540342298288508549042319373257, 0.542787286063569629490643819736, 0.545232273838630820961270728731, 0.547677261613691901409595175210, 0.550122249388753092880222084204, 0.552567237163814173328546530684, 0.555012224938875253776870977163, 0.557457212713936445247497886157, 0.559902200488997525695822332636, 0.562347188264058717166449241631, 0.564792176039119797614773688110, 0.567237163814180878063098134589, 0.569682151589242069533725043584, 0.572127139364303149982049490063, 0.574572127139364341452676399058, 0.577017114914425421901000845537, 0.579462102689486502349325292016, 0.581907090464547693819952201011, 0.584352078239608774268276647490, 0.586797066014669965738903556485, 0.589242053789731046187228002964, 0.591687041564792126635552449443, 0.594132029339853318106179358438, 0.596577017114914398554503804917, 0.599022004889975590025130713911, 0.601466992665036670473455160391, 0.603911980440097750921779606870, 0.606356968215158942392406515864, 0.608801955990220022840730962344, 0.611246943765281214311357871338, 0.613691931540342294759682317817, 0.616136919315403375208006764296, 0.618581907090464566678633673291, 0.621026894865525647126958119770, 0.623471882640586838597585028765, 0.625916870415647919045909475244, 0.628361858190708999494233921723, 0.630806845965770190964860830718, 0.633251833740831271413185277197, 0.635696821515892462883812186192, 0.638141809290953543332136632671, 0.640586797066014623780461079150, 0.643031784841075815251087988145, 0.645476772616136895699412434624, 0.647921760391198087170039343619, 0.650366748166259167618363790098, 0.652811735941320248066688236577, 0.655256723716381439537315145571, 0.657701711491442519985639592051, 0.660146699266503711456266501045, 0.662591687041564791904590947524, 0.665036674816625872352915394004, 0.667481662591687063823542302998, 0.669926650366748144271866749477, 0.672371638141809335742493658472, 0.674816625916870416190818104951, 0.677261613691931496639142551430, 0.679706601466992688109769460425, 0.682151589242053768558093906904, 0.684596577017114960028720815899, 0.687041564792176040477045262378, 0.689486552567237120925369708857, 0.691931540342298312395996617852, 0.694376528117359392844321064331, 0.696821515892420584314947973326, 0.699266503667481664763272419805, 0.701711491442542745211596866284, 0.704156479217603936682223775279, 0.706601466992665017130548221758, 0.709046454767726208601175130752, 0.711491442542787289049499577231, 0.713936430317848369497824023711, 0.716381418092909560968450932705, 0.718826405867970641416775379184, 0.721271393643031832887402288179, 0.723716381418092913335726734658, 0.726161369193153993784051181137, 0.728606356968215185254678090132, 0.731051344743276265703002536611, 0.733496332518337457173629445606, 0.735941320293398537621953892085, 0.738386308068459618070278338564, 0.740831295843520809540905247559, 0.743276283618581889989229694038, 0.745721271393643081459856603033, 0.748166259168704161908181049512, 0.750611246943765242356505495991, 0.753056234718826433827132404986, 0.755501222493887514275456851465, 0.757946210268948705746083760459, 0.760391198044009786194408206939, 0.762836185819070866642732653418, 0.765281173594132058113359562412, 0.767726161369193138561684008891, 0.770171149144254330032310917886, 0.772616136919315410480635364365, 0.775061124694376490928959810844, 0.777506112469437682399586719839, 0.779951100244498762847911166318, 0.782396088019559954318538075313, 0.784841075794621034766862521792, 0.787286063569682115215186968271, 0.789731051344743306685813877266, 0.792176039119804387134138323745, 0.794621026894865578604765232740, 0.797066014669926659053089679219, 0.799511002444987739501414125698, 0.801955990220048930972041034693, 0.804400977995110011420365481172, 0.806845965770171202890992390167, 0.809290953545232283339316836646, 0.811735941320293363787641283125, 0.814180929095354555258268192119, 0.816625916870415635706592638599, 0.819070904645476827177219547593, 0.821515892420537907625543994072, 0.823960880195598988073868440551, 0.826405867970660179544495349546, 0.828850855745721259992819796025, 0.831295843520782451463446705020, 0.833740831295843531911771151499, 0.836185819070904612360095597978, 0.838630806845965803830722506973, 0.841075794621026884279046953452, 0.843520782396087964727371399931, 0.845965770171149156197998308926, 0.848410757946210236646322755405, 0.850855745721271428116949664400, 0.853300733496332508565274110879, 0.855745721271393589013598557358, 0.858190709046454780484225466353, 0.860635696821515860932549912832, 0.863080684596577052403176821826, 0.865525672371638132851501268306, 0.867970660146699213299825714785, 0.870415647921760404770452623779, 0.872860635696821485218777070259, 0.875305623471882676689403979253, 0.877750611246943757137728425732, 0.880195599022004837586052872211, 0.882640586797066029056679781206, 0.885085574572127109505004227685, 0.887530562347188300975631136680, 0.889975550122249381423955583159, 0.892420537897310461872280029638, 0.894865525672371653342906938633, 0.897310513447432733791231385112, 0.899755501222493925261858294107, 0.902200488997555005710182740586, 0.904645476772616086158507187065, 0.907090464547677277629134096060, 0.909535452322738358077458542539, 0.911980440097799549548085451534, 0.914425427872860629996409898013, 0.916870415647921710444734344492, 0.919315403422982901915361253486, 0.921760391198043982363685699966, 0.924205378973105173834312608960, 0.926650366748166254282637055439, 0.929095354523227334730961501919, 0.931540342298288526201588410913, 0.933985330073349606649912857392, 0.936430317848410798120539766387, 0.938875305623471878568864212866, 0.941320293398532959017188659345, 0.943765281173594150487815568340, 0.946210268948655230936140014819, 0.948655256723716422406766923814, 0.951100244498777502855091370293, 0.953545232273838583303415816772, 0.955990220048899774774042725767, 0.958435207823960855222367172246, 0.960880195599022046692994081241, 0.963325183374083127141318527720, 0.965770171149144207589642974199, 0.968215158924205399060269883194, 0.970660146699266479508594329673, 0.973105134474327670979221238667, 0.975550122249388751427545685146, 0.977995110024449831875870131626, 0.980440097799511023346497040620, 0.982885085574572103794821487099, 0.985330073349633295265448396094, 0.987775061124694375713772842573, 0.990220048899755456162097289052, 0.992665036674816647632724198047, 0.995110024449877728081048644526, 0.997555012224938919551675553521, 1.000000000000000000000000000000, ], 410, 410, [1,2])
  ad_equals(actual,expected)
end

end


@testset "Downsample Tests" begin
  @test down_sample([1.0,2,3,4,5,6,7,8], 2) == [1,3,5,7]
  @test down_sample([1.0,2,3,4,5,6,7,8], 3) == [1,4,7]
  @test ad_equals(down_sample(data, 2), AnalogData([1.0 3.0 5.0; 2.0 6.0 10.0],
  [1.0,3.0,5.0],30000,15000,[1,2]))
end

@testset "toDecibels Tests" begin
  @test toDecibels([1.0,2,3,4,5,6,7,8],1.0) ≈ [0.000000000000000000000000000000,
  3.010299956639812091196972687612, 4.771212547196624242928919557016,
  6.020599913279624182393945375225, 6.989700043360188352892237162450,
  7.781512503836436778215102094691, 8.450980400142567461330145306420,
  9.030899869919435829501708212774, ]
  @test begin
    actual = toDecibels(data, 1.0)
    expected = AnalogData([0.000000000000000000000000000000 3.010299956639812091196972687612 4.771212547196624242928919557016 6.020599913279624182393945375225 6.989700043360188352892237162450; 0.000000000000000000000000000000 3.010299956639812091196972687612 4.771212547196624242928919557016 6.020599913279624182393945375225 6.989700043360188352892237162450 ],
  [1.000000000000000000000000000000, 2.000000000000000000000000000000, 3.000000000000000000000000000000, 4.000000000000000000000000000000, 5.000000000000000000000000000000, ], 30000, 30000, [1,2])
    ad_equals(actual,expected)
  end

end

@testset "debounce_discrete_signal Tests" begin
  dd_data = DigitalData([true true true false true; false false false true false], [1.0, 2, 3, 4, 5])
  @test debounce_discrete_signal([true, true, true, false, false, true, true],3) ==
  [true,true,true,true,true,true,true]
  @test begin
    dd_equals(debounce_discrete_signal(dd_data,3), DigitalData(
  Bool[true true true true true; false false false false false],
  [1.0,2.0,3.0,4.0,5.0],30000,30000,[1,2]))
  end
end

@testset "truncate_by_index Tests" begin
  @test truncate_by_index([8,10,12,14.0,16],[1,2,3,4,5.0],[3,4,5]) ==
  ([12.0,14.0],[3.0,4.0])
  @test ad_equals(truncate_by_index(data, [2,3,4]),
  AnalogData([2.0 3.0; 4.0 6.0],[2.0,3.0],30000,30000,[1,2]))
end

@testset "truncate_by_value Tests" begin
  @test truncate_by_value([2.0, 4, 8, 16, 32], [1.0, 3, 5, 7, 9], [5.0,9]) ==
  ([16.0,32.0],[7.0,9.0])
  @test ad_equals(truncate_by_value(data, [3.0,5]), AnalogData([4.0 5.0; 8.0 10.0],
  [4.0,5.0],30000,30000,[1,2]))
end
