-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I'm getting the following error when trying to simulate a free spectrum GWB with the createGWB function (specifying userSpec):
TypeError: Cannot cast array data from dtype('float128') to dtype('float64') according to the rule 'safe'
Changing 3 lines of code seems to fix this for me.
Line 799 and 800 (https://github.com/vallis/libstempo/blob/master/libstempo/toasim.py#L799) should have an extra float(), so they should read:
start = float(N.min([p.toas().min() * 86400 for p in psr]) - 86400)
stop = float(N.max([p.toas().max() * 86400 for p in psr]) + 86400)
And line 898 (https://github.com/vallis/libstempo/blob/master/libstempo/toasim.py#L898) should have an extra type conversion and it should read:
res_gw.append(f(psr[ll].toas().astype(N.float) * 86400))
If people think this is right I can easily make a pull request.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels