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

Fix crashes in analyse_SAR.TL() #247

Merged
merged 8 commits into from
Sep 16, 2024
Merged

Fix crashes in analyse_SAR.TL() #247

merged 8 commits into from
Sep 16, 2024

Conversation

mcol
Copy link
Contributor

@mcol mcol commented Sep 16, 2024

This looks a bit complicated as there's some code cleanup that was necessary to better understand what was going on in this function. However, looking at each single commit should make it much easier to understand.
Fixes #147.

If calc_TLLxTxRatio() fails, then we get a garbled error message:

 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
The code that creates the RejectionCriteria data frame has been entirely
rewritten using data.table, resulting in cleaner and also more performant
code.

Moreover, this change allows to solve an additional testcase:

  analyse_SAR.TL(object, dose.points = 2,
                 signal.integral.min = 210, signal.integral.max = 220,
                 sequence.structure = c("SIGNAL", "BACKGROUND"))

which previously failed with:

  Error in dimnames(x) <- dn :
    length of 'dimnames' [2] not equal to array extent

due to the use of sapply(), which in this case ended up producing a matrix
instead of a vector.
@mcol mcol changed the title Issue 147 Fix crashes in analyse_SAR.TL() Sep 16, 2024
@RLumSK RLumSK merged commit a77eb40 into master Sep 16, 2024
9 checks passed
@mcol mcol deleted the issue_147 branch September 16, 2024 14:49
@mcol mcol mentioned this pull request Nov 15, 2024
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

Successfully merging this pull request may close these issues.

uncaught errors in analyse_SAR.TL()
2 participants