@@ -71,7 +71,8 @@ parser.add_argument("--smoothing-width", type=float, required=True,
7171 help = "Distance in the space of fit param values (or the "
7272 "logs of them) to smooth over. Required. For log "
7373 "template duration, try 0.2" )
74-
74+ parser .add_argument ('--eccentricity-flag' , action = 'store_true' ,
75+ help = 'eccentricity flag' )
7576args = parser .parse_args ()
7677
7778if args .regression_method == 'nn' and args .num_neighbors < 1 :
@@ -96,8 +97,12 @@ if args.use_template_fit_param:
9697else :
9798 logging .info ('Calculating template parameter values' )
9899 bank = HFile (args .bank_file , 'r' )
99- m1 , m2 , s1z , s2z = triggers .get_mass_spin (bank , tid )
100- parvals = triggers .get_param (args .fit_param , args , m1 , m2 , s1z , s2z )
100+ if not args .eccentricity_flag :
101+ m1 , m2 , s1z , s2z = triggers .get_mass_spin (bank , tid )
102+ parvals = triggers .get_param (args .fit_param , args , m1 , m2 , s1z , s2z )
103+ if args .eccentricity_flag :
104+ m1 , m2 , s1z , s2z , e0 = triggers .get_mass_spin_eccentricity (bank , tid )
105+ parvals = triggers .get_param_eccentric (args .fit_param , args , m1 , m2 , s1z , s2z , e0 )
101106
102107if 'count_in_template' in fits .keys (): # recently introduced extra dataset
103108 tcount = True
@@ -198,7 +203,7 @@ outfile.attrs.create('regression_method', data=args.regression_method)
198203if args .num_neighbors > 0 :
199204 outfile .attrs .create ('n_neighbors' , data = args .num_neighbors )
200205outfile .attrs .create ('smoothing_width' , data = args .smoothing_width )
201- if 'analysis_time' in fits .attrs :
206+ if 'analysis_time' in fits .attrs :
202207 outfile .attrs ['analysis_time' ] = fits .attrs ['analysis_time' ]
203208
204209# add a magic file attribute so that coinc_findtrigs can parse it
0 commit comments