Skip to content

Commit

Permalink
clamp tw_start/stop (#217)
Browse files Browse the repository at this point in the history
* clamp tw_start/stop

* np --> numpy

* <bot> update dependencies*.log files(s)

---------

Co-authored-by: wipacdevbot <[email protected]>
  • Loading branch information
tianluyuan and wipacdevbot authored Sep 24, 2023
1 parent 99a5c3e commit ecf2c52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dependencies-from-Dockerfile.log
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ typing_extensions==4.8.0
ufoLib2==0.13.1
unicodedata2==14.0.0
UNKNOWN @ file:///root/nuflux-2.0.4
urllib3==2.0.4
urllib3==2.0.5
urwid==2.1.2
wcwidth==0.2.5
webencodings==0.5.1
Expand Down
2 changes: 1 addition & 1 deletion dependencies-from-Dockerfile_pulsar.log
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ typing_extensions==4.8.0
ufoLib2==0.13.1
unicodedata2==14.0.0
UNKNOWN @ file:///root/nuflux-2.0.4
urllib3==2.0.4
urllib3==2.0.5
urwid==2.1.2
wcwidth==0.2.5
webencodings==0.5.1
Expand Down
4 changes: 2 additions & 2 deletions skymap_scanner/recos/common/pulse_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def pulse_cleaning(
all_ts.extend(ts)
cs = numpy.asarray([p.charge for p in ps])
all_cs.extend(cs)
tw_start = weighted_quantile(numpy.asarray(all_ts), numpy.asarray(all_cs), 0.1) - 1000
tw_stop = weighted_quantile(numpy.asarray(all_ts), numpy.asarray(all_cs), 0.95) + 1000
tw_start = max(weighted_quantile(numpy.asarray(all_ts), numpy.asarray(all_cs), 0.1) - 1000, min(all_ts))
tw_stop = min(weighted_quantile(numpy.asarray(all_ts), numpy.asarray(all_cs), 0.95) + 1000, max(all_ts))
for omkey, ps in pulses.items():
ts = numpy.asarray([p.time for p in ps])
cs = numpy.asarray([p.charge for p in ps])
Expand Down

0 comments on commit ecf2c52

Please sign in to comment.