added pulse width flag
This commit is contained in:
parent
8752e51946
commit
cc338385d4
|
@ -155,7 +155,7 @@ def addBurst(values):
|
|||
file.write(f"{str(round(dm)).ljust(6)} pc/cc {str(round(pWidth,3))} s {basename}\n")
|
||||
else:
|
||||
dm = values.dm
|
||||
pWidth = 0.001
|
||||
pWidth = values.pWidth
|
||||
|
||||
#first version is very simple, plan on adding more complex injections in future
|
||||
pulseObj = create.SimpleGaussPulse(
|
||||
|
@ -248,6 +248,9 @@ if __name__ == "__main__":
|
|||
parser.add_argument(
|
||||
"-d", "--dm", dest="dm", type=float, help="DM of injected pulse."
|
||||
)
|
||||
parser.add_argument(
|
||||
"-w", "--width", dest=pWidth, type=float, help="Width of desired pulse in seconds."
|
||||
)
|
||||
parser.add_argument(
|
||||
"-n", "--nsamp", type=int, help="Number of samples to take of the generated pulse."
|
||||
)
|
||||
|
@ -261,6 +264,7 @@ if __name__ == "__main__":
|
|||
"-o", "--output", dest="output", type=str, help="Set output directory."
|
||||
)
|
||||
parser.set_defaults(dm=250.0)
|
||||
parser.set_defaults(pWidth=0.001)
|
||||
parser.set_defaults(nsamp=int(3e5))
|
||||
parser.set_defaults(listfile=None)
|
||||
parser.set_defaults(file=None)
|
||||
|
|
Loading…
Reference in a new issue