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

uncaught errors in analyse_SAR.TL() #147

Closed
mcol opened this issue Aug 16, 2024 · 1 comment · Fixed by #247
Closed

uncaught errors in analyse_SAR.TL() #147

mcol opened this issue Aug 16, 2024 · 1 comment · Fixed by #247
Assignees
Milestone

Comments

@mcol
Copy link
Contributor

mcol commented Aug 16, 2024

Validation in analyse_SAR.TL() should be improved to generate better error messages in these cases:

data(ExampleData.BINfileData, envir = environment())
object <- Risoe.BINfileData2RLum.Analysis(TL.SAR.Data, pos = 3)

analyse_SAR.TL(list(object, object),
               sequence.structure = c("SIGNAL", "BACKGROUND"))
# Error in h(simpleError(msg, call)) : 
#  error in evaluating the argument 'object' in selecting a method for function 'get_RLum':
#   argument "signal.integral.min" is missing, with no default

analyse_SAR.TL(list(object, object),
               signal.integral.min = 210, signal.integral.max = 220,
               sequence.structure = c("SIGNAL", "BACKGROUND"))
# Error in FUN(X[[i]], ...) : 
#  argument "dose.points" is missing, with no default

analyse_SAR.TL(list(object, object),
               signal.integral.min = 210, signal.integral.max = 220, dose.points = 2,
               sequence.structure = c("SIGNAL", "BACKGROUND"))
# Error in dimnames(x) <- dn : 
#  length of 'dimnames' [2] not equal to array extent

analyse_SAR.TL(list(object, object),
               signal.integral.min = 210, signal.integral.max = 220, dose.points = c(2, 2),
               sequence.structure = c("SIGNAL", "BACKGROUND"))
# Error in `$<-.data.frame`(`*tmp*`, "Dose", value = c(2, 2)) : 
#  replacement has 2 rows, data has 7
@mcol mcol changed the title problems in analyse_SAR.TL uncaught errors in analyse_SAR.TL() Aug 16, 2024
@RLumSK RLumSK added this to the v0.9.25 (autumn CRAN release) milestone Aug 21, 2024
@mcol
Copy link
Contributor Author

mcol commented Aug 27, 2024

These too:

analyse_SAR.TL(object, signal.integral.min = 2, signal.integral.max = 3,
               sequence.structure = c("SIGNAL", "BACKGROUND"))
# Error in plot.window(...) : need finite 'ylim' values
analyse_SAR.TL(object, signal.integral.min = 2, signal.integral.max = 3,
               sequence.structure = c("SIGNAL"))
# Error in if (is.na(RecyclingRatio) == FALSE) { : 
#  the condition has length > 1
analyse_SAR.TL(object, signal.integral.min = 2, signal.integral.max = 2,
               sequence.structure=c("SIGNAL", "EXCLUDE", "BACKGROUND", "EXCLUDE", "PREHEAT",
                                    "EXCLUDE",  "BACKGROUND", "SIGNAL", "EXCLUDE", "EXCLUDE",
                                    "EXCLUDE", "EXCLUDE"))
# Error : [get_RLum()] At least one 'record.id' is invalid!
# Error in h(simpleError(msg, call)) : 
#   error in evaluating the argument 'object' in selecting a method for function 'get_RLum':
#  [calc_TLLxTxRatio()] Data types of Lx and Tx data differ!

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

Successfully merging a pull request may close this issue.

2 participants