Merge branch 'master' of github.com:othocaes/psdlag-agn

This commit is contained in:
caes 2016-07-11 04:07:16 -04:00
commit fc46068128
41 changed files with 386 additions and 125 deletions

View File

@ -0,0 +1,171 @@
# 0.1 1
56691.5 3.545 0.065
56692.4 3.771 0.067
56693.3 3.814 0.068
56695.3 4.094 0.071
56696.2 4.425 0.075
56697.3 4.53 0.075
56698.3 4.827 0.079
56699.2 4.58 0.076
56700.2 4.6 0.076
56701.4 4.746 0.078
56702.2 4.774 0.078
56703.2 4.756 0.078
56705.3 4.577 0.076
56706.2 4.47 0.075
56707.2 4.665 0.077
56708.3 4.324 0.074
56709.3 4.143 0.071
56710.3 3.769 0.068
56711.1 3.522 0.065
56712.2 3.476 0.064
56713.2 3.518 0.065
56714.2 3.445 0.064
56715.0 3.146 0.061
56715.9 3.058 0.06
56716.8 2.964 0.059
56718.8 2.675 0.056
56720.1 2.601 0.055
56721.0 2.376 0.053
56722.1 2.225 0.051
56723.1 2.187 0.051
56726.1 2.296 0.052
56727.1 2.272 0.051
56727.8 2.307 0.052
56728.9 2.391 0.053
56729.8 2.454 0.054
56730.8 2.422 0.053
56732.0 2.469 0.054
56732.9 2.439 0.053
56733.8 2.494 0.054
56734.8 2.763 0.057
56735.8 3.243 0.062
56736.4 3.578 0.065
56737.7 3.788 0.068
56738.5 3.991 0.07
56739.7 4.246 0.073
56740.4 4.544 0.076
56741.3 4.523 0.076
56744.4 5.435 0.085
56745.3 5.479 0.086
56746.2 5.254 0.084
56747.2 5.659 0.088
56748.2 5.497 0.086
56749.2 5.283 0.084
56750.3 5.155 0.082
56751.2 4.937 0.08
56752.0 4.672 0.077
56753.0 4.089 0.071
56754.0 3.619 0.066
56755.2 3.446 0.064
56756.1 3.546 0.065
56757.1 3.726 0.067
56759.3 3.586 0.066
56760.1 3.568 0.065
56761.1 3.888 0.069
56762.1 3.911 0.069
56763.0 3.932 0.069
56764.2 4.043 0.071
56765.2 3.83 0.068
56766.0 3.949 0.069
56767.0 4.083 0.071
56768.1 4.142 0.072
56769.2 4.528 0.076
56770.1 4.851 0.079
56771.1 4.979 0.081
56772.0 4.965 0.08
56773.1 5.055 0.082
56774.0 5.102 0.082
56774.6 5.004 0.081
56775.6 5.033 0.081
56776.7 4.596 0.077
56777.4 4.632 0.077
56778.5 4.545 0.076
56779.4 4.431 0.075
56780.5 4.556 0.076
56781.4 4.353 0.074
56782.4 4.135 0.072
56783.4 4.528 0.076
56784.8 5.118 0.082
56785.8 5.355 0.085
56786.7 5.037 0.081
56787.3 4.937 0.08
56788.3 4.882 0.08
56789.3 4.609 0.076
56790.3 4.335 0.074
56791.3 4.289 0.073
56792.3 4.553 0.076
56793.2 4.741 0.078
56794.2 4.643 0.077
56795.3 4.364 0.074
56796.1 4.423 0.075
56797.1 4.936 0.08
56798.1 4.948 0.08
56799.2 4.692 0.078
56800.0 4.622 0.077
56801.0 4.809 0.079
56802.0 4.633 0.077
56803.0 4.794 0.079
56805.0 4.473 0.075
56806.0 4.346 0.074
56807.1 4.345 0.074
56808.1 4.478 0.075
56809.1 4.707 0.078
56809.9 4.573 0.076
56810.8 4.465 0.075
56812.0 4.719 0.078
56813.0 4.809 0.079
56814.1 5.004 0.081
56814.9 5.324 0.084
56816.1 5.486 0.086
56816.9 5.576 0.087
56817.9 6.186 0.094
56818.9 6.474 0.097
56819.7 6.463 0.097
56821.0 6.206 0.094
56821.9 5.888 0.091
56822.8 5.736 0.089
56823.8 5.553 0.087
56824.6 5.425 0.085
56825.6 5.133 0.083
56826.9 4.588 0.077
56827.8 4.371 0.074
56828.5 4.394 0.075
56829.6 4.204 0.073
56830.5 4.11 0.071
56831.7 4.171 0.072
56832.3 4.38 0.074
56833.8 4.765 0.079
56834.8 4.738 0.078
56835.8 4.455 0.075
56836.2 4.434 0.075
56837.6 4.431 0.075
56838.2 4.449 0.075
56839.2 4.45 0.075
56840.1 4.52 0.076
56841.2 4.442 0.075
56842.2 4.469 0.075
56843.1 4.231 0.073
56844.2 4.082 0.071
56845.0 4.105 0.071
56846.1 4.033 0.071
56847.0 3.887 0.069
56848.0 3.796 0.068
56849.1 3.71 0.067
56850.0 3.554 0.066
56850.9 3.426 0.064
56851.9 3.377 0.064
56852.9 3.419 0.064
56854.0 3.324 0.063
56855.0 3.457 0.065
56856.2 3.8 0.068
56857.2 4.33 0.074
56858.1 4.513 0.076
56858.9 4.389 0.075
56860.1 4.079 0.071
56860.9 4.043 0.071
56861.8 3.986 0.07
56862.9 3.741 0.068
56863.9 4.104 0.072
56864.9 4.331 0.074
56865.9 4.708 0.078

View File

@ -0,0 +1,177 @@
# 0.1 1
56693.8 0.99818 0.0010832
56694.8 1.0013 0.0011449
56695.7 1.0108 0.0010735
56696.7 1.0136 0.0013874
56697.0 1.0183 0.0036828
56697.8 1.0152 0.0015205
56698.7 1.0214 0.003556
56699.7 1.0193 0.0039285
56700.7 1.0248 0.00057142
56701.6 1.0255 0.0013993
56701.8 1.0204 0.0057308
56702.6 1.0327 0.001377
56703.0 1.0295 0.0058458
56703.9 1.0341 0.0028286
56704.8 1.0351 0.0033558
56705.6 1.0381 0.0025162
56706.0 1.0396 0.0033394
56707.0 1.0394 0.0041289
56708.0 1.0421 0.004911
56709.8 1.0268 0.0044325
56710.7 1.0238 0.0021402
56711.0 1.0269 0.0057723
56711.7 1.0219 0.0010382
56711.9 1.0224 0.0033551
56713.7 1.0099 0.0038844
56713.9 1.0189 0.0036202
56714.7 1.011 0.00047881
56715.9 1.0075 0.0042615
56716.7 1.0073 0.0011921
56717.7 0.99781 0.0010252
56718.0 1.0032 0.0090012
56718.6 1.0009 0.0087718
56718.7 0.98788 0.0009763
56719.6 0.97784 0.010423
56720.7 0.97176 0.001192
56721.7 0.96021 0.00086336
56722.7 0.94266 0.00073112
56723.6 0.9498 0.0011062
56724.5 0.92922 0.0082206
56727.6 0.94276 0.0092891
56728.6 0.94829 0.00078424
56729.5 0.93688 0.00098926
56730.5 0.94341 0.00084999
56730.8 0.93824 0.0053844
56731.5 0.94652 0.000662
56732.5 0.94518 0.00059886
56733.5 0.9465 0.00060471
56733.8 0.94379 0.0041796
56734.5 0.95518 0.00072721
56735.5 0.95214 0.00063674
56735.9 0.95989 0.0042691
56736.5 0.96861 0.00078904
56736.8 0.97435 0.0044905
56737.5 0.98445 0.00084149
56740.9 1.0188 0.0098614
56741.6 1.0135 0.00092777
56741.7 1.0185 0.0087678
56743.6 1.0336 0.006135
56744.5 1.0438 0.0011527
56744.7 1.0422 0.007808
56746.8 1.0507 0.0046892
56748.0 1.0586 0.011607
56748.8 1.0573 0.0073935
56749.8 1.0654 0.0053101
56752.0 1.0668 0.0065078
56752.6 1.071 0.0013997
56753.6 1.0614 0.0013847
56754.6 1.0533 0.0014189
56756.0 1.0354 0.0098934
56756.5 1.0333 0.00084616
56757.1 1.0437 0.011788
56757.5 1.0391 0.00572755
56758.7 1.0349 0.0055304
56759.9 1.0302 0.0031799
56760.2 1.0226 0.0077373
56762.8 1.0162 0.0031825
56763.8 1.0142 0.0031806
56764.8 1.0157 0.0039904
56765.5 1.0193 0.002708
56765.6 1.0163 0.0010884
56765.9 1.013 0.0037752
56766.4 1.0072 0.0035624
56770.5 1.0251 0.0013306
56770.8 1.0251 0.004742
56771.5 1.0229 0.0013331
56772.5 1.0284 0.00074432
56772.8 1.0347 0.0068808
56773.4 1.0354 0.0055093
56773.9 1.0367 0.0065486
56774.8 1.0403 0.011588
56775.4 1.0443 0.0052589
56775.5 1.0462 0.0008261
56776.1 1.0515 0.010514
56776.5 1.0469 0.00075634
56777.5 1.0468 0.0012233
56778.5 1.0451 0.001329
56779.4 1.045 0.0045924
56779.5 1.0426 0.0010962
56779.9 1.0364 0.0064996
56780.5 1.0415 0.0013409
56780.8 1.0399 0.0060786
56781.5 1.0414 0.0013411
56782.4 1.0339 0.0013211
56782.7 1.0358 0.007572
56783.5 1.0321 0.0012952
56784.4 1.0343 0.0013026
56785.5 1.0354 0.0011273
56786.5 1.0373 0.0010105
56787.4 1.0346 0.0008086
56790.5 1.0298 0.00089144
56792.4 1.0234 0.00064158
56793.5 1.0263 0.0011514
56794.5 1.0327 0.0013893
56795.4 1.0266 0.0013657
56796.4 1.0299 0.0016216
56797.4 1.0342 0.0015733
56798.4 1.0344 0.0016566
56799.4 1.0388 0.0015688
56800.4 1.0346 0.0012622
56801.4 1.0319 0.00112
56802.4 1.0336 0.00097995
56803.4 1.0358 0.0014131
56805.5 1.0323 0.0016691
56806.4 1.0272 0.0010286
56807.4 1.0338 0.0012573
56808.4 1.0356 0.0014605
56809.4 1.0365 0.0013149
56810.4 1.0381 0.0014683
56811.4 1.0372 0.001497
56812.4 1.0398 0.001338
56813.4 1.0392 0.0017247
56815.4 1.0443 0.0016613
56816.3 1.0523 0.0027328
56816.4 1.0476 0.0014594
56816.6 1.0492 0.0056383
56817.4 1.0489 0.001355
56817.8 1.0501 0.00461
56818.4 1.0635 0.0012342
56819.3 1.0607 0.0025741
56819.4 1.0671 0.0013257
56820.5 1.0676 0.0010707
56821.2 1.073 0.0031384
56822.4 1.0768 0.0011759
56823.4 1.0863 0.0016316
56824.4 1.0826 0.0017377
56825.3 1.0887 0.0053436
56825.4 1.0888 0.0018402
56826.4 1.0736 0.0018112
56827.4 1.0696 0.0016159
56828.4 1.0676 0.0016659
56829.4 1.0648 0.0015916
56830.4 1.0616 0.0018272
56831.4 1.0419 0.0016339
56832.4 1.0473 0.0015363
56833.4 1.0512 0.0016127
56834.4 1.0565 0.0014259
56835.4 1.0492 0.0015334
56839.3 1.0496 0.0039668
56841.4 1.0514 0.0014987
56842.2 1.0486 0.004392
56843.2 1.0442 0.0041289
56843.4 1.0488 0.0015184
56845.4 1.0415 0.0016418
56847.4 1.0284 0.0012048
56848.4 1.0219 0.00083962
56848.9 1.0252 0.0065753
56850.3 1.0311 0.0029486
56858.4 1.0166 0.0016626
56860.4 1.0135 0.0019027
56861.4 1.0197 0.0013262
56862.4 1.0128 0.0017233
56863.4 1.0119 0.0015518
56864.4 1.0245 0.0018702
56864.7 1.0165 0.0086684
56865.4 1.0165 0.0016406
56865.6 1.0161 0.0088544

10
inputfiles/HST1367_i_7647 Normal file
View File

@ -0,0 +1,10 @@
2
data/STORM_III/lightcurves/HST1367.lc 0
data/STORM_III/lightcurves/i_7647.lc 0
8 0.005 0.019 0.0425 0.07 0.11 0.17 0.24 0.4 0.603
0
1 1 1 0.49 0.42 0.30 0.36 1.2 -0.60 -0.89 -0.72 2.39 -0.74 -1.5 -1 -3.1 -1.3 -2.3 -2 -1.9 -1.6 -2.6 -2 -1.3 -1.8 -2.6 -1.2 0 -2 -2.7 -1.3 0.63
0:0 0
0
0
100 50 50 mcmc.dat

View File

@ -1,10 +0,0 @@
2
data/calibration/lc_drive.dat 0
data/calibration/lc_1.dat 0
1 5e-3 5e-1
0
1 1 1 1
0:1 1
0
0
100 50 50 mcmc.dat

View File

@ -1,10 +0,0 @@
1
../data/calibration/lc_1.dat 0
3 1e-5 1e-4 5e-4 1e-3
1
1 1 1 1 1 1 1 1 1 1 1 1
0 1
0
0
100 50 50 mcmc.dat

View File

@ -4,12 +4,13 @@
# plot 'file' using 1:2:(sqrt($1)) with xerrorbars # plot 'file' using 1:2:(sqrt($1)) with xerrorbars
# plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars # plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars
plot 'tmp.sourcePSD' using 1:($2+2):3:4 with xyerrorbars, \ plot 'tmp.sourcePSD' using 1:($2):3:4 with xyerrorbars, \
'tmp.reprocPSD' using 1:($2+2):3:4 with xyerrorbars, \ 'tmp.reprocPSD' using 1:($2):3:4 with xyerrorbars,
'tmp.ccPSD' using 1:($2+2):3:4 with xyerrorbars #'tmp.ccPSD' using 1:($2):3:4 with xyerrorbars
#plot 'tmp.timelag' using 1:2:3:4 with xyerrorbars #plot 'tmp.timelag' using 1:2:3:4 with xyerrorbars
set logscale x set logscale x
set xrange [0.005:0.603] set xrange [0.005:0.603]
set yrange [-5.5:0.5]
# set yrange [:1] # set yrange [:1]
# (x, y, ydelta), # (x, y, ydelta),
# (x, y, ylow, yhigh), # (x, y, ylow, yhigh),

View File

@ -8,6 +8,7 @@ plot 'tmp.timelag' using 1:2:3:4 with xyerrorbars
#plot 'tmp.timelag' using 1:2:3:4 with xyerrorbars #plot 'tmp.timelag' using 1:2:3:4 with xyerrorbars
set logscale x set logscale x
set xrange [0.005:0.603] set xrange [0.005:0.603]
set arrow from 0.005,0 to 0.603,0 nohead lt 3 lc rgb 'black'
# set yrange [:1] # set yrange [:1]
# (x, y, ydelta), # (x, y, ydelta),
# (x, y, ylow, yhigh), # (x, y, ylow, yhigh),

10
pres/log Normal file
View File

@ -0,0 +1,10 @@
Week 1:
Given four papers to read
Giving version 1 of the psdlag program
spent some time exploring the program
mostly read papers
Week 2:
Given calibration data in the form of light curves produced by a known transfer function

View File

@ -6,7 +6,7 @@ use utf8;
# outputs (stdout) a lightcurve in psdlag circa 2016 Zoghbi @ UMY input format # outputs (stdout) a lightcurve in psdlag circa 2016 Zoghbi @ UMY input format
# smallest time interval. # smallest time interval.
my $Δt = .01; my $Δt = 0.1;
# normalization factor based on inspection of data # normalization factor based on inspection of data
my $flux_norm = 1e14; my $flux_norm = 1e14;
@ -18,8 +18,8 @@ $throw_digits = 5 - $keep_digits;
# Skip first line -- shouldn't need this for a single filter # Skip first line -- shouldn't need this for a single filter
<>; <>;
#Start file with number of light curves (1) and Δt #Start file Δt and with number of light curves (1)
my $linetoprint="# 1 $Δt"; my $linetoprint="# $Δt 1";
my $num_avg = 0; my $num_avg = 0;
while (<>) { while (<>) {
@ -33,6 +33,7 @@ while (<>) {
$t𝓃 += 1; $t𝓃 += 1;
$t𝜀 = 0; $t𝜀 = 0;
} }
if ($Δt >= 1) { $t𝜀 = 0; }
# Print all values for this line # Print all values for this line
# say "$λ\t$t𝓃.$t𝜀$vals"; # say "$λ\t$t𝓃.$t𝜀$vals";

View File

@ -6,9 +6,14 @@ use feature 'say';
use locale; use locale;
use Switch; use Switch;
# This needs to be rewritten to plot the lightcurves instead
# of the PSD and timelags.
# Enables debug output. # Enables debug output.
our $debug=0; our $debug=0;
our #verbose=0;
# This section locate the output data of interest in a # This section locate the output data of interest in a

View File

@ -1,47 +0,0 @@
data check.dat
read f 1
read pow 2
limits f pow
box
ptype 10 3
points f pow
quit
data check.dat
read f 1
read pow 2
limits f pow
ptype 10 3
points f pow
box
quit
data check.dat
read f 1
read pow 2
limits f pow
box
ptype 10 3
points f pow
set lgf = log10(f)
set lgf = alog10(f)
set lgf = lg(f)
erase
box
erase
limits lgf pow
points lgf pow
box
erase
limits lgf 0. 3.
box
points lgf pow
quit
data check.dat
read 1 f
read f 1
read pow 2
set lgf = lg(f)
limits lgf pow
box
ptype 10 3
points lgf pow
quit

View File

@ -1,32 +0,0 @@
To compile, modify the file makefile to so that libdir and incdir point to where
alglib library and header files are installed respectively, then run: make
FILES:
- README: this file
- makefile: a make file for compiling
- main.cpp: the main file, that process the input file, print help message if
needed and reads the light curves files. check readLC to see the light curve
format.
- mod.cpp: contains the class mod, which is a base class that uses the likelihood method. This on its own does nothing, but it is meant to be inherited by others, e.g. psd , lag , lag10
etc ... It is here where the likelihood is calculated, and maximized.
- psd.cpp: a child class of mod to calculate psds. psd10 is similar by it
calculate the log10 of psd. This is better than calculating the psd directly.
- lag.cpp: a child class of mod to calculate cross spectra and phase lags.
similar to psd. there is also lag10 that calcualte the log10 of the cross
spectrum plus phase lag.
- psdlag.cpp: a child class of mod to calculate psd and cross spec and phase
lag at the same time.
- inc: contains the header files.
- inc/mod.hpp: the header for mod.cpp. This file has the Mod class also, which
is a class that holds multiple mod's used for fitting multiple light curve
simultaneusly, each mod fits for one light curve, and the total log-likelihood
is the sum of individual likelihood (i.e. product of probabilities)

View File

@ -1,6 +0,0 @@
2.5e-5 4.681
5.5e-5 3.358
8.5e-5 2.911
1.5e-4 2.650
2.5e-4 1.864
3.5e-4 0.605

View File

@ -1,6 +0,0 @@
1.022e-01 9.694e-01
3.260e-01 9.192e-01
5.118e-01 9.776e-01
3.254e-01 9.269e-01
1.000e+00 9.659e-01
1.000e+00 9.891e-01

View File

@ -2,10 +2,8 @@
#libdir='/eos/azoghbi/soft/usr/lib' #libdir='/eos/azoghbi/soft/usr/lib'
#incdir='/eos/azoghbi/soft/usr/include' #incdir='/eos/azoghbi/soft/usr/include'
libdir='/home/caes/science/psdlag-agn/src' libdir='/home/caes/science/psdlag-agn/src/inc'
incdir='/home/caes/science/psdlag-agn/src/inc' incdir='/home/caes/science/psdlag-agn/src/inc'
psdlag: psdlag:
g++ *cpp -o psdlag -O3 -Wall -lalglib -I${incdir} -L${libdir} g++ *cpp -o psdlag -O3 -Wall -lalglib -I${incdir} -L${libdir}

View File

@ -1,2 +0,0 @@