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

calc_TLLxTxRatio() fails if Tx.data.background=NULL #129

Closed
mcol opened this issue Aug 8, 2024 · 1 comment
Closed

calc_TLLxTxRatio() fails if Tx.data.background=NULL #129

mcol opened this issue Aug 8, 2024 · 1 comment

Comments

@mcol
Copy link
Contributor

mcol commented Aug 8, 2024

The following code causes calc_TLLxTxRatio() to crash:

data(ExampleData.BINfileData, envir = environment())
temp <- Risoe.BINfileData2RLum.Analysis(TL.SAR.Data, pos = 3)
calc_TLLxTxRatio(
    Lx.data.signal=get_RLum(temp, record.id = 1),
    Lx.data.background=get_RLum(temp, record.id = 2),
    Tx.data.signal=get_RLum(temp, record.id = 3),
    Tx.data.background=NULL,  ##  no crash if Tx.data.background=get_RLum(temp, record.id = 4)
    signal.integral.min=210,
    signal.integral.max=230)
Error in calc_TLLxTxRatio(Lx.data.signal, Lx.data.background, Tx.data.signal,  : 
  object 'BG.Error' not found

Indeed, variable BG.Error is set only if argument Tx.data.background != NULL, while instead it should be given a default value.

@RLumSK
Copy link
Member

RLumSK commented Aug 12, 2024

Thanks!

@RLumSK RLumSK closed this as completed Aug 12, 2024
@mcol mcol added this to the v0.9.25 (autumn CRAN release) milestone Sep 9, 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

No branches or pull requests

2 participants