This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"PeriodsPhase":[13.599781479999999,7.510001926736354,18.679732370000025,7.195787246118572,20.998850680000004,9.392972953999996,6.001334823,10.345732619999998,9.26752208,6.276528506318169,6.158543069000001,15.797059490000018,5.047887753499271,7.347247053426061,1.7632983608814414,6.514613283064518,7.845674634],"Hold":0.0015847482104409999,"Initial":0.019102685632566375,"Imp_Stride":2,"LTE_Freq":182.73199150000377,"Periods":[27.2122,27.3216,27.5545,13.63339513,13.69114014,13.6061,13.6608,13.71877789,6795.985773,1616.215172,2120.513853,13.77725,3232.430344,9.132931547,9.108450374,9.120674533,27.0926041],"LTE_Amp":1.2282362293246383,"DeltaTime":0.0,"Imp_Amp":38.41771511999972,"AliasedPhase":[12.936492162500015,10.819234671777158,17.28825828537955,9.83624739277385,24.275678314901782,15.228945466500011,8.477116474739738,14.315824278046344,9.824004490952355,6.960279582531864,4.2964023424706665,19.297607654892147,3.967560759570126,22.113385778146025,8.444613035937136,4.885017823159738,10.475305999774953,6.49431729103 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| timeseries_modeler.py | |
| Read a two-column CSV (time, value). Read a JSON file with the same filename | |
| appended by ".p" (e.g. data.csv.p) into a data dictionary. Create a clone of the | |
| time-series and run a loop that steps through timestamps, calling a user- | |
| customizable model-step function to produce a modeled series. At the end the | |
| script computes Pearson's correlation coefficient and the variance of the | |
| squared errors (and also MSE), using library routines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1884.0000000000 | 0.4205700000 | |
|---|---|---|
| 1884.0833333333 | 0.3868980000 | |
| 1884.1666666667 | 0.7086080000 | |
| 1884.2500000000 | 0.6610860000 | |
| 1884.3333333333 | 0.7397180000 | |
| 1884.4166666667 | 0.7168100000 | |
| 1884.5000000000 | 0.8215940000 | |
| 1884.5833333333 | 1.0048380000 | |
| 1884.6666666667 | 1.0588480000 | |
| 1884.7500000000 | 1.3143980000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from vpython import * | |
| Running = True | |
| def exit_app(evt): | |
| global Running | |
| if evt.key == 'q': # Press 'q' to quit | |
| print("Exiting simulation...") | |
| Running = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from scipy.signal import periodogram, windows | |
| # Parameters | |
| years = 500 | |
| dt = 1 / 365.25 # daily resolution | |
| t = np.arange(0, years, dt) | |
| fs = 1 / dt # sampling frequency in cycles per year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with Text_IO; | |
| with GEM.LTE.Primitives; | |
| function GEM.Mix_Regression (File_Name : in String) return Gem.LTE.Period_Set is | |
| use GEM.LTE, GEM.LTE.Primitives; | |
| D : Data_Pairs := Make_Data(File_Name); | |
| First, Last : Integer; | |
| Singular : Boolean; | |
| Forcing : Data_Pairs := D; | |
| Model : Data_Pairs := D; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Tide_Sum_Custom (Template : in Data_Pairs; | |
| Constituents : in Long_Periods_Amp_Phase; | |
| Periods : in Long_Periods; | |
| Ref_Time : in Long_Float := 0.0; | |
| Scaling : in Long_Float := 1.0; | |
| Cos_Phase : in Boolean := True; | |
| Year_Len : in Long_Float := Year_Length; | |
| Integ: in Long_Float := 0.0; | |
| Ext_Forcing : in Data_Pairs := Empty_Data; | |
| Ext_Factor : in Long_Float := 0.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| def load_signal(csv_path): | |
| df = pd.read_csv(csv_path) | |
| time = df.iloc[:, 0].values | |
| signal = df.iloc[:, 1].values | |
| return time, signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| # Data as multiline string (X, Y, Z, Diameter) | |
| data = """ | |
| 1 0 0 0.212566 | |
| 1 0 1 0.504368 | |
| 0 2 2 0.514627 | |
| 0 -2 2 0.089845 | |
| 0 0 2 0.135412 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GEM-LTE |
NewerOlder