Skip to content
Snippets Groups Projects
Commit 327c546f authored by Ryan's avatar Ryan
Browse files

Allow for cov matrix computations over arbitrary frequency bands. Necessary...

Allow for cov matrix computations over arbitrary frequency bands. Necessary for early warning. Defaults to 10-1024 Hz band.
parent fbade9fb
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,14 @@ parser.add_argument('--psd-xml', help = 'XML containing HLV psd')
parser.add_argument('--H-snr', type = float, help = 'H characteristic SNR')
parser.add_argument('--L-snr', type = float, help = 'L characteristic SNR')
parser.add_argument('--V-snr', type = float, help = 'V characteristic SNR')
parser.add_argument('--flow', type = float, default = 10., help = 'Low frequency cut-off. Default 10 Hz')
parser.add_argument('--fhigh', type = float, default = 1024., help = 'High frequency cut-off. Default 1024 Hz')
parser.add_argument("--output", help = "set the output h5 file, e.g., covmat.h5")
args = parser.parse_args()
if args.flow >= args.fhigh:
raise ValueError("flow cannot be greater than fhigh")
refpsd = args.psd_xml
rho = {"L1": args.L_snr, "H1": args.H_snr, "V1": args.V_snr}
......@@ -56,10 +61,10 @@ sigsqtp = {}
sigsqdd = {}
for ifo in rho:
sigsqf = moment(10, 1024, 2, ifo) - moment(10, 1024, 1, ifo)**2
sigsqf = moment(args.flow, args.fhigh, 2, ifo) - moment(args.flow, args.fhigh, 1, ifo)**2
sigsqtt[ifo] = (1. / (2 * 3.14 * rho[ifo] * sigsqf**.5)**2)
sigsqpp[ifo] = moment(10, 1024, 2, ifo) / (rho[ifo]**2 * sigsqf)
sigsqtp[ifo] = moment(10, 1024, 1, ifo) / (2 * 3.14 * rho[ifo]**2 * sigsqf)
sigsqpp[ifo] = moment(args.flow, args.fhigh, 2, ifo) / (rho[ifo]**2 * sigsqf)
sigsqtp[ifo] = moment(args.flow, args.fhigh, 1, ifo) / (2 * 3.14 * rho[ifo]**2 * sigsqf)
sigsqdd[ifo] = 1. / rho[ifo]**2
transtt = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment