Skip to content

Commit

Permalink
Re-ordered guvectorize and updated unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
clara-escanuela committed Nov 2, 2023
1 parent ba646c7 commit d035cfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ctapipe/image/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ def integration_correction(

@guvectorize(
[
(float64[:], float32[:], float32[:], float32[:]),
(float32[:], float32[:], float32[:], float32[:]),
(float64[:], float32[:], float32[:], float32[:]),
],
"(s)->(),(),()",
nopython=True,
Expand Down
4 changes: 2 additions & 2 deletions ctapipe/image/tests/test_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ def test_fwhm(toymodel):

for i in range(0, len(waveforms)):
peak_index = np.argmax(waveforms[i])
width, width_height, l_ips, r_ips = peak_widths(
widths = peak_widths(
waveforms[i],
peaks=[
peak_index,
],
rel_height=0.5,
)

fwhm_scp = np.append(fwhm_scp, width)
fwhm_scp = np.append(fwhm_scp, widths[0])

fwhm, _, _ = time_parameters(
waveforms,
Expand Down

0 comments on commit d035cfd

Please sign in to comment.