You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

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 213). ©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.dmg


after download, open the disk image (double click) and copy 'hpnaff' to a location in your search path, and  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



Welcome to hpNAFF Analysis(version 0.0.3, build 213). ©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.008040667 |    0.50803028 |  2.884682305 |  0.883312411 |  124.3677983 |   10.4207039 |  165.2801213
    3 |     0 |         0.0000 |  14001 |  0.010522542 |    0.59639738 | -0.082998181 |  0.819232944 |   95.0340732 |   13.6372141 |   -4.7554455
    4 |     0 |         0.0000 |  14001 |  0.024999241 |    0.53877771 |  5.657761090 |  0.799538049 |   40.0012145 |   32.3990163 |  324.1658319
    5 |     0 |         0.0000 |  14001 |  0.010102115 |    0.39766702 |  4.191460152 |  0.868275243 |   98.9891738 |   13.0923408 |  240.1529767
    6 |     0 |         0.0000 |  14001 |  0.042828239 |    0.31115152 |  1.466354076 |  0.901608079 |   23.3490806 |   55.5053976 |   84.0158998
    7 |     0 |         0.0000 |  14001 |  0.007627856 |    0.30706911 |  0.558756432 |  0.900168948 |  131.0984453 |    9.8857008 |   32.0143854
    8 |     0 |         0.0000 |  14001 |  0.000407279 |    0.27097231 |  2.625060813 |  0.917986685 |  2455.3193079 |    0.5278336 |  150.4049056
    9 |     0 |         0.0000 |  14001 |  0.045302069 |    0.26148887 |  5.142663739 |  0.908826171 |   22.0740470 |   58.7114815 |  294.6529277
   10 |     0 |         0.0000 |  14001 |  0.025832617 |    0.23907704 |  3.749692846 |  0.917331436 |   38.7107506 |   33.4790718 |  214.8415746
   11 |     0 |         0.0000 |  14001 |  0.001034652 |    0.22887920 |  0.316263467 |  0.926607081 |  966.5081496 |    1.3409095 |   18.1205619
   12 |     0 |         0.0000 |  14001 |  0.053350844 |    0.23311864 |  1.355156356 |  0.912975085 |   18.7438458 |   69.1426943 |   77.6447398
   13 |     0 |         0.0000 |  14001 |  0.009911387 |    0.18079485 |  5.692179627 |  0.941223463 |  100.8940492 |   12.8451580 |  326.1378689
   14 |     0 |         0.0000 |  14001 |  0.019210470 |    0.15673509 | -0.475811101 |  0.949106171 |   52.0549476 |   24.8967689 |  -27.2619679
   15 |     0 |         0.0000 |  14001 |  0.052929481 |    0.14841497 |  5.755575959 |  0.947991751 |   18.8930626 |   68.5966076 |  329.7702111
   16 |     0 |         0.0000 |  14001 |  0.009488271 |    0.15112041 | -0.166596806 |  0.960411335 |  105.3932755 |   12.2967997 |   -9.5452938
   17 |     0 |         0.0000 |  14001 |  0.025098798 |    0.17311913 |  2.629896156 |  0.958954143 |   39.8425454 |   32.5280423 |  150.6819503
   18 |     0 |         0.0000 |  14001 |  0.025414340 |    0.14355863 |  4.818017768 |  0.948646500 |   39.3478636 |   32.9369851 |  276.0520837
   19 |     0 |         0.0000 |  14001 |  0.024888808 |    0.14098312 |  5.710170315 |  0.964800678 |   40.1787023 |   32.2558949 |  327.1686593
   20 |     0 |         0.0000 |  14001 |  0.010323185 |    0.13699959 | -1.010235037 |  0.950068499 |   96.8693296 |   13.3788476 |  -57.8822039
   21 |     0 |         0.0000 |  14001 |  0.007440236 |    0.12986997 |  2.040412911 |  0.952028505 |  134.4043323 |    9.6425463 |  116.9070483
   22 |     0 |         0.0000 |  14001 |  0.001455303 |    0.12708837 |  2.315320953 |  0.947284522 |  687.1422369 |    1.8860724 |  132.6581188
   23 |     0 |         0.0000 |  14001 |  0.010925100 |    0.11817449 | -0.359553678 |  0.955088819 |   91.5323401 |   14.1589300 |  -20.6009083
   24 |     0 |         0.0000 |  14001 |  0.009667251 |    0.11874251 |  2.622499866 |  0.954076881 |  103.4420280 |   12.5287567 |  150.2581741
   25 |     0 |         0.0000 |  14001 |  0.010413464 |    0.09715416 |  2.916666621 |  0.980489783 |   96.0295264 |   13.4958491 |  167.1126876
   26 |     0 |         0.0000 |  14001 |  0.000901134 |    0.09569726 |  1.601650029 |  0.968540925 |  1109.7124523 |    1.1678701 |   91.7677869
   27 |     0 |         0.0000 |  14001 |  0.012994167 |    0.10086003 |  0.611296753 |  0.967944137 |   76.9576057 |   16.8404408 |   35.0247240
   28 |     0 |         0.0000 |  14001 |  0.042724400 |    0.09486677 |  1.049712386 |  0.980633336 |   23.4058291 |   55.3708222 |   60.1440894
   29 |     0 |         0.0000 |  14001 |  0.042929640 |    0.09470459 | -1.714770601 |  0.980891619 |   23.2939296 |   55.6368128 |  -98.2491183
   30 |     0 |         0.0000 |  14001 |  0.000231340 |    0.09813349 |  0.120421069 |  0.966402553 |  4322.6469415 |    0.2998163 |    6.8996190
   31 |     0 |         0.0000 |  14001 |  0.005563540 |    0.10009924 |  2.397732793 |  0.966768393 |  179.7416848 |    7.2103475 |  137.3799694
   32 |     0 |         0.0000 |  14001 |  0.010638957 |    0.09688662 | -0.508364457 |  0.963816275 |   93.9941773 |   13.7880881 |  -29.1271378
   33 |     0 |         0.0000 |  14001 |  0.008918727 |    0.08741944 |  2.593049727 |  0.963136904 |  112.1236216 |   11.5586705 |  148.5708054
   34 |     0 |         0.0000 |  14001 |  0.007853669 |    0.09431900 |  1.158965447 |  0.965251357 |  127.3290309 |   10.1783544 |   66.4038287
   35 |     0 |         0.0000 |  14001 |  0.008385587 |    0.08641121 |  2.992612459 |  0.964986966 |  119.2522374 |   10.8677206 |  171.4640636
   36 |     0 |         0.0000 |  14001 |  0.024592220 |    0.08828171 |  3.104291362 |  0.960710531 |   40.6632660 |   31.8715177 |  177.8627934
   37 |     0 |         0.0000 |  14001 |  0.018145511 |    0.08763660 |  3.810402005 |  0.964224191 |   55.1100477 |   23.5165828 |  218.3199532
   38 |     0 |         0.0000 |  14001 |  0.024810831 |    0.08240291 |  4.521072848 |  0.981726642 |   40.3049788 |   32.1548364 |  259.0383931
   39 |     0 |         0.0000 |  14001 |  0.001312871 |    0.08074684 |  0.777678564 |  0.975863821 |  761.6892383 |    1.7014813 |   44.5576995
   40 |     0 |         0.0000 |  14001 |  0.002884917 |    0.08065197 |  2.947031918 |  0.969528217 |  346.6303909 |    3.7388528 |  168.8524910
   41 |     0 |         0.0000 |  14001 |  0.009282092 |    0.07995912 | -0.902914817 |  0.959472422 |  107.7343296 |   12.0295917 |  -51.7332083
   42 |     0 |         0.0000 |  14001 |  0.002172887 |    0.07898195 |  1.985388426 |  0.966843609 |  460.2171462 |    2.8160620 |  113.7543775
   43 |     0 |         0.0000 |  14001 |  0.002006049 |    0.07122474 |  1.007509615 |  0.970438583 |  498.4923050 |    2.5998395 |   57.7260487
   44 |     0 |         0.0000 |  14001 |  0.007224026 |    0.06531289 |  4.276575966 |  0.980491529 |  138.4269586 |    9.3623382 |  245.0297536
   45 |     0 |         0.0000 |  14001 |  0.025182288 |    0.07351399 |  1.270869463 |  0.988854719 |   39.7104512 |   32.6362447 |   72.8154565
   46 |     0 |         0.0000 |  14001 |  0.012584554 |    0.06352105 |  4.354145054 |  0.976073138 |   79.4624898 |   16.3095821 |  249.4741350
   47 |     0 |         0.0000 |  14001 |  0.008233397 |    0.07018628 |  4.899907055 |  0.960922960 |  121.4565512 |   10.6704825 |  280.7439942
   48 |     0 |         0.0000 |  14001 |  0.043838032 |    0.06715352 |  3.232504870 |  0.964205369 |   22.8112428 |   56.8140900 |  185.2088863
   49 |     0 |         0.0000 |  14001 |  0.045402169 |    0.07436495 |  2.063108412 |  0.976470351 |   22.0253794 |   58.8412112 |  118.2074047
   50 |     0 |         0.0000 |  14001 |  0.034012471 |    0.06632261 |  0.311287406 |  0.964840418 |   29.4009808 |   44.0801621 |   17.8354546
   51 |     0 |         0.0000 |  14001 |  0.007042301 |    0.05954400 |  3.178131531 |  0.970294538 |  141.9990445 |    9.1268220 |  182.0935235
   52 |     0 |         0.0000 |  14001 |  0.002344771 |    0.06402237 |  1.101841745 |  0.972261310 |  426.4809570 |    3.0388227 |   63.1308817
   53 |     0 |         0.0000 |  14001 |  0.000615717 |    0.06955959 |  0.324650477 |  0.964170562 |  1624.1224848 |    0.7979694 |   18.6011022
   54 |     0 |         0.0000 |  14001 |  0.024999132 |    0.06125458 |  3.871230045 |  0.987178751 |   40.0013889 |   32.3988750 |  221.8051431
   55 |     0 |         0.0000 |  14001 |  0.053168977 |    0.06126971 | -0.361831494 |  0.974608027 |   18.8079602 |   68.9069938 |  -20.7314175
   56 |     0 |         0.0000 |  14001 |  0.018476857 |    0.05675901 |  1.358226770 |  0.977498190 |   54.1217594 |   23.9460065 |   77.8206616
   57 |     0 |         0.0000 |  14001 |  0.025289765 |    0.06621218 | -0.908124366 |  0.973848432 |   39.5416874 |   32.7755361 |  -52.0316934
   58 |     0 |         0.0000 |  14001 |  0.045202487 |    0.05979910 |  4.539755588 |  0.986931204 |   22.1226766 |   58.5824230 |  260.1088352
   59 |     0 |         0.0000 |  14001 |  0.001552070 |    0.05459046 |  3.384103213 |  0.981459234 |  644.3008070 |    2.0114828 |  193.8948316
   60 |     0 |         0.0000 |  14001 |  0.010774957 |    0.06013891 | -0.920953234 |  0.970525278 |   92.8077955 |   13.9643442 |  -52.7667334
   61 |     0 |         0.0000 |  14001 |  0.035180014 |    0.05381168 |  6.108664130 |  0.971837344 |   28.4252302 |   45.5932984 |  350.0006731
   62 |     0 |         0.0000 |  14001 |  0.025932854 |    0.05497186 |  0.528441357 |  0.981080889 |   38.5611237 |   33.6089791 |   30.2774595
   63 |     0 |         0.0000 |  14001 |  0.019098347 |    0.05289607 |  5.666427468 |  0.977106525 |   52.3605527 |   24.7514576 |  324.6623788
   64 |     0 |         0.0000 |  14001 |  0.052829237 |    0.05592637 |  4.622260246 |  0.978276226 |   18.9289122 |   68.4666917 |  264.8360039
   65 |     0 |         0.0000 |  14001 |  0.011547573 |    0.05030717 |  3.661455522 |  0.969207972 |   86.5982825 |   14.9656548 |  209.7859483
   66 |     0 |         0.0000 |  14001 |  0.052667555 |    0.04771644 |  4.565272418 |  0.975236327 |   18.9870216 |   68.2571512 |  261.5708419
   67 |     0 |         0.0000 |  14001 |  0.008514639 |    0.04803989 |  4.938763955 |  0.978348825 |  117.4447953 |   11.0349718 |  282.9703306
   68 |     0 |         0.0000 |  14001 |  0.017723966 |    0.04660213 |  1.785804534 |  0.976900923 |   56.4207807 |   22.9702600 |  102.3190628
   69 |     0 |         0.0000 |  14001 |  0.013408861 |    0.04526629 | -0.218064190 |  0.976732181 |   74.5775492 |   17.3778840 |  -12.4941577
   70 |     0 |         0.0000 |  14001 |  0.004944881 |    0.04401069 |  3.792380744 |  0.977679901 |  202.2293298 |    6.4085660 |  217.2874110
   71 |     0 |         0.0000 |  14001 |  0.024477668 |    0.04221972 |  2.795577278 |  0.982048043 |   40.8535657 |   31.7230571 |  160.1747793
   72 |     0 |         0.0000 |  14001 |  0.025733760 |    0.04584982 |  3.159868064 |  0.992264469 |   38.8594588 |   33.3509534 |  181.0471039
   73 |     0 |         0.0000 |  14001 |  0.044937430 |    0.04272239 |  0.214967211 |  0.979101049 |   22.2531639 |   58.2389096 |   12.3167139
   74 |     0 |         0.0000 |  14001 |  0.018373301 |    0.04170326 |  4.267372691 |  0.976418626 |   54.4268023 |   23.8117976 |  244.5024448
   75 |     0 |         0.0000 |  14001 |  0.016041231 |    0.04508949 |  2.028720999 |  0.980103372 |   62.3393556 |   20.7894353 |  116.2371510



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


Source code available at repository below.

Note: There are two branches, "main" contains a new swift package manager version, which can also be compiled for Linux/Windows, and "Accelerate" the original macOS specific one that uses the LinearAlgebra system library.


https://paloz.marum.de/bitbucket/scm/essp/hpnaff.git



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