Skip to main content

Determining Periodicity with Fourier?


Note: This question has previously been marked as a duplicate of What do the X and Y axis stand for in the Fourier transform domain?. While the answer will likely have an overlap, so the question should be linked, I see the context and background as sufficiently different to warrant a separate question for anyone who is having a similar issue to what I'm having; and it has been noted that some additional information may be useful in answering this question.


I'm trying to find the periods of time series and was directed toward Fourier analysis. I am having a hard time understanding what is going on in ref/Fourier > Applications > Frequency Identification. Would anyone be able to explain, or direct me to an explanation somewhere? Thank you!


Here is some sample data. It is a list representing a 55-year time series with one measurement per year, for a total of 56 points. What I have been doing is subtracting off the seventh-order polynomial regression and running the absolute value of the fourier on both the raw data and the data with the overall trend removed.


{0.,0.,0.,0.00118064,0.,0.00437956,0.,0.,0.0035461,0.00107875,0.00715015,0.00501505,0.0040568,0.00294985,0.00514933,0.00609137,0.0047619,0.00100806,0.00196464,0.000882613,0.00187793,0.00282486,0.00172563,0.000807754,0.00318218,0.00233645,0.0015528,0.00149365,0.000776398,0.000688705,0.00198151,0.00236593,0.00225904,0.00149589,0.,0.00332889,0.00179748,0.00126743,0.00289352,0.00218103,0.00265675,0.00104275,0.00509495,0.00292887,0.00161616,0.00327869,0.00413793,0.00223928,0.00502067,0.00434075,0.00392465,0.00469373,0.00595745,0.00521147,0.00567752,0.00293255}

Note, for the Fourier graphs below, the data have not been padded to the right; should I do that?


enter image description here



enter image description here


enter image description here


enter image description here




Comments

Popular posts from this blog

front end - keyboard shortcut to invoke Insert new matrix

I frequently need to type in some matrices, and the menu command Insert > Table/Matrix > New... allows matrices with lines drawn between columns and rows, which is very helpful. I would like to make a keyboard shortcut for it, but cannot find the relevant frontend token command (4209405) for it. Since the FullForm[] and InputForm[] of matrices with lines drawn between rows and columns is the same as those without lines, it's hard to do this via 3rd party system-wide text expanders (e.g. autohotkey or atext on mac). How does one assign a keyboard shortcut for the menu item Insert > Table/Matrix > New... , preferably using only mathematica? Thanks! Answer In the MenuSetup.tr (for linux located in the $InstallationDirectory/SystemFiles/FrontEnd/TextResources/X/ directory), I changed the line MenuItem["&New...", "CreateGridBoxDialog"] to read MenuItem["&New...", "CreateGridBoxDialog", MenuKey["m", Modifiers-...

How to thread a list

I have data in format data = {{a1, a2}, {b1, b2}, {c1, c2}, {d1, d2}} Tableform: I want to thread it to : tdata = {{{a1, b1}, {a2, b2}}, {{a1, c1}, {a2, c2}}, {{a1, d1}, {a2, d2}}} Tableform: And I would like to do better then pseudofunction[n_] := Transpose[{data2[[1]], data2[[n]]}]; SetAttributes[pseudofunction, Listable]; Range[2, 4] // pseudofunction Here is my benchmark data, where data3 is normal sample of real data. data3 = Drop[ExcelWorkBook[[Column1 ;; Column4]], None, 1]; data2 = {a #, b #, c #, d #} & /@ Range[1, 10^5]; data = RandomReal[{0, 1}, {10^6, 4}]; Here is my benchmark code kptnw[list_] := Transpose[{Table[First@#, {Length@# - 1}], Rest@#}, {3, 1, 2}] &@list kptnw2[list_] := Transpose[{ConstantArray[First@#, Length@# - 1], Rest@#}, {3, 1, 2}] &@list OleksandrR[list_] := Flatten[Outer[List, List@First[list], Rest[list], 1], {{2}, {1, 4}}] paradox2[list_] := Partition[Riffle[list[[1]], #], 2] & /@ Drop[list, 1] RM[list_] := FoldList[Transpose[{First@li...

dynamic - How can I make a clickable ArrayPlot that returns input?

I would like to create a dynamic ArrayPlot so that the rectangles, when clicked, provide the input. Can I use ArrayPlot for this? Or is there something else I should have to use? Answer ArrayPlot is much more than just a simple array like Grid : it represents a ranged 2D dataset, and its visualization can be finetuned by options like DataReversed and DataRange . These features make it quite complicated to reproduce the same layout and order with Grid . Here I offer AnnotatedArrayPlot which comes in handy when your dataset is more than just a flat 2D array. The dynamic interface allows highlighting individual cells and possibly interacting with them. AnnotatedArrayPlot works the same way as ArrayPlot and accepts the same options plus Enabled , HighlightCoordinates , HighlightStyle and HighlightElementFunction . data = {{Missing["HasSomeMoreData"], GrayLevel[ 1], {RGBColor[0, 1, 1], RGBColor[0, 0, 1], GrayLevel[1]}, RGBColor[0, 1, 0]}, {GrayLevel[0], GrayLevel...