Commit 843a8342 authored by Rory Smith's avatar Rory Smith
Browse files

added function to compute roq mass-frequency scale factor

Original: ac6b1fc06c42971b7eb58c54d437a1bbbbd2c7b9
parent cd3e1441
......@@ -498,7 +498,16 @@ def get_roq_mchirp_priors(path, roq_paths, roq_params, key, gid):
return mc_priors, trigger_mchirp
def get_roq_mass_freq_scale_factor(mc_priors, trigger_mchirp):
mc_max = mc_priors['4s'][1]
mc_min = mc_priors['128s'][0]
scale_factor = 1
if trigger_mchirp >= mc_max:
scale_factor = 2**(math.floor(trigger_mchirp/mc_max))
if trigger_mchirp <= mc_min:
scale_factor = 1./2**(math.floor(trigger_mchirp/mc_min))
print scale_factor
return scale_factor
def create_pfn_tuple(filename,protocol='file://',site='local'):
return( (os.path.basename(filename),protocol+os.path.abspath(filename),site) )
......
......@@ -99,6 +99,8 @@ if cp.has_option('paths','roq_b_matrix_directory'):
print "WARNING: Overwriting user choice of flow, srate, seglen,mc_min, mc_max and q-min"
mc_priors, trigger_mchirp = pipe_utils.get_roq_mchirp_priors(path, roq_paths, roq_params, key, opts.gid)
roq_mass_freq_scale_factor = pipe_utils.get_roq_mass_freq_scale_factor(mc_priors, trigger_mchirp)
else:
roq_paths=[None]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment