Changelog
Source:NEWS.md
Changes in version 1.1.2 (2025-12-12)
CRAN release: 2025-12-12
This package version requires R >= 4.4
Removed functions and deprecations
The functions
CW2pHMi(),CW2pLM(),CW2pLMi()andCW2pPMi()(deprecated since 1.0.0) have been removed, but their functionality remains in the correspondingconvert_CW2*()functions (#992).Functions
github_commits(),github_branches()andgithub_issues()are now deprecated and will be removed in a future release (#1026).Functions
is.RLum(),is.RLum.Data(),is.RLum.Data.Curve(),is.RLum.Data.Spectrum(),is.RLum.Data.Image(),is.RLum.Analysis()andis.RLum.Results(), and are now deprecated and will be removed in a future release. The best way of testing whether an object is of a given type is by using theinherits()function, as ininherits(object, "RLum.Data.Curve")(#1034).
Bugfixes and changes
analyse_Al2O3C_Measurement()
- The function no longer crashes when called on RLum.Analysis objects that do not contain records of type
"OSL (UVVIS)"or"TL (UVVIS)"(#1232).
analyse_FadingMeasurement()
The function no longer crashes when called on an object with missing originator (#1130, #1154).
When called with a list containing object with multiple classes, the message produced reports the correct number of objects removed from the analysis (#1132).
The function no longer crashes if the normalisation term is zero, which should never happen in real-life analyses, but it may occur if the input data is somewhat malformed (#1144).
The function no longer crashes when attempting to remove undesired objects from a list-like class that overloads the
[<-S3 method (#1236).
analyse_pIRIRSequence()
The names in the curves legend are no longer cut off (#1206).
Labels and legend in the rejection criteria plot are better positioned and no longer cut off (#1208).
The dashed lines in the summarised DRC plot have been extended to reach the outer box instead of leaving small white gaps at the extremes (#1215).
The space around the plots when using
plot_singlePanels = FALSEhas been reduced, so that plots can be a bit more detailed (#1219).
analyse_portableOSL()
The size of the contour labels for
mode = "surface"can now be controlled with the...argumentlabcexand scale withcex(#1075).The size of the interpolation grid can be controlled via the
...argumentsnxandny(#1077).The
coordargument is now better validated to avoid a crash in case of misspecification (#1097).
analyse_SAR.CWOSL()
Empty subplots are inserted when
onlyLxTxTable = TRUEto preserve the usual plot ordering. This prevents a crash that would otherwise occur if the option was set fromanalyse_pIRIRSequence()(#1186).The function crashed when applied to an object generated by
OSLdecomposition::RLum.OSL_decomposition()withplot = TRUE; this was a regression introduced in v1.1.0 (#1188; thanks to @DirkMittelstrass for reporting).The visualisation of the ‘Checks’ (former rejection criteria) was not very intuitive. To improve the situation, we now display correct inequality symbols, such as
<=or>=instead of<>(which was meant to be understood as a comparator). Furthermore, the recycling ratio now shows better the threshold depending on whether the ratio is smaller or larger than one.The function crashed if the
rejection.criterialist specified aNULLvalue forrecuperation_reference(#1204).The space around the plots when using
plot_onePage = TRUEhas been reduced, so that plots can be a bit more detailed (#1219).The labels in the rejection criteria plot are now shortened only when the available horizontal space is not wide enough (#1222).
bin_RLum.Data()
- Validation of the
bin_size(forRLum.Data.Curve),bin_size.rowandbin_size.col(forRLum.Data.Spectrum) has been made stricter, so that invalid values produce an error (#1104).
calc_AliquotSize()
The function no longer hangs when
grain.sizeis set to a small value and its minimum and maximum values are the same (#1114).The number of MC iteration is now correctly reported in the plot subtitle (#1115).
The function now validates the
MC.iterargument to avoid an ugly crash if a non-positive value is provided (#1124).The function now better validates its
grain.sizeargument (#1152).
calc_CentralDose()
- The profile log-likelihood plot is now cut at a log-likelihood of -100, so that for profiles with log-likelihoods more negative than that don’t get too squashed in the region of interest (#1227; thanks to @DirkMittelstrass for reporting).
calc_CosmicDoseRate()
- The function is now more robust against
NAvalues in its input arguments (#1101).
calc_FadingCorr()
- The function produces an error if
g_valueis anRLum.Resultsobject with an unsupported originator instead of returningNULL(#1136).
calc_HomogeneityTest()
- The function ignores all columns after the first two, as they could lead to crashes if they contained non-numeric values (#1224).
calc_Huntley()
- A warning raised in rare occasions if the number of Monte Carlo iterations is very small has been fixed (#1048).
calc_OSLLxTxRatio()
- The
Lx.dataandTx.dataarguments are now better validated (#1178).
calc_SourceDoseRate()
- The function returns a clearer error message if dates are specified in an unexpected or ambiguous format (#1162).
calc_Statistics()
- The function could crash if an error was exactly zero. This affected also the plotting functions that use
calc_Statistics()(#1160).
combine_De_Dr()
- It is now possible to control the random seeds used by the JAGS MCMC chains via the
method_controlargument (#1038).
fit_CWCurve()
If model fitting failed but an object named
fitwas present in the workspace, the function tried to use that one, which would lead to a crash or to unexpected results (#1081).The
output.tablefield of theRLum.Resultsobject returned now contains only columns corresponding to the components effectively fitted (#1083).
fit_EmissionSpectra()
- The function makes better use of the plot area, leaving smaller margins around the plot (#1011).
install_DevelopmentVersion()
- The function has been refactored so that it no longer depends on the deprecated
github_branches()function (#1079).
plot_AbanicoPlot()
A warning was raised if the function returned early (for example due to invalid inputs) and the graphical device was off (#1001).
The function now validates the
frameargument in order to avoid crashing on misspecified values (#1036).The function no longer crashes when a small
plot.ratiovalue is specified (#1062).The function now validates the
zlimargument to avoid a crash if negative values are used withlog.z = TRUE(#1063).The legend text now scales better at high
cexvalues (#1066).If
summary.poscontains multiple valid positions, the first one is used rather than generating warnings and not showing the summary (#1093).
plot_DoseResponseCurve()
The plot symbols are now correctly assigned for
mode = "extrapolation"and in the legend. Ifreg_points_pchis specified, it must now be a vector of 3 elements, corresponding to the symbols to use for normal points, point 0 and repeated points, respectively (#1072).The baseline line in the sensitivity plot has been extended to reach the outer box instead of leaving small white gaps at the extremes (#1213).
The space around the plots has been reduced, so that plots can be a bit more detailed (#1219).
plot_DRTResponse()
- The function now suppresses the warnings generated by
graphics::arrows()when datasets having wildly different distributions are plotted (#1184).
plot_Histogram()
- Since version 1.0.0, setting
summary.posto one of “left”, “center” or “right” andnormal_curve = TRUEresulted in the summary table not being visible (#1118).
plot_RadialPlot()
The function avoids some possible overprinting at the extremes of the z-axis labels and draws lines at the extremes of the ellipse (#1013).
The appearance of the y-axis ticks has been improved in the case when the y-axis is particularly narrow (#1060).
If
summary.poscontains multiple valid positions, use the first one rather than generating warnings and not showing the summary (#1093).The functionality of the
statsargument had regressed in version 1.1.1, and now has been restored (#1106).The function better validates the
zlimargument, to avoid crashes on misspecified axis limits iflog.z = TRUE(#1140).The function now always returns invisibly the list of plot parameters, independently of the value of the
outputargument. This change made that argument redundant, so it was removed. This should have no impact on users; if specified, it will be ignored (#1142).The function stops with an error instead of crashing if the input contains only 1 data point (#1150).
The function reports a message instead of throwing a warning when adding a line with negative value if
log.z = TRUE(#1164, #1168).The summary text and line labels now scale better at high
cexvalues (#1170).The function no lonver crashes if
central.valueis a non-positive value whenlog.z = TRUE(#1173).Some graphical artifacts related to the 2-sigma bar, which would appear for extreme settings of the
central.valueargument have been fixed (#1194).
plot_RLum.Data.Image()
The function now supports the
...argumentmtext(#1031).The positioning of axis ticks and labels in raster and contour plots of low-resolution images has been improved, and pixel numbering starts consistently from 1 (#1191).
The function gained support for the arguments
digitsandscientific. Moreover, it is possible to specify multiple plot titles inmain. Thanks to @Zink-Antoine for the contribution (#1197).
plot_RLum.Data.Spectrum()
The function doesn’t crash anymore if
bg.spectrumis used andylimspecifies an interval that doesn’t contain any background channels (#1019).The function doesn’t crash anymore if the value of
framesgiven is too large whenplot.type = "multiple.lines"(#1021).The legend text now scales better at high
cexvalues (#1068).The function now makes better use of the plot area by setting smaller margins and reducing the spacing between axis elements (#1070).
read_PSL2R()
- The function gained a
patternargument to refine the list of files to read when a directory path is specified (#1099).
read_SPE2R()
- The function no longer crashes if
frame.rangeis misspecified (#1138).
subset.Risoe.BINfileData()
- The function also updates the
.RESERVEDslot (if present) to keep only the elements selected (#1089).
Other changes
The
ExampleData.portableOSLfile has been updated with surface coordinates (#1095).Documentation for all example data (including synthetic datasets) is now more easily findable from RStudio (#1166; thanks to @DirkMittelstrass for reporting).
Changes in version 1.1.1 (2025-09-11)
CRAN release: 2025-09-11
New functions
-
correct_PMTLinearity(): A helper function to correct luminescence signals measured with a PMT for count linearity (#920).
Removed functions and deprecations
Functions
calc_Kars2008()(defunct since 0.9.26),Analyse_SAR.OSLdata()(since 1.0.0),PSL2Risoe.BINfileData()(since 1.0.0) andSecond2Gray()(since 1.0.0) have been removed from the package. Their functionality can be found in functionscalc_Huntley2006(),analyse_SAR.CWOSL(),convert_PSL2Risoe.BINfileData()andconvert_Second2Gray(), respectively.Function
get_Risoe.BINfileData()has been removed as it was not used and provided no benefits to the user (#945).
add_metadata<-()
- The function throws an error if trying to assign a
NULLvalue instead of silently ignoring it (#946).
analyse_Al2O3C_ITC()
- The function returns early if the fitting of the dose response curve fails (#979).
analyse_Al2O3C_Measurement()
- The function allows to specify the
cross_talk_argumentas a numeric vector of length 3, as was already documented (#930).
analyse_SAR.CWOSL()
- The function crashed if any of the curves had
NAas itsrecordType(#867).
apply_CosmicRayRemoval()
The
methodargument ofsmooth_RLum()was not reachable via...as theapply_CosmicRayRemoval()already has an argument calledmethod. Now the...argument is calledmethod_smooth_RLumand works as expected (9b27467).The function crashed if method = “Pych”
andMARGIN = 1` were specified. The function now better validates its inputs and no longer returns invisibly but normally (#987).
calc_AliquotSize()
- The legend text now scales better at non-default cex settings (#849).
calc_Huntley2006()
- If the user set the
n.MCargument, this was also used in the fitting of the dose response curve. This was not the expected behaviour, and resulted in poor performance (a 2x slowdown forn.MC = 10000). This regression was introduced in version 1.0.0 (#867).
calc_MaxDose()
- The function crashed if
sigmabwas set to a very small value (#898).
calc_Statistics()
- The computation of the weighted median is now correct, while before it corresponded to the simple (unweighted) median (#905).
fit_CWCurve()
- The function hanged on particularly small datasets as it tried to fit too many components for the available data (#953).
fit_DoseResponseCurve()
The object returned now contains an additional
.De.rawcolumn to store the calculated De value computed by the fitting function “as is”, without setting meaningless results toNA. TheDeand.De.rawcolumns differ only formode = "interpolation", where the first sets the De toNAif negative, while the latter doesn’t. It is then up to the user to decide what to do with those values, bearing in mind that they may be arbitrary when negative (#957).The message reported for
fit.method = "QDR"now states correctly whether the fit succeeded or failed (#961).The computation of De.MC, De.Error and HPDI for
mode = "interpolation"has been modified to account correctly for possible negative De values resulting from the fit (#963).Previously, a single
NAvalue in the Monte Carlo results prevented the computation of Highest Density Intervals (HPDI). This limitation has been removed, and now HPDIs are reported in more cases (#976).The columns of the
results$Dedata frame are now reported in a different order; an additional “Mode” column reports the value of themodeargument; columns meant for internal use have been moved to the end and their names are now prefixed with.(#974).
fit_LMCurve()
- The automatic correction of the x-axis limits when
log = "x"is specified and the lowest value is set to0threw the correct warning but actually did nothing (38e4324).
fit_OSLLifeTimes()
- The function ensures that the
signal_rangeargument doesn’t contain negative values instead of crashing (#896).
get_RLum()
The function doesn’t crash anymore on
RLum.Analysisobjects if using therecord.idargument removes all available records (#873).An internal optimization increased the performance of the function. The difference is not perceivable on single calls to
get_RLum(), but the change brings a visible speed up whenmerge_RLum()is called over a sufficiently large number ofRLum.Analysisobjects (#875).
merge_Risoe.BINfileData()
- The function gained argument
verboseto allow disabling the output fromread_BIN2R()andwrite_R2BIN()(#950).
plot_AbanicoPlot()
The positioning of the y-axis label has been improved to be centred around the zero line (#847). The z-axis tickmarks and labels are better drawn at non-default cex values (#865).
The minor grid lines were drawn incorrectly in a rotated plot (#849).
Some plot elements didn’t scale correctly at non-default cex values (#861, #879).
The
frameargument is now respected also when the plot is rotated (#863).The weighted median is computed correctly when
summary = "median"andsummary.method = "weighted"are used (#905).
plot_DoseResponseCurve()
We added support for the
loggraphical parameter, which can be used if the fit was obtained with mode other than"extrapolation"(#820).The normal curve drawn as part of the histogram plot could appear very jagged or even as a straight line, as it could happen that too few points were actually used when drawing the curve (#843).
The legend symbols did not match anymore the plotted regeneration/dose points. This also affected functions such as
analyse_SAR.CWOSL()andanalyse_pIRIRSequence()(9ba54e65).The legend positioning can now be controlled via the
...argumentlegend.pos(#959).
plot_DRCSummary()
- The dose-response curve is now plotted as expected, after a regression in 1.1.0 caused the function to produce an empty plot (#969).
plot_Histogram()
- Option
summary = "median.weighted"is now officially supported (#905).
plot_RadialPlot()
- Option
summary = "median.weighted"is now officially supported (#905).
plot_RLum.Analysis()
- The legend text now scales better at non-default
cexsettings (#854).
plot_RLum.Data.Curve()
- The function gained a new logical argument
interactivethat enables interactive plotting of curves usingplotly::plot_ly(). It requires the suggested package'plotly'to be installed (e4746eaa).
plot_RLum.Data.Spectrum()
Types
imageandcontourgained more control of the contour line labels through the argumentlabcex.For plot types
"image"and"multiple.lines"the...logical argumentlegendwas added.Plot type
"image"further gained a legend with support through...forlegend.pos,legend.horizandn_breaksto control the number of colours in the graphic.
read_BIN2R()
- The
FNAMEmetadata field is no longer left empty if the BIN-file didn’t specify one, but it’s populated with the BIN-file name without extension. This is the behaviour that was present up to version 0.9.26, but version 1.0.0 had regressed it (#928).
read_XSYG2R()
- Add support for the new function
correct_PMTLinearity()(#920).
smooth_RLum()
- Add support for the Poisson smoother of Carter et al. (2018), which can be accessed by setting
method = "Carter_etal_2018". This is helpful to ensure that the dark-background counts signals measured by a photomultiplier tube follow a Poisson statistic, and smooths non-conforming values according to an average over four neighbours (#921).
trim_RLum.Data()
- The function crashed if both values specified in the
trim_rangeargument exceeded the number of channels available (#871).
Changes in version 1.1.0 (2025-06-11)
CRAN release: 2025-06-11
New functions
remove_SignalBackground(): A user-friendly method to subtract background signals from various curves inRLum.Analysisobjects without resorting tolapply()loops. Depending on the record type, the function identifies pairs of curves; for instance, if in a sequence, aTLcurve is immediately followed by anotherTLcurve, the second curve is recognised as the background signal, subtracted usingmerge_RLum()and subsequently removed from the object (if desired). Alternatively, a set of potential background curves can be specified.remove_RLum(): This function further completes the set of methods that can handle and modifyRLum-classobjects. It operates onRLum.Analysisobjects or alistof such objects to remove unwanted records from datasets. Although the function callsget_RLum()and relies on its functionality, the new implementation facilitates a more logical workflow and analysis pipeline..as.latex.table(): ConvertsRLum.Resultsobjects where suitable toLaTeXready tables, for instance, objects produced byuse_DRAC(). The function has been present in the package as an internal function for many years; now it is exported and better linked to make it discoverable.
New datasets
-
RF70Curvesis a new dataset consisting of two IR-RF curves measured with the RF70 protocol. This new dataset provides a more realistic example foranalyse_IRSAR.RF().
Breaking changes
Function
get_Quote()is no longer exported, but remains available as an internal function. This is unlikely to affect any user of the package, as the function was only meant to report a random quote at startup (#644).In the functions
fit_DoseResponseCurve()andplot_GrowthCurve(), thefit.methodoptionLambertWwas replaced by the more correct termOTOR.Argument
cex.globalhas been removed fromplot_DoseResponseCurve()(and consequently also fromplot_GrowthCurve()), and if set it will be silently ignored. Users can set thecexgraphical parameter via...in its place (#831).The
fit.methodandfit.advancedarguments of functionfit_LMCurve()have been removed. The default fitting method has been changed fromporttoLM, and support for theportalgorithm has been removed. From now on, argumentfit.methodis silently ignored, unlessfit.method = 'port'is used, in which case a deprecation warning is thrown (#793).The fundamental physical constants used in the package (such as Boltzmann constant, Planck constant, etc.) have been uniformed to those reported in the NIST Reference on Constants, Units and Uncertainty. This may affect the numerical results of the following functions:
calc_FastRatio(),calc_Huntley2006(),calc_SourceDoseRate(),calc_ThermalLifetime(),convert_Activity2Concentration(),convert_Wavelength2Energy(),fit_CWCurve(),fit_LMCurve(),fit_SurfaceExposure(),fit_ThermalQuenching()(#693).
Bugfixes and changes
analyse_baSAR()
- The function crashed if only one aliquot was kept (#834).
analyse_FadingMeasurement()
The function crashed if the number of
LxandTxcurves was not equal whenstructure = c("Lx", "Tx"), which is the default. The check that the number of points within each pair of curves has also been improved, and the function now produces more helpful error messages (#616).The function tests are now less rigorous for different
LxandTxsizes. While they should match, numerical rounding issues in the data returned by the measurement devices could previously result in rejection of records, although this had no actual meaning for the data analysis.
analyse_IRSAR.RF()
The legend and subtitle texts now scale better at non-default cex settings (#803).
The printing of progress bars and messages to the terminal can now be controlled via the
...argumentverbose. Previously this could only be done via thetxtProgressBarargument (which is still supported), but the new option makes the interface consistent with most other functions (#805).The
mtextandcexoptions are respected ifmethod = "None"(#807).The residual plot correctly respects the logarithmic transformation of the x-axis when
log = "x"orlog = "xy"are specified (#814, #825).The function now deals correctly also with input objects containing multiple curves (#816).
The residual indicator rectangle, which is drawn when
methodis eitherSLIDEorVSLIDE, is also drawn whenlog = "x"(#821).The plotting of the density is silently disabled if
n.MC = NULL, which avoids a spurious warning (#823).
analyse_pIRIRSequence()
- The function now respects the
cexgraphical argument, and its plot output has been subtly improved thanks to various fixes that have occurred especially inplot_DoseResponseCurve()(#831).
analyse_portableOSL()
The function now returns an error if
modeis something other than"profile"or"surface".The
modeargument was not respected when operating over a list of objects (#673).The function crashed when using
mode = "surface"if the plotting limits were too tight and left only one point (#675).The check on the validity of the
signal.integralargument has been improved, and now it occurs only once, so at most one warning is raised if the argument is set to a value exceeding the valid range (#678, #680).The function returns a clearer message when no x-coordinates were measured and
mode = "surface"was used (#682).The
cexandtypegraphical parameters can now configured via the...argument (#684).The expected sequence pattern of the input object is validated more thoroughly to avoid crashes in case of misspecification (#687).
The graphical
...argumentcontournever produced a meaningful contour plot due to an internal error (#686). Along, argumentscontour_nlevelsandcontour_colare now supported through...to better control the number and colour of contour lines.
analyse_SAR.CWOSL()
Add support for
fit.method = 'OTORX'following the changes infit_DoseResponseCurve(); this change includes the new argumentdose.points.testthat is only of use in combination with theOTORXfit.Add new graphical output if the measurements were single grain measurements, in such case a disc with the position and grain number marked in shown. This plot replaces the IRSL curve check plot, but only for single grain data (#797).
The rejection criteria plot was rewritten and now provides an easier to grasp visual feedback (#797, #798).
The
IRSL/Single Grainpanel swapped place with the rejection criteria panel; the plot numbers remained unchanged to avoid regression.More code optimisation for better readability (#802)
analyse_SAR.TL()
- A check on the
sequence.structureargument ensures that a “SIGNAL” entry has been specified (#779).
calc_AliquotSize()
The new argument
sample_carrier.diameterallows to specify a value for the diameter of the sample carrier, which up to now was hardcoded to the very common 9.8 mm size (#623).Several graphical parameters can now configured via
...arguments, so that the plot appearance can be fully customized (#671).
calc_AverageDose()
- A bug in the implementation prevented the default plot settings from being modified via
...as advertised. Now custom settings are respected (#658).
calc_FiniteMixture()
The function doesn’t crash anymore if the
n.componentsargument specifies non-consecutive values (#691).The function sometimes failed to plot some of the densities when the number of components was set to a value of 8 or more (#704).
The density plots would not always be coloured completely, but especially for high values of
sigmabthere would be an unfilled area at the base of the densities (#706).If the very first iteration over the components during plotting was skipped, then the function crashed as a quantity computed only in that iteration was not available. This happened for very specific combinations of
sigmabandn.components(#708).Another crash occurred when height of the largest density curve could not be estimated due to the presence of too many
NAvalues in the intermediate computations (#710).The check for significance of each component added to the model has been corrected to be more statistically rigorous (#703).
Blank gaps appearing to the sides of the proportion of components plot for high number of components have been removed (#713), as well as extra slices appearing due to rounding errors (#715).
The plot can be better configured via the new
plot.criteriaargument to control whether the statistical criteria curves should be drawn. Moreover, support for the...options has been added:cexto control the overall scaling,main.densities,main.proportionsandmain.criteriato set the subplot titles (#717).Plots are now generated even when results contain
NAvalues, as they in general don’t affect the plot. However, when that happens we report it in the plot subtitle (#718).
calc_Huntley2006()
Support was added for multicore computations via the
coresargument, and for the nls-fitting control optionsmaxiterandtrace.The fitting of the simulated curve with the GOK model has been made more robust: when an initial fit of the model fails, the fit is attempted again with 10 different values for
D0and the best fit is used. This should reduce the number of occasions in which the error message “Could not fit simulated model curve, check suitability of model and parameters” is reported (#660).The function crashed if all simulated Lx/Tx values were identical and approximately zero, which could happen if the
rhopargument was set to a large enough value (#725).An error message has been improved so that it doesn’t suggest setting the ‘fit.bounds = FALSE’ argument if it has already been set (#729).
The computation of the x-axis limits has been improved to avoid having too much unused horizontal space, especially for
mode = "extrapolation"(#731).The scaling of the plot can now be controlled via the
cexargument (#735).The plot margins are set more precisely and avoid the summary text to be cut off (#737).
calc_MinDose()
- The function now warns if the number of bootstrap replicates is too low to perform the loess fitting (#721).
calc_OSLLxTxRatio()
The function returned a warning for wrong integral settings for the
Txcurve even if noTxcurve was provided.The function does not check any more of different object types for
Lx.dataandTx.databut validate objects for allowed types (this should have no user-visible effects).
convert_Concentration2DoseRate()
- The function validates its input values more thoroughly (#613).
extract_IrradiationTimes()
The function tries a little bit harder to extract the correct duration of TL steps, rendering the data output hopefully a little bit more intelligible (#651).
The function gained a new argument called
return_same_as_input, with default value ofFALSE. If set toTRUE, the input object (usually anRLum.Analysisobject or alistof them) is returned with updated info elements forIRR_TIMEandTIMESINCEIRR. This makes theRLum.Analysisobject compatible with functions that explicitly search for those two objects, such as those in the'OSLdecomposition'package (#752).
fit_DoseResponseCurve()
The function now allocates less memory for storing intermediate values (#610).
Add initial support for
OTORXfitting following Lawless and Timar-Gabor 2024 (#677). The code implementation follows the Python reference by jll2 with an addition for an allowed offset parameteraset iffit.force_through_origin = FALSE. This also enables to supportmode = "extrapolation"(thanks to John Lawless for his input).The code of the function was optimised in several places to improve code readability and reduce redundant calls.
The models for
EXP,EXP+LIN,EXP+EXPandGOKare now available in C++. This cut the required computation times in half in benchmark scenarios. More importantly, this performance scales with the number of Monte Carlo runs.
fit_EmissionSpectra()
- Fix crash when attempting to plot a frame with non-positive counts (#761).
fit_LMCurve()
If the user asks logarithmic scaling in the y-axis, using either
log = "y"orlog = "xy", this is now ignored when plotting residuals and component contributions (#755).The plot has been slightly reworked to reduce the cases of “margin too large” errors and to work better at high settings of
cex(#757).Missing values in the input data are now silently removed (#759, #763).
The plotting of residuals, component contributions and legend can now be disabled, and the legend position can be controlled (#785).
The error computed when using option
fit.calcError = TRUEis now returned correctly, instead of being left toNA(#789).Argument
bg.subtractionalso accepts the option"none"to disable background subtraction even ifvalues.bgis provided (#795).
fit_SurfaceExposure()
- It is now possible to specify different values for the light attenuation coefficient
muwhen a list of input data is provided (#667).
fit_ThermalQuenching()
The
traceoption, which can be specified via themethod_controlargument, is now respected.The model now get internally reformulated into a mathematically equivalent expression that is easier to fit. This should reduce the number of occasions when the function fails to find a valid solution and improve the uncertainty estimation (#696).
get_RLum()
- The argument
subsetcan now be provided as a character that represents a logical expression. Before, it always required a logical expression, but this may lead to odd effects due to the early evaluation happening in R and might not be wanted. Providingsubsetas a character is now a viable workaround in those situations.
merge_RLum.Data.Curve()
- The function does no longer stops for differing channel resolutions, but it does issue a warning. The user is responsible for the consequences.
plot_DetPlot()
- The logic for multicore support was incorrect, which resulted in always starting a parallel cluster even when
multicore = FALSE(#742).
plot_DoseResponseCurve()
The response curve always tries to the get the 0 point in the mode
interpolationandalternate(#677).Minor graphical polish to limit overplotting and also plot a density curve for the
L_n/T_nsignal.If
mode = "alternate", the message that the equivalent dose could not be fitted is no longer shown.Argument
cex.globalhas been removed and will be silently ignored (#831).
plot_DRCSummary()
- Add support for
fit.method = 'OTORX'following the change infit_DoseResponseCurve()(#677).
plot_DRTResults()
The summary and legend texts now scale better at non-default cex settings (#765).
Argument
given.doseis better validated against misspecifications, and setting it to 0 is equivalent to leaving it at its defaultNULLvalue, which corresponds to avoiding data normalization (#767, #799).The function crashed when multiple inputs were used with
boxplot = TRUEand all preheat values were identical (#769).Plot title, summary text and legend are now better positioned (#773, #774, #781).
A bug in the way colours and symbols are assigned to plot points has been fixed (#777).
The horizontal axis doesn’t include anymore a spurious extra tick that didn’t correspond to any aliquot (#783).
plot_GrowthCurve()
Add support for
fit.method = 'OTORX'following the change infit_DoseResponseCurve()(#677).Argument
cex.globalhas been removed and will be silently ignored (#831).
plot_Histogram()
The function now doesn’t produce warnings when the input consists of a single-column data frame, as it assumes that the De error is 10^-9 (#744).
The right margin is now smaller when errors are not plotted, as there is no need to leave space for the standard error axis (#748).
The summary text now scales better at non-default cex settings (#750).
plot_RLum.Data.Curve()
We added comprehensive support for base R plotting arguments utilised by
plot.default()andpar(). This enhancement ensures that all available arguments are fully supported (#646).The function gained a new logical argument named
auto_scale. When set in conjunction with eitherxlimorylim, this argument automatically adjusts the plot range to align with the corresponding settings forxlimorylim. For instance, if a user intends to plot OSL curves but initially selects thexlimrangec(10:30)to examine the background, the initial count values may be excessively large, resulting in limited visibility. With the introduction of theauto_scaleoption, theylimvalues are automatically adjusted to compensate for this scenario. Theauto_scaleargument is also accessible throughplot_RLum.Analysis()andplot_RLum()(#646).
plot_RLum.Data.Spectrum()
The channel-wise background subtraction was essentially broken if a background spectrum with the same setting was provided. The function always calculated the arithmetic mean. This was fixed, and the manual updated accordingly.
If a background spectrum was provided, the behaviour of the plot output was sometimes hard to understand without knowledge of the underlying code. This behaviour was improved and now
ylimwill also affect the background spectrum ifbg.channels = NULL(the default).The function could crash if column names were missing and the 1bg.spectrum` argument was used (#726).
read_TIFF2R()
The argument
filecan now be provided as alistor a character vector.The function gained a new logical argument called
merge2stackthat can be used iffileis either alistor a character vector of length > 1. If set toTRUE, images are combined into one image stack.
read_XSYG2R()
A redundant computation has been removed, and the function is now marginally faster on files where the detector is not a spectrometer (#753).
Prepare import for an updated version of LexStudio2 (>=v2.31.1) where the horizontal hardware binning finally works after >10 years, but the changes introduce a lot of
NaNvalues that would cause a crash of the function.Minor code refactoring for a small speed boost if spectrometer measurements are imported.
scale_GammaDose()
- Argument
plot_singlePanelsnow works as documented, that is it produces all plots in a single page when set toFALSE(default), and one plot per page when set toTRUE(#698).
sort_RLum()
The sorting mechanism for
RLum.Analysisobjects has been enhanced. It now enables sorting based on multiple parameters, including sorting all availableinfo_elementsin a prioritised manner (#606, #620).Sorting now works on a list of
RLum.Analysisobjects. If the list contains elements of a different type, they are passed through unchanged. The output is again a list (#620).
structure_RLum()
- The function now returns a less messy data frame because it encapsulates
.pidandinfoas lists within the data frame. The function is primarily used internally to facilitate a rapid exploration ofRLum.Analysisobject structures. However, the change may potentially break existing code in extremely rare circumstances.
template_DRAC()
- The function now throws messages instead of warnings for wanted coercions; however, it will be hard on failed coercions that would cause
use_DRAC()to fail.
use_DRAC()
The function now checks for DRAC specific URL parts if a custom URL is provided; this avoids long searches for unspecific errors.
Due to the internal masking of submitted values, the initial row order got mixed up; regression from #438. The order is maintained and the row index corrected; in other words, the masking should now be again invisible to the user.
verify_SingleGrainData()
- The function crashed if an object originating from
read_XSYG2R()contained positions in itsinfofield (#740).