def ParallelProcessing(location): Antilocation = location[1:4] P, S = ComputeRIRs(c, Fs, ReceiverLoc, SourceLoc, Antilocation, RoomSize, beta, nsample, mtype, order, dim, orientation, hp_filter) e_cont, Yd = ANCInAction(P, S, x, T, L, mu) Pd_dB, fd, Pe_dB, fe, EstimatedAttenuation, components = metrics( e_cont, Yd, Fs, T) features = np.append(Antilocation, EstimatedAttenuation) features = np.append(features, components) return features
def ParallelProcessing(location): SourceLoc = location[0:3] ReceiverLoc = location[3:6] Antilocation = location[6:9] P, S = ComputeRIRs(c,Fs,ReceiverLoc,SourceLoc,Antilocation,RoomSize,beta,nsample,mtype,order,dim,orientation,hp_filter) PSpecFlat = SpectralFlatness(P, Fs) SSpecFlat = SpectralFlatness(S, Fs) e_cont, Yd = ANCInAction(P, S, x, T, L, mu) # Pd_dB, fd, Pe_dB, fe, EstimatedAttenuation, components = metrics(e_cont, Yd, Fs, T) ANCRed = metrics(e_cont, Yd, Fs, T) features = np.append(location, [PSpecFlat, SSpecFlat, ANCRed]) return features
# print "Generating Input Signal" x = GenerateSignal(T, Fs) # t1 = time.time() print "Computing RIRs" P, S = ComputeRIRs(c, Fs, ReceiverLoc, SourceLoc, AntiNoiseLoc, RoomSize, beta, nsample, mtype, order, dim, orientation, hp_filter) print "Simulating ANC" error, Yd = ANCInAction(P, S, x, T, L, mu) # Pd_dB, fd, Pe_dB, fe, attenuation, components\ # = metrics(error, Yd, Fs, T)# print "Estimated \ # Attenuation is : ", attenuation, components ANCRed = metrics(error, Yd, Fs, T) # # Generate Dynamic Power Spectral Density Graphs TimeDynamics( Pd_dB, fd, Pe_dB, fe,