first key addition
This commit is contained in:
parent
a6f707d58f
commit
bb36dffab5
|
@ -125,13 +125,14 @@ def addBurst(values):
|
||||||
#and save the new plot
|
#and save the new plot
|
||||||
show_dynamic(injectedSpectra, f"{basename} Dynamic Spectra and {values.dm} DM Pulse", save=True)
|
show_dynamic(injectedSpectra, f"{basename} Dynamic Spectra and {values.dm} DM Pulse", save=True)
|
||||||
#now generate new filterbank file
|
#now generate new filterbank file
|
||||||
|
newName = f"{basename}_injected.fil"
|
||||||
#build header from original file
|
#build header from original file
|
||||||
headerDic = filterbankObj.your_header.__dict__
|
headerDic = filterbankObj.your_header.__dict__
|
||||||
#remove extraneous keys
|
#remove extraneous keys
|
||||||
for key in ['filelist', 'filename']:
|
for key in ['filelist', 'filename']:
|
||||||
headerDic.pop(key, None)
|
headerDic.pop(key, None)
|
||||||
|
headerDic['rawdatafile'] = newName
|
||||||
sigprocObj = make_sigproc_object(**headerDic)
|
sigprocObj = make_sigproc_object(**headerDic)
|
||||||
newName = f"{basename}_injected.fil"
|
|
||||||
sigprocObj.write_header(newName)
|
sigprocObj.write_header(newName)
|
||||||
sigprocObj.append_spectra(injectedSpectra, newName)
|
sigprocObj.append_spectra(injectedSpectra, newName)
|
||||||
logger.info(f"{newName} successfully written.")
|
logger.info(f"{newName} successfully written.")
|
||||||
|
|
Loading…
Reference in a new issue