Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spectro_analysis Error: "integer overflow" #50

Open
CarolineTroy opened this issue Jul 31, 2022 · 3 comments
Open

spectro_analysis Error: "integer overflow" #50

CarolineTroy opened this issue Jul 31, 2022 · 3 comments

Comments

@CarolineTroy
Copy link

Hi, I'm trying to run the spectro_analysis() function on Mac for a data table of about 5000 selections made by auto_detec() from bird audio files.

It is getting about halfway through before giving this error: "Error in m[(fl[1]:fl[2]) + 1, ] : subscript out of bounds"
When I look at the warnings, there are fifty "In (0:(n - 1)) * f : NAs produced by integer overflow" errors.

Any advice on how to resolve this would be much appreciated!

@maRce10
Copy link
Owner

maRce10 commented Aug 1, 2022

can you please share the code? You can also try check_sels() on the selection table to try to find problematic selections.

@CarolineTroy
Copy link
Author

Hi, thank you for your reply.

Below is the code for the detection process and the analysis:
XCWarbler1_detec = auto_detec(bp = c(.5, 7), threshold = 5, mindur = 0.4, maxdur = 1.3, ssmooth = 800)
XCWarbler1_detec2 = na.omit(XCWarbler1_detec)
XCW1_Analysis = spectro_analysis(XCWarbler1_detec2, bp = c(.5, 8))

When I try checksels() on the selection table after removing NA's, I get "all selections are OK but not all sound files have the same sampling rate (potentially problematic, particularly for cross_correlation())"

@maRce10
Copy link
Owner

maRce10 commented Aug 2, 2022

Sounds like a bug. Can you please share the data in extended selection format? You will have to convert the data frame into that format, then save it as an RDS file and send it to me (upload it to this link). Like this:


# convert into extended selection table
XCWarbler1_detec2_est <- selection_table(XCWarbler1_detec2, extended = TRUE, confirm.extended = FALSE)


# save RDS
saveRDS(XCWarbler1_detec2_est, "XCWarbler1_detec2_est.RDS")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants