-------------------------------- TEST_3 : Analysis of the results -------------------------------- F. Mignard 12/07/05 -------------------------------- Warning : tests to be run with famous_driver_simul (for simulation) and not famous_driver (for external data) for your run of the test '_ij' with famous_driver_simul you must change each setting setting_simul_ij.txt into setting_simul.txt or change the name of the setting file in the driver. chexk that in famous_driver_simul you have 'call signal_nominal' uncommented and the other two commented. from open(unit = 2, file = 'setting_simul.txt', status = 'old') ! settings to open(unit = 2, file = 'setting_simul_ij.txt', status = 'old') ! settings with ij = 01, 02 .... To run simul_04 you must change the sampling in the routine Subroutine signal_nominal(npts,x,y) from integer, parameter :: isample = 1 ! kind of sampling (1: regular, 2: uniform random, 3 : gaia-like, 4: poisson) to integer, parameter :: isample = 4 ! kind of sampling (1: regular, 2: uniform random, 3 : gaia-like, 4: poisson) The results depend on random number generator, so they will differ slightly from the reference given in this directory and will change from run to run. The series of tests in directory /Famous/test_3 are based on simulations and aim to show how to use and expermient with the simulator. There are many more possibilities than these few tests and you could start from one of them and modify the signal generating function in simul_famous to experiment. The signal simulated is always the same : - four lines of periods 5, 3, 2 and 1 days (or whatever unit you may like) - amplitudes cos sin amplitude 5 2.5 -0.5 2.550 3 2.5 -0.5 2.550 2 0.5 -0.3 0.583 1 1.0 2.0 2.236 - Gaussian noise with sigma = 0.2 - timespan = 760 days (152 time the period of the first line) - the sampling is regular (simul_01, simul_02, simul_03 ) - the sampling is exponential (simul_04 ) Setting : one changes the number of data points between the test to show the aliasing in the recovery of the line with shortest period. Different sampling method are used. a - regular with constant step ; b - random with exponential waiting time. Simul_01 setting_simul_01 - with ndata = 2000 and regular sampling dt = 760/2000 = 0.380 d nu_max = 1.31 cy/d the line with period 1 days :: nu_m = 1 cy/day is found with correct frequency and amplitude. Simul_02 setting_simul_02 - with ndata = 1000 and regular sampling to illustrate the aliasing dt = 760/1000 = 0.760 nu_max = 0.657 the line with period 1 days :: nu_m = 1 cy/day is not in the range and only an alias is seen at nu = 2*nu_m-1 = 0.313 period = 3.19 day with the correct amplitude. Simul_03 setting_simul_03 - with ndata = 2000 and regular sampling Same as simul_01 but searching for 5 lines to illustrate the filtering. Simul_04 setting_simul_04 - with ndata = 1000 and more or less random sampling dt = 760/1000 = 0.760 nu_max = 0.657 nu_max found by the program is : and the line with period 1 days :: nu_m = 1 cy/day is recovered at its correct frequency. Analysis of the results : WARNING : the origin of time in the solution is not the same as in the data, so one cannot compare directly the amplitude in cosine and sines, but just the power. simul_01 : spectra_simul_01.txt - nu_max = 1.313 cy/day - the four line are properly recovered with error in agreement with sigma = 0.2 - the final RMS is about 0.2 as expected. - see the evolution of the RMS as more lines are included. simul_02 : spectra_simul_02.txt - nu_max = 0.657 cy/day - the lines with period > 1.52 d are properly recovered with error in agreement with sigma = 0.2 - the line of period 1 day (nu=nu_0 =1 cy/d) is aliased in the line nu = 2nu_nyquist - nu_0 = 0.313 or period of 3.19 days. Its amplitude is correct anyway. - the final RMS is about 0.2 as expected. see the initial periodogram showing the four lines and the small level of noise simul_03 : spectra_simul_03.txt - nu_max = 1.313 cy/day - the spurious line is recognised not statistically significant and removed one should however note that its amplitude is rather close to the threshold, meaning that a nearly white noise can be mimic with a periodic line - final results identical to simul_01 simul_04 : spectra_simul_04.txt - sampling with exponential waiting time :: set isample = 4 in the routine signal_nominal(npts,x,y) in simul_famous.f90 - nu_max = 2.18 cy/day p < 0.5 days found by the program - then all the lines are properly recovered without aliasing - note that the running time is longer that in simul_02 : 0.84 sec vs. 0.26 because : * more frequencies to explore 4376 vs. 1244 ~ " 3.5 see the initial periodogram showing the four lines (in good positions) and the level of noise much higher with the random sampling than with a regular one of similar stepsize. This is the price to pay to avoid aliasing. The line of period P = 2 day (nu = 0.5), amplitude 0.58, is hardly visible in the initial periodogram, but its S/N becomes significant later and the line is recovered with the correct parameters.