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

Compare with Current View Page History

« Previous Version 2 Next »

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


Usage: hpnaff [options] file
file format: tab separated columns, data must be equidistantly spaced.
  -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
  -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
  -a, --abscissaColumn:
      Specify column number for abscissa (time or depth). Default: 1
  -o, --ordinateColumn:
      Specify column number for ordinate (data). Default: 2
  -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: 


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


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


2018-05-25 22:19:09.113 hpnaff[35564:1373047] Welcome to NAFF Analysis (version 0.0.1, build 87).
====================================================================================
Result for chunk #0, t0 = 0.0, npoints = 14001
====================================================================================
    # |    frequency |     amplitude |        phase | significance | period
    0 |  0.000000000 |  -0.000000000 |  0.000000000 |  0.000000000 |         inf
    1 |  0.002472456 |   0.757212580 |  3.740563127 |  0.795224850 |  404.456107560
    2 |  0.010522542 |   0.596395138 | -0.083030087 |  0.840326031 |  95.034067178
    3 |  0.024999241 |   0.538777718 |  5.657761056 |  0.827374133 |  40.001214452
    4 |  0.008040668 |   0.508032903 |  2.884638325 |  0.832167805 |  124.367784056
    5 |  0.010102115 |   0.397667017 |  4.191460368 |  0.868275179 |  98.989173837
    6 |  0.042828239 |   0.311151517 |  1.466354054 |  0.901608023 |  23.349080552
    7 |  0.007627856 |   0.307069111 |  0.558756626 |  0.900168885 |  131.098445293
    8 |  0.000407279 |   0.270972306 |  2.625060814 |  0.917986628 |  2455.319307955
    9 |  0.045302069 |   0.261488868 |  5.142663968 |  0.908826103 |  22.074046985
   10 |  0.025832617 |   0.239077036 |  3.749692169 |  0.917331367 |  38.710750578
   11 |  0.001034652 |   0.228879199 |  0.316263467 |  0.926607014 |  966.508149622
   12 |  0.053350844 |   0.233118636 |  1.355155680 |  0.912974999 |  18.743845802
   13 |  0.009911387 |   0.180794855 |  5.692180009 |  0.941223401 |  100.894049260
   14 |  0.019210470 |   0.156735090 | -0.475810930 |  0.949106113 |  52.054947590
   15 |  0.052929481 |   0.148414974 |  5.755576067 |  0.947991689 |  18.893062568
   16 |  0.009488271 |   0.151120407 | -0.166596809 |  0.960411285 |  105.393275496
   17 |  0.025098798 |   0.173119129 |  2.629896210 |  0.958954086 |  39.842545378
   18 |  0.025414340 |   0.143558625 |  4.818018440 |  0.948646430 |  39.347863674
   19 |  0.024888808 |   0.140983123 |  5.710170223 |  0.964800625 |  40.178702286
   20 |  0.010323185 |   0.136999895 | -1.010239649 |  0.950068676 |  96.869328260
   21 |  0.007440236 |   0.129869972 |  2.040413382 |  0.952028441 |  134.404332461
   22 |  0.001455303 |   0.127088367 |  2.315320953 |  0.947284449 |  687.142236878
   23 |  0.010925100 |   0.118174480 | -0.359553604 |  0.955088752 |  91.532340184
   24 |  0.009667251 |   0.118742507 |  2.622499900 |  0.954076811 |  103.442028020
   25 |  0.010413463 |   0.097153148 |  2.916722301 |  0.980490596 |  96.029531115
   26 |  0.000901134 |   0.095697259 |  1.601650029 |  0.968540900 |  1109.712452310
   27 |  0.012994167 |   0.100860026 |  0.611296592 |  0.967944111 |  76.957605655
   28 |  0.042724400 |   0.094866769 |  1.049712361 |  0.980633320 |  23.405829053
   29 |  0.000231340 |   0.098133488 |  0.120421080 |  0.967044518 |  4322.646946486
   30 |  0.005563540 |   0.100099236 |  2.397732816 |  0.967425007 |  179.741684838
   31 |  0.010638958 |   0.096886476 | -0.508418535 |  0.964555310 |  93.994171273
   32 |  0.008918727 |   0.087419440 |  2.593049362 |  0.963917464 |  112.123621504
   33 |  0.007853668 |   0.094319211 |  1.158980975 |  0.966015093 |  127.329036329
   34 |  0.024592220 |   0.088281709 |  3.104291583 |  0.962948350 |  40.663266000
   35 |  0.008385587 |   0.086411148 |  2.992612019 |  0.964466604 |  119.252237323
   36 |  0.018145511 |   0.087636600 |  3.810401953 |  0.965100179 |  55.110047705
   37 |  0.024810831 |   0.082402914 |  4.521072773 |  0.982190253 |  40.304978798
   38 |  0.042929640 |   0.094704590 | -1.714770841 |  0.974168395 |  23.293929578
   39 |  0.001312871 |   0.080746840 |  0.777678559 |  0.975863805 |  761.689238250
   40 |  0.002884917 |   0.080651967 |  2.947032331 |  0.969528197 |  346.630392004
   41 |  0.009282092 |   0.079959116 | -0.902914843 |  0.959472393 |  107.734329638
   42 |  0.002172887 |   0.078981947 |  1.985388426 |  0.966843584 |  460.217146189
   43 |  0.025182288 |   0.073513989 |  1.270869449 |  0.989395182 |  39.710451171
   44 |  0.002006049 |   0.071224738 |  1.007509626 |  0.970121706 |  498.492305023
   45 |  0.008233354 |   0.070184619 |  4.902074995 |  0.962605563 |  121.457185371
   46 |  0.043838032 |   0.067153518 |  3.232504870 |  0.965810782 |  22.811242757
   47 |  0.007224019 |   0.065314517 |  4.276908700 |  0.978785703 |  138.427109173
   48 |  0.045402169 |   0.074364955 |  2.063108567 |  0.977076727 |  22.025379384
   49 |  0.002344771 |   0.064022374 |  1.101841660 |  0.974716536 |  426.480953885
   50 |  0.034012471 |   0.066322615 |  0.311286788 |  0.964879805 |  29.400980805
   51 |  0.000615717 |   0.069559588 |  0.324652543 |  0.966238480 |  1624.122607304
   52 |  0.024999132 |   0.061254580 |  3.871230105 |  0.987944595 |  40.001388899
   53 |  0.012584554 |   0.063521033 |  4.354136360 |  0.970616108 |  79.462488586
   54 |  0.007042302 |   0.059543688 |  3.178070923 |  0.967975778 |  141.999016714
   55 |  0.053168977 |   0.061269714 | -0.361831194 |  0.974607868 |  18.807960251
   56 |  0.018476857 |   0.056759013 |  1.358226606 |  0.977498039 |  54.121759352
   57 |  0.025289765 |   0.066212174 | -0.908124084 |  0.973848256 |  39.541687368
   58 |  0.045202487 |   0.059799101 |  4.539755924 |  0.986931114 |  22.122676645
   59 |  0.001552070 |   0.054590464 |  3.384103236 |  0.981459103 |  644.300807183
   60 |  0.010774958 |   0.060138733 | -0.920994107 |  0.970525652 |  92.807787274
   61 |  0.035180014 |   0.053811680 |  6.108664478 |  0.971837151 |  28.425230157
   62 |  0.025932854 |   0.054971847 |  0.528441572 |  0.981080765 |  38.561123691
   63 |  0.019098347 |   0.052896068 |  5.666427658 |  0.977106362 |  52.360552712
   64 |  0.052829237 |   0.055926367 |  4.622260329 |  0.978276068 |  18.928912249
   65 |  0.011547573 |   0.050307176 |  3.661455370 |  0.969207740 |  86.598282527
   66 |  0.052667555 |   0.047716444 |  4.565272411 |  0.975236135 |  18.987021550
   67 |  0.008514638 |   0.048040637 |  4.938804770 |  0.978348984 |  117.444807131
   68 |  0.017723966 |   0.046602133 |  1.785804954 |  0.976900743 |  56.420780704
   69 |  0.013408861 |   0.045266295 | -0.218064195 |  0.976731995 |  74.577549153
   70 |  0.004944881 |   0.044010691 |  3.792380701 |  0.977679719 |  202.229329799
   71 |  0.024477668 |   0.042219718 |  2.795577480 |  0.982047895 |  40.853565749
   72 |  0.025733760 |   0.045849831 |  3.159867126 |  0.992264397 |  38.859458840
   73 |  0.044937430 |   0.042722395 |  0.214967593 |  0.979100870 |  22.253163894
   74 |  0.018373301 |   0.041703260 |  4.267372590 |  0.976418419 |  54.426802324
   75 |  0.016041231 |   0.045089487 |  2.028721000 |  0.980103194 |  62.339355607
====================================================================================

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