Page tree
Skip to end of metadata
Go to start of metadata

Numerical Analysis of Fundamental Frequencies (NAFF)

A little command line tool (macOS only) to perform high-resolution frequency analysis of time series following the Laskar method.


Welcome to hpNAFF Analysis(version 0.0.3, build 201). ©2018 Heiko Pälike
Usage: hpnaff [options] file
file format: tab separated columns, data must be equidistantly spaced. Instead of file can specify '-' for stdin.
  -h, --help:
      Displays help message.
  -r, --fracRMSChangeLimit:
      fracRMSChangeLimit. Default: 0.000002
  -f, --fracFreqAccuracyLimit:
      fracFreqAccuracyLimit. Default: 0.00000001
  -m, --maxFrequencies:
      maxFrequencies. Default: 30
  -c, --freqCycleLimit:
      freqCycleLimit. Default: 100
  -l, --lowerFreqLimit:
      lowerFreqLimit. Default: 0.0
  -u, --upperFreqLimit:
      upperFreqLimit. Default: 0.5 (NYQUIST)
  -d, --detrendingOrder:
      Order for polynomial detrending. 0 removes DC only. >0 removes a polynomial fit. Default: not set
  -dC, --detrendChunks:
      Option to apply detrending (-d) to individual chunks. Default: false
  -fAL, --filterAbscissaLower:
      filter on Abscissa (x-axis) data greater or equal than value specified.
  -fAU, --filterAbscissaUpper:
      filter on Abscissa (x-axis) data lesser or equal than value specified.
  -s, --chunkSize:
      Split the input file into chunks of this size. Default: not set, no chunking
  -w, --window_offsets:
      Specify windowing offset for evolutive analysis. Default: chunkSize if set, or None.
  -z, --columnSeparator:
      Use this as columns separtor for input file instead of default tab \t. Default: \t
  -k, --skipHeaderLines:
      Specify number of (header)lines to be skipped. Default: 0
  -n, --decimate:
      Specify decimation of input data. Default: 1 (take every value)
  -a, --abscissaColumn:
      Specify column number for abscissa (time or depth). Default: 1
  -o, --ordinateColumn:
      Specify column number for ordinate (data). Default: 2
  -C, --complex:
      Compute spectra for complex input. Default: false. If true, by default takes values from abscissa column + 1.
  -Co, --ComplexOrdinateColumn:
      Specify column number for ordinate (data), complex part. Default: 3 (if C option used)
  -t, --deltaT:
      Specify time/depth offset between data. Default: 1.0
  -x, --ratios:
      Compute and output frequency ratio matrix. Default: false.
  --ratio_list:
      If ratio_option is set, provides comma separated list of frequency ratios to highlight in output.
  --output_detrended_data:
      Output detrended data to this filename. Not implemented yet.
  --version:
      Shows current version and build of this software
  -v, --verbose:
      Print verbose messages. Specify multiple times to increase verbosity.
  --references:
      Shows references to papers and sources.
  --licenses:
      Shows licenses of code components used in this software.


Binary download: 

hpnaff


after download, add execute permissions by 'chmod a+x ./hpnaff'


Then try it on a sample file etp_1kyr_36Ma.txt:

user$ ./hpnaff etp_1kyr_36Ma.txt -d 1 -m 75



2018-11-04 10:50:41.463 hpnaff[2021:273049] Welcome to hpNAFF Analysis(version 0.0.3, build 178). ©2018 Heiko Pälike
==================================================================================================================================================
    # | chunk |       t0       | points |    frequency |     amplitude |        phase | significance |        period |    arcsec/yr |  phase (deg)
    0 |     0 |         0.0000 |  14001 |  0.000000000 |    0.00000000 |  0.000000000 |  0.000000000 |           inf |    0.0000000 |    0.0000000
    1 |     0 |         0.0000 |  14001 |  0.002472456 |    0.75721258 |  3.740563127 |  0.795224850 |   404.4561076 |    3.2043032 |  214.3184802
    2 |     0 |         0.0000 |  14001 |  0.010522542 |    0.59639514 | -0.083030428 |  0.840326030 |    95.0340671 |   13.6372149 |   -4.7572931
    3 |     0 |         0.0000 |  14001 |  0.024999241 |    0.53877772 |  5.657761056 |  0.827374132 |    40.0012145 |   32.3990163 |  324.1658300
    4 |     0 |         0.0000 |  14001 |  0.008040668 |    0.50803290 |  2.884638325 |  0.832167805 |   124.3677841 |   10.4207051 |  165.2776014
    5 |     0 |         0.0000 |  14001 |  0.010102115 |    0.39766702 |  4.191460452 |  0.868275178 |    98.9891739 |   13.0923408 |  240.1529939
    6 |     0 |         0.0000 |  14001 |  0.042828239 |    0.31115152 |  1.466354179 |  0.901608023 |    23.3490806 |   55.5053976 |   84.0159058
    7 |     0 |         0.0000 |  14001 |  0.007627856 |    0.30706911 |  0.558756637 |  0.900168885 |   131.0984453 |    9.8857008 |   32.0143971
    8 |     0 |         0.0000 |  14001 |  0.000407279 |    0.27097231 |  2.625060814 |  0.917986627 |  2455.3193080 |    0.5278336 |  150.4049056
    9 |     0 |         0.0000 |  14001 |  0.045302069 |    0.26148887 |  5.142663908 |  0.908826102 |    22.0740470 |   58.7114814 |  294.6529374
   10 |     0 |         0.0000 |  14001 |  0.025832617 |    0.23907704 |  3.749692167 |  0.917331367 |    38.7107506 |   33.4790719 |  214.8415356
   11 |     0 |         0.0000 |  14001 |  0.001034652 |    0.22887920 |  0.316263467 |  0.926607014 |   966.5081496 |    1.3409095 |   18.1205619
   12 |     0 |         0.0000 |  14001 |  0.053350844 |    0.23311864 |  1.355155013 |  0.912974997 |    18.7438458 |   69.1426943 |   77.6446628
   13 |     0 |         0.0000 |  14001 |  0.009911387 |    0.18079486 |  5.692180061 |  0.941223401 |   100.8940493 |   12.8451580 |  326.1378937
   14 |     0 |         0.0000 |  14001 |  0.019210470 |    0.15673509 | -0.475811101 |  0.949106113 |    52.0549476 |   24.8967689 |  -27.2619679
   15 |     0 |         0.0000 |  14001 |  0.052929481 |    0.14841497 |  5.755576341 |  0.947991688 |    18.8930626 |   68.5966076 |  329.7702330
   16 |     0 |         0.0000 |  14001 |  0.009488271 |    0.15112041 | -0.166596638 |  0.960411285 |   105.3932755 |   12.2967997 |   -9.5452843
   17 |     0 |         0.0000 |  14001 |  0.025098798 |    0.17311913 |  2.629896210 |  0.958954086 |    39.8425454 |   32.5280423 |  150.6819534
   18 |     0 |         0.0000 |  14001 |  0.025414340 |    0.14355863 |  4.818018102 |  0.948646429 |    39.3478637 |   32.9369851 |  276.0521028
   19 |     0 |         0.0000 |  14001 |  0.024888808 |    0.14098312 |  5.710170221 |  0.964800624 |    40.1787023 |   32.2558949 |  327.1686540
   20 |     0 |         0.0000 |  14001 |  0.010323185 |    0.13699990 | -1.010239671 |  0.950068678 |    96.8693283 |   13.3788478 |  -57.8824695
   21 |     0 |         0.0000 |  14001 |  0.007440236 |    0.12986997 |  2.040413384 |  0.952028441 |   134.4043325 |    9.6425463 |  116.9070753
   22 |     0 |         0.0000 |  14001 |  0.001455303 |    0.12708837 |  2.315320953 |  0.947284449 |   687.1422369 |    1.8860724 |  132.6581188
   23 |     0 |         0.0000 |  14001 |  0.010925100 |    0.11817448 | -0.359553603 |  0.955088751 |    91.5323402 |   14.1589300 |  -20.6009040
   24 |     0 |         0.0000 |  14001 |  0.009667251 |    0.11874251 |  2.622499884 |  0.954076811 |   103.4420280 |   12.5287567 |  150.2581751
   25 |     0 |         0.0000 |  14001 |  0.010413463 |    0.09715314 |  2.916722835 |  0.980490600 |    96.0295312 |   13.4958485 |  167.1159085
   26 |     0 |         0.0000 |  14001 |  0.000901134 |    0.09569726 |  1.601650029 |  0.968540900 |  1109.7124523 |    1.1678701 |   91.7677869
   27 |     0 |         0.0000 |  14001 |  0.012994167 |    0.10086003 |  0.611296677 |  0.967944111 |    76.9576057 |   16.8404408 |   35.0247196
   28 |     0 |         0.0000 |  14001 |  0.042724400 |    0.09486677 |  1.049712502 |  0.980633320 |    23.4058291 |   55.3708222 |   60.1440960
   29 |     0 |         0.0000 |  14001 |  0.000231340 |    0.09813349 |  0.120421080 |  0.967044518 |  4322.6469465 |    0.2998163 |    6.8996196
   30 |     0 |         0.0000 |  14001 |  0.005563540 |    0.10009924 |  2.397732816 |  0.967425007 |   179.7416848 |    7.2103475 |  137.3799708
   31 |     0 |         0.0000 |  14001 |  0.010638958 |    0.09688648 | -0.508418993 |  0.964555307 |    93.9941712 |   13.7880890 |  -29.1302625
   32 |     0 |         0.0000 |  14001 |  0.008918727 |    0.08741944 |  2.593049225 |  0.963917464 |   112.1236215 |   11.5586705 |  148.5707767
   33 |     0 |         0.0000 |  14001 |  0.007853668 |    0.09431921 |  1.158982011 |  0.966015092 |   127.3290367 |   10.1783539 |   66.4047777
   34 |     0 |         0.0000 |  14001 |  0.024592220 |    0.08828171 |  3.104290426 |  0.962948353 |    40.6632660 |   31.8715177 |  177.8627398
   35 |     0 |         0.0000 |  14001 |  0.008385587 |    0.08641115 |  2.992612010 |  0.964466604 |   119.2522373 |   10.8677206 |  171.4640379
   36 |     0 |         0.0000 |  14001 |  0.018145511 |    0.08763660 |  3.810401953 |  0.965100178 |    55.1100477 |   23.5165828 |  218.3199502
   37 |     0 |         0.0000 |  14001 |  0.024810831 |    0.08240291 |  4.521072849 |  0.982190253 |    40.3049788 |   32.1548364 |  259.0383931
   38 |     0 |         0.0000 |  14001 |  0.042929640 |    0.09470459 | -1.714770813 |  0.974168394 |    23.2939296 |   55.6368128 |  -98.2491304
   39 |     0 |         0.0000 |  14001 |  0.001312871 |    0.08074684 |  0.777678604 |  0.975863805 |   761.6892389 |    1.7014813 |   44.5577018
   40 |     0 |         0.0000 |  14001 |  0.002884917 |    0.08065197 |  2.947032143 |  0.969528197 |   346.6303915 |    3.7388528 |  168.8525039
   41 |     0 |         0.0000 |  14001 |  0.009282092 |    0.07995912 | -0.902914815 |  0.959472392 |   107.7343296 |   12.0295917 |  -51.7332082
   42 |     0 |         0.0000 |  14001 |  0.002172887 |    0.07898195 |  1.985388426 |  0.966843584 |   460.2171462 |    2.8160620 |  113.7543775
   43 |     0 |         0.0000 |  14001 |  0.025182288 |    0.07351399 |  1.270869503 |  0.989395181 |    39.7104512 |   32.6362447 |   72.8154589
   44 |     0 |         0.0000 |  14001 |  0.002006049 |    0.07122474 |  1.007509626 |  0.970121706 |   498.4923050 |    2.5998395 |   57.7260494
   45 |     0 |         0.0000 |  14001 |  0.008233354 |    0.07018462 |  4.902074997 |  0.962605563 |   121.4571854 |   10.6704268 |  280.8682082
   46 |     0 |         0.0000 |  14001 |  0.043838032 |    0.06715352 |  3.232504869 |  0.965810782 |    22.8112428 |   56.8140900 |  185.2088863
   47 |     0 |         0.0000 |  14001 |  0.007224019 |    0.06531452 |  4.276908721 |  0.978785703 |   138.4271092 |    9.3623280 |  245.0488191
   48 |     0 |         0.0000 |  14001 |  0.045402169 |    0.07436495 |  2.063109297 |  0.977076727 |    22.0253794 |   58.8412112 |  118.2074554
   49 |     0 |         0.0000 |  14001 |  0.002344771 |    0.06402237 |  1.101841661 |  0.974716536 |   426.4809539 |    3.0388227 |   63.1308769
   50 |     0 |         0.0000 |  14001 |  0.034012471 |    0.06632261 |  0.311286985 |  0.964879805 |    29.4009808 |   44.0801621 |   17.8354305
   51 |     0 |         0.0000 |  14001 |  0.000615717 |    0.06955959 |  0.324652520 |  0.966238479 |  1624.1226060 |    0.7979693 |   18.6012192
   52 |     0 |         0.0000 |  14001 |  0.024999132 |    0.06125458 |  3.871230210 |  0.987944595 |    40.0013889 |   32.3988750 |  221.8051526
   53 |     0 |         0.0000 |  14001 |  0.012584554 |    0.06352103 |  4.354135730 |  0.970616108 |    79.4624885 |   16.3095824 |  249.4736007
   54 |     0 |         0.0000 |  14001 |  0.007042302 |    0.05954369 |  3.178070921 |  0.967975778 |   141.9990167 |    9.1268238 |  182.0900508
   55 |     0 |         0.0000 |  14001 |  0.053168977 |    0.06126972 | -0.361830892 |  0.974607875 |    18.8079603 |   68.9069938 |  -20.7313830
   56 |     0 |         0.0000 |  14001 |  0.018476857 |    0.05675901 |  1.358226644 |  0.977498039 |    54.1217594 |   23.9460065 |   77.8206543
   57 |     0 |         0.0000 |  14001 |  0.025289765 |    0.06621217 | -0.908124267 |  0.973848255 |    39.5416874 |   32.7755361 |  -52.0316877
   58 |     0 |         0.0000 |  14001 |  0.045202487 |    0.05979910 |  4.539755824 |  0.986931115 |    22.1226766 |   58.5824230 |  260.1088487
   59 |     0 |         0.0000 |  14001 |  0.001552070 |    0.05459046 |  3.384103199 |  0.981459102 |   644.3008068 |    2.0114828 |  193.8948307
   60 |     0 |         0.0000 |  14001 |  0.010774958 |    0.06013873 | -0.920994477 |  0.970525658 |    92.8077872 |   13.9643454 |  -52.7690965
   61 |     0 |         0.0000 |  14001 |  0.035180014 |    0.05381168 |  6.108664389 |  0.971837151 |    28.4252302 |   45.5932984 |  350.0006880
   62 |     0 |         0.0000 |  14001 |  0.025932854 |    0.05497185 |  0.528441663 |  0.981080765 |    38.5611237 |   33.6089791 |   30.2774770
   63 |     0 |         0.0000 |  14001 |  0.019098347 |    0.05289607 |  5.666427467 |  0.977106361 |    52.3605527 |   24.7514576 |  324.6623788
   64 |     0 |         0.0000 |  14001 |  0.052829237 |    0.05592636 |  4.622260527 |  0.978276073 |    18.9289123 |   68.4666917 |  264.8360200
   65 |     0 |         0.0000 |  14001 |  0.011547573 |    0.05030718 |  3.661455369 |  0.969207740 |    86.5982825 |   14.9656548 |  209.7859395
   66 |     0 |         0.0000 |  14001 |  0.052667555 |    0.04771644 |  4.565272390 |  0.975236135 |    18.9870216 |   68.2571512 |  261.5708403
   67 |     0 |         0.0000 |  14001 |  0.008514638 |    0.04804064 |  4.938804767 |  0.978348984 |   117.4448071 |   11.0349707 |  282.9726690
   68 |     0 |         0.0000 |  14001 |  0.017723966 |    0.04660213 |  1.785804269 |  0.976900743 |    56.4207807 |   22.9702600 |  102.3190477
   69 |     0 |         0.0000 |  14001 |  0.013408861 |    0.04526629 | -0.218064193 |  0.976731995 |    74.5775492 |   17.3778840 |  -12.4941579
   70 |     0 |         0.0000 |  14001 |  0.004944881 |    0.04401069 |  3.792380701 |  0.977679719 |   202.2293298 |    6.4085660 |  217.2874084
   71 |     0 |         0.0000 |  14001 |  0.024477668 |    0.04221973 |  2.795576240 |  0.982047887 |    40.8535657 |   31.7230572 |  160.1747198
   72 |     0 |         0.0000 |  14001 |  0.025733760 |    0.04584983 |  3.159867016 |  0.992264397 |    38.8594588 |   33.3509534 |  181.0470438
   73 |     0 |         0.0000 |  14001 |  0.044937430 |    0.04272239 |  0.214967037 |  0.979100869 |    22.2531639 |   58.2389096 |   12.3167040
   74 |     0 |         0.0000 |  14001 |  0.018373301 |    0.04170326 |  4.267372615 |  0.976418419 |    54.4268023 |   23.8117976 |  244.5024405
   75 |     0 |         0.0000 |  14001 |  0.016041231 |    0.04508949 |  2.028721000 |  0.980103194 |    62.3393556 |   20.7894353 |  116.2371511



"Evolutive" outputs can be obtained with the -s option, e.g. -s 1000 computes an analysis for every 1000 points.


Notes: 

This is a Swift implementation of https://ops.aps.anl.gov/manuals/SDDStoolkit/SDDStoolkitsu61.html

Related efforts:

https://github.com/MichaelEhrlichman/FortNAFF

https://github.com/adrn/SuperFreq

https://github.com/nkarast/PyNAFF

References:

1. Laskar, J., 1990, The chaotic motion of the Solar System. A numerical estimate of the size of the chaotic zones, Icarus, 88, 266-291.
2. Laskar, J., 1993, Frequency analysis for multi-dimensional systems. Global dynamics and diffusion, Physica D, 67, 257-281.
3. Dumas, S., Laskar, J., 1993, Global Dynamics and Long-Time Stability in Hamiltonian Systems Via Numerical Frequency Analysis, Phys. Rev. Letters, 70 (20), 2975-2979.
4. Laskar, J. : 1999, Introduction to frequency map analysis, in proc. of NATO ASI 533 3DHAM95, S'Agaro, Spain, 134150.
5. Papaphilippou, Y., Frequency maps for LHC models, PAC99.
6. Papahilippou, Y. Zimmermann, F., Weak-strong beam-beam simulations for the Large Hadron Collider, Phys. Rev. ST Accel.
Beams 2, 104001 (1999).
7. Robin, D., Steir, C., Laskar, J., Nadolski, L. : 2000, Global dynamics of the ALS revealed through experimental Frequency Map Analysis, Phys. Rev. Let., 85, pp. 558-561.
8. Laskar, J., Frequency map analysis and quasiperiodic decompositions. preprint (https://arxiv.org/pdf/math/0305364.pdf) (2003).
9. Valluri & Merritt, 1998

  • No labels