R-Lum / Luminescence

Development of the R package 'Luminescence'
http://r-lum.github.io/Luminescence/
GNU General Public License v3.0
15 stars 7 forks source link

n.channels can become Inf in plot_detPlot() #203

Closed mcol closed 2 months ago

mcol commented 2 months ago

If signal.integral.min == signal.integral.max, n.channel is computed as Inf:

https://github.com/R-Lum/Luminescence/blob/759a1142651cc557f9fd06c6b061d1aff244cdf9/R/plot_DetPlot.R#L212-L215

For example here:

plot_DetPlot(
    object,
    method = "shift",
    signal.integral.min = 1,
    signal.integral.max = 1,
    background.integral.min = 20,
    background.integral.max = 70,
    analyse_function.control = list(
        fit.method = "LIN"),
    verbose = FALSE)
# Error in 1:n.channels : result would be too long a vector
mcol commented 2 months ago

Fixed by #206.