adjusted logging and fixed datatype
This commit is contained in:
parent
8fbebdf798
commit
a1af3848cc
|
@ -139,7 +139,7 @@ def addBurst(values):
|
||||||
bpWeights = create.filter_weights(spectra)
|
bpWeights = create.filter_weights(spectra)
|
||||||
|
|
||||||
pulseNum = rng.integers(1, high=MAX_BURSTS, endpoint=True)
|
pulseNum = rng.integers(1, high=MAX_BURSTS, endpoint=True)
|
||||||
logger.info(f"{basename} loaded. Sampling {pulseNum} pulse(s) {values.nsamp} times.")
|
logger.info(f"{basename} loaded. Injecting {pulseNum} pulses.")
|
||||||
starts = np.linspace(samples//4, 3*(samples//4), num=pulseNum, dtype=int)
|
starts = np.linspace(samples//4, 3*(samples//4), num=pulseNum, dtype=int)
|
||||||
for run in range(pulseNum):
|
for run in range(pulseNum):
|
||||||
start = starts[run]
|
start = starts[run]
|
||||||
|
@ -172,7 +172,8 @@ def addBurst(values):
|
||||||
|
|
||||||
#We need to scale the number of samples with pulse width to (hopefully) maintain constant peak flux
|
#We need to scale the number of samples with pulse width to (hopefully) maintain constant peak flux
|
||||||
scaleFac = (pWidth/(10**(LOG_FIDUCIAL_WIDTH)))
|
scaleFac = (pWidth/(10**(LOG_FIDUCIAL_WIDTH)))
|
||||||
scaledSamps = values.nsamp * scaleFac
|
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
|
pulse = pulseObj.sample_pulse(nsamp=scaledSamps) #30000 by default
|
||||||
|
|
||||||
logger.info("Injecting pulse and saving file.")
|
logger.info("Injecting pulse and saving file.")
|
||||||
|
|
Loading…
Reference in a new issue