20047f4faebee3a9f21596bdd24a12df575dcb7a,neurodsp/sim/aperiodic.py,,sim_powerlaw,#Any#Any#Any#Any#,152
Before Change
// Note: the delta exponent to be applied is divided by two, as
// the FFT output is in units of amplitude not power
fft_output_rot = rotate_powerlaw(freqs, fft_output, -exponent/2)
sig = zscore(np.real(np.fft.ifft(fft_output_rot)))
if f_range is not None:
sig = filter_signal(sig, fs, infer_passtype(f_range), f_range, **filter_kwargs)
After Change
// Get the number of samples to simulate for the signal
// If filter is to be filtered, with FIR, add extra to compensate for edges
if f_range and filter_kwargs.get("filt_type", None) != "iir":
pass_type = infer_passtype(f_range)
filt_len = compute_filter_length(fs, pass_type,
*check_filter_definition(pass_type, f_range),
n_seconds=filter_kwargs.get("n_seconds", None),
n_cycles=filter_kwargs.get("n_cycles", 3))
n_samples = int(n_seconds * fs) + filt_len + 1
else:
n_samples = int(n_seconds * fs)
sig = _create_powerlaw(n_samples, fs, exponent)
if f_range is not None:
sig = filter_signal(sig, fs, infer_passtype(f_range), f_range,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: neurodsp-tools/neurodsp
Commit Name: 20047f4faebee3a9f21596bdd24a12df575dcb7a
Time: 2019-08-18
Author: tdonoghue@ucsd.edu
File Name: neurodsp/sim/aperiodic.py
Class Name:
Method Name: sim_powerlaw
Project Name: Qiskit/qiskit-aqua
Commit Name: 59c1a80297b009fafac595538b018c589d778e75
Time: 2018-10-23
Author: chenrich@us.ibm.com
File Name: qiskit_aqua/algorithms/adaptive/vqe/vqe.py
Class Name: VQE
Method Name: _energy_evaluation
Project Name: epfl-lts2/pygsp
Commit Name: 99483e3ca1578397e421a5ea8a5f96e937e59af9
Time: 2017-08-27
Author: michael.defferrard@epfl.ch
File Name: pygsp/graphs/graph.py
Class Name: Graph
Method Name: estimate_lmax