From 630275a5a049d5bf68e859fcde449c7e78add976 Mon Sep 17 00:00:00 2001 From: caes Date: Thu, 22 Jun 2017 15:19:38 -0400 Subject: [PATCH] fixed cross spectrum errors --- scripts/compute_psdlags.sh | 2 +- scripts/psdlag_4bin.py | 1 + scripts/psdlag_5bin.py | 1 + scripts/psdlag_6bin.py | 1 + scripts/psdlag_7bin.py | 1 + scripts/psdlag_8bin.py | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/compute_psdlags.sh b/scripts/compute_psdlags.sh index a95d2f2..1b119aa 100755 --- a/scripts/compute_psdlags.sh +++ b/scripts/compute_psdlags.sh @@ -3,7 +3,7 @@ mkdir -p data/tables mkdir -p logs -analysis_script="psdlag_5bin.py" +analysis_script="psdlag_4bin.py" ref_band="1367A" refpsd_tabfile=data/tables/psd_${ref_band}.tab diff --git a/scripts/psdlag_4bin.py b/scripts/psdlag_4bin.py index 2c78827..0f85be9 100755 --- a/scripts/psdlag_4bin.py +++ b/scripts/psdlag_4bin.py @@ -77,6 +77,7 @@ Cx = clag.clag('cxd10r', # a good starting point generally p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) p, pe = clag.optimize(Cx, p) +p, pe = clag.errors(Cx, p, pe) phi, phie = p[nfq:], pe[nfq:] lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd) diff --git a/scripts/psdlag_5bin.py b/scripts/psdlag_5bin.py index 45cde88..afff3b0 100755 --- a/scripts/psdlag_5bin.py +++ b/scripts/psdlag_5bin.py @@ -80,6 +80,7 @@ echo_psd_err = p2e Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2) p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally p, pe = clag.optimize(Cx, p) +p, pe = clag.errors(Cx, p, pe) phi, phie = p[nfq:], pe[nfq:] lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd) diff --git a/scripts/psdlag_6bin.py b/scripts/psdlag_6bin.py index 364eb00..8432d8b 100755 --- a/scripts/psdlag_6bin.py +++ b/scripts/psdlag_6bin.py @@ -80,6 +80,7 @@ echo_psd_err = p2e Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2) p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally p, pe = clag.optimize(Cx, p) +p, pe = clag.errors(Cx, p, pe) phi, phie = p[nfq:], pe[nfq:] lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd) diff --git a/scripts/psdlag_7bin.py b/scripts/psdlag_7bin.py index 2d4e5a4..55ea350 100755 --- a/scripts/psdlag_7bin.py +++ b/scripts/psdlag_7bin.py @@ -79,6 +79,7 @@ echo_psd_err = p2e Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2) p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally p, pe = clag.optimize(Cx, p) +p, pe = clag.errors(Cx, p, pe) phi, phie = p[nfq:], pe[nfq:] lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd) diff --git a/scripts/psdlag_8bin.py b/scripts/psdlag_8bin.py index 18cf6f5..a930ad3 100755 --- a/scripts/psdlag_8bin.py +++ b/scripts/psdlag_8bin.py @@ -70,6 +70,7 @@ echo_psd_err = p2e Cx = clag.clag('cxd10r', [[t1,t2]], [[l1,l2]], [[l1e,l2e]], dt, fqL, p1, p2) p = np.concatenate( ((p1+p2)*0.5-0.3,p1*0+0.1) ) # a good starting point generally p, pe = clag.optimize(Cx, p) +p, pe = clag.errors(Cx, p, pe) phi, phie = p[nfq:], pe[nfq:] lag, lage = phi/(2*np.pi*fqd), phie/(2*np.pi*fqd)