sky_loc_geographic = lal.SkyPosition() sky_loc_geographic.latitude = rec_ext_params[0] sky_loc_geographic.longitude = rec_ext_params[1] sky_loc_geographic.system=lal.COORDINATESYSTEM_GEOGRAPHIC sky_loc_equatorial = lal.SkyPosition() sky_loc_equatorial.system = lal.COORDINATESYSTEM_EQUATORIAL lal.GeographicToEquatorial(sky_loc_equatorial, sky_loc_geographic, lal.LIGOTimeGPS(1126259462)) rec_right_ascension = [sky_loc_equatorial.longitude] rec_declination = [sky_loc_equatorial.latitude] rec_polarization = [rec_ext_params[2]] reconstruction_data = nrbu.extract_wave(reconstruction_data, config.datalen, config.sample_rate) # Make it iterable so that the BW/CWB codes can be consistent reconstruction_data = [reconstruction_data] setattr(config, 'nsampls', len(reconstruction_data)) elif config.algorithm=='HWINJ': rec_right_ascension = [rec_ext_params[0] / lal.PI_180] rec_declination = [rec_ext_params[1] / lal.PI_180] rec_polarization = [rec_ext_params[2] / lal.PI_180] reconstruction_data = nrbu.extract_wave(reconstruction_data, config.datalen, config.sample_rate) # Make it iterable so that the BW/CWB codes can be consistent
print "selecting out samples %d:%d"%(opts.min_sample, opts.max_sample) idx = range(opts.min_sample, opts.max_sample+1) h1_reconstruction_data = h1_reconstruction_data[idx] l1_reconstruction_data = l1_reconstruction_data[idx] else: print 'using ALL BW samples (%d)'%len(h1_reconstruction_data) setattr(config, 'nsampls', len(h1_reconstruction_data)) elif config.algorithm=='CWB': h1_reconstruction_data = [nrbu.extract_wave(h1_reconstruction_data, config.datalen, config.sample_rate)] l1_reconstruction_data = [nrbu.extract_wave(l1_reconstruction_data, config.datalen, config.sample_rate)] setattr(config, 'nsampls', 1) elif config.algorithm=='HWINJ': h1_reconstruction_data = [nrbu.extract_wave(h1_reconstruction_data, config.datalen, config.sample_rate)] l1_reconstruction_data = [nrbu.extract_wave(l1_reconstruction_data, config.datalen, config.sample_rate)] setattr(config, 'nsampls', 1)