diff --git a/signalgen.py b/signalgen.py index bdc8ead..60b5662 100755 --- a/signalgen.py +++ b/signalgen.py @@ -31,8 +31,6 @@ LOG_MIN_WIDTH = 0 LOG_MAX_WIDTH = 3 #in ms MAX_BURSTS = 4 LOG_FIDUCIAL_WIDTH = -2.6 -SCALE_SLOPE = 0.2 -SCALE_OFFSET = 1 rng = np.random.default_rng() #This function from https://josephwkania.github.io/will/examples/inject_pulse.html#Show-how-we-can-inject-a-pulse-into-a-GREENBURST-filterbank. @@ -176,7 +174,7 @@ def addBurst(values): ) #We need to scale the number of samples with pulse width to (hopefully) maintain constant peak flux - scaleFac = ((pWidth/(10**(LOG_FIDUCIAL_WIDTH)))*SCALE_SLOPE) + SCALE_OFFSET + scaleFac = pWidth/(10**(LOG_FIDUCIAL_WIDTH)) scaledSamps = int(values.nsamp * scaleFac) logger.info(f"Sampling pulse # {run+1} with width {round(pWidth,3)} s {scaledSamps} times.") pulse = pulseObj.sample_pulse(nsamp=scaledSamps) #30000 by default