Releases: R-Lum/Luminescence
v1.1.2 (CRAN)
Changes in version 1.1.2 (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()and
github_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_CrossTalk()
-
The function no longer crashes if
dose_pointis misspecified
(#1073). -
The function no longer crashes when called on an
RLum.Analysis
object rather than on a list of them (#1182).
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_baSAR()
-
The function no longer crashes if all objects in the input list are
removed because empty (#1041). -
The dose response curves are no longer overplotted when there are
fewer than 1000 MCMC iterations (#1058).
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_IRSAR.RF()
-
The function no longer crashes when
n.MC = NULLis used with the
FITmethod (#1055). -
The function has been optimized to be faster during the bootstrap and
sliding phases for theSLIDEandVSLIDEmethods, with speed-ups in
the region of 45% (#1210, #1230).
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 a
NULLvalue 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.row
andbin_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_EED_Model()
-
A crash that occurred with a small number of simulation was fixed
(#1051). -
The error message in case of failed surface interpolation is now
clearer and more complete (#1053).
calc_FadingCorr()
- The function produces an error if
g_valueis anRLum.Results
object with an unsupported originator instead of returningNULL
(#1136).
calc_FiniteMixture()
-
The function no longer crashes if the De column contains zeros or
missing values (#1146, #1148). -
The legend for the components is positioned consistently also at
cex
values other than 1 and is drawn also whenpdf.colors = "gray"
(#1175).
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 usecalc_Statistics()(#1160).
combine_De_Dr()
- It is now possible to control the random seeds used by the JAGS MCMC
chains via themethod_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).
fit_OSLLifeTimes()
-
The function throws a warning when the fit fails (#1005).
-
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
deprecatedgithub_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_KDE()
- Space a...
v1.1.1 (CRAN)
Changes in version 1.1.1 (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 functions
calc_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).
Bugfixes and changes
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 called
method. 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_MinDose()
-
The function crashed when bootstrapping with
bs.M = 1. Now the
bs.Mparameter is silently reset to 2 in that case, although such
low values are discouraged as they may trigger a warning during loess
fitting (#900). -
The function crashed when all rows in the input data set contained
NAvalues (#915).
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 the
modeargument; 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 toget_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 asanalyse_SAR.CWOSL()and
analyse_pIRIRSequence()(9ba54e6). -
The legend positioning can now be controlled via the
...argument
legend.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_DRTResults()
-
Points didn’t scale correctly at non-default
cexvalues (#879). -
Option
summary = "weighted$median"is now officially supported
(#905).
plot_Histogram()
- Option
summary = "median.weighted"is now officially supported
(#905).
plot_KDE()
-
Outlier points didn’t scale correctly at non-default
cexvalues
(#879). -
The weighted median is computed correctly when
summary = "median"
andsummary.method = "weighted"are used (#905).
plot_RadialPlot()
- Option
summary = "median.weighted"is now officially supported
(#905).
plot_Risoe.BINfileData()
-
Input arguments are validate more strictly to avoid unexpected crashes
in case of misspecification (#964). -
The x-axis label for TL curves now reports temperature rather than
time, consistently with the data shown (#971).
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 (e4746ea).
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 settingmethod = "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_range
argument exceeded the number of channels available (#871).
use_DRAC()
- Report the message produced by the DRAC server more reliably in case
of error (#982).
What's Changed
- Remove defunct functions calc_Kars2008() and Analyse_SAR.OSLdata() by @mcol in #841
- Add support for log transformation in plot_DoseResponseCurve() by @mcol in #842
- Make normal curve not appear jagged in plot_DoseResponseCurve() by @mcol in #844
- Use uniformly-spaced points when log = "x" in plot_DoseResponseCurve() by @mcol in #846
- Ensure that the density polygon is closed correctly in plot_DoseR...
v1.1.0 (CRAN)
Changes in version 1.1.0 (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 on
RLum.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 to
LaTeXready 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 function
fit_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
LxandTx
sizes. 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 whenlog = "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 andmode = "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, arguments
contour_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 in
fit_DoseResponseCurve(); this change includes the new argument
dose.points.testthat is only of use in combination with theOTORX
fit. -
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 ofsigmabthere 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 ofsigmabandn.components(#708). -
Another crash occurred when height of the largest density curve could
not be estimated due to the presence of too manyNAvalues 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.proportionsand
main.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 ...
v1.0.1 (CRAN)
Changes in version 1.0.1 (2025-03-07)
Bugfixes
analyse_baSAR()
- The number of aliquots used was only partially reported if no aliquots
were removed, resulting in an incomplete message in the output to the
terminal.
analyse_FadingMeasurement()
-
The function now checks that an input object generated from an XSYG
file contains irradiation steps and returns an error if none are
available, instead of producing an unhelpful output (#588). -
A regression in
plot_RLum.Analysis()caused part of the plot of the
luminescence curves to be garbled (#589). -
The function crashed on a file generated by
read_XSYG2R()if the
number of curves available after removal of the irradiation step was
not enough for the the fading measurement to be analysed (#603).
analyse_pIRIRSequence()
- The check on the minimum device plot size used to fail if only one
dimension was below our minimum threshold, and when it was incorrectly
triggered by the floating point values computed by
grDevices::dev.size(), which sometimes could be spuriously just
below threshold. We also changed the minimum device size from 18 to 16
inches (#593).
calc_CosmicDoseRate()
- The function crashed if the number of depths provided exceeded that of
the densities and the latter contained more than one value (#595).
calc_FadingCorr()
-
The function sporadically returned an implausibly large error estimate
if any of the Monte Carlo simulations produced an outlier solution
(#597). -
The function now allocates only as much memory as required if the user
specifies a value forn.MCother than"auto", which brings a small
speed-up if fewer than 10 million samples are requested. -
Input arguments are now more thoroughly checked to avoid warnings or
unhelpful messages (#599).
calc_FastRatio()
- The function crashed if the input was an RLum.Analysis object (#586).
plot_AbanicoPlot()
- The
xlim,ylimandzlimparameters are now better validated to
avoid possible crashes if misspecified (#581).
plot_RLum.Analysis()
- The function reset incorrectly the graphical parameters for the case
plot_singlePanels = TRUE. This caused a regression in the plot
output fromanalyse_FadingMeasurement()(#589).
sort_RLum()
-
The function doesn’t crash when multiple fields are specified,
although the actual sort at the moment occurs only on the first field
(#606). -
Attempting to sort an empty object returns the object itself instead
of crashing (#608).
What's Changed
- Validate xlim, ylim and zlim in plot_AbanicoPlot() by @mcol in #582
- Complete coverage for calc_CosmicDoseRate.R by @mcol in #583
- Replace sapply(x, length) and similar with lengths() by @mcol in #585
- Fix crash in calc_FastRatio() on RLum.Analysis objects by @mcol in #587
- Check that irradiation steps are available if the originator is read_XSYG2R by @mcol in #590
- Fix regression in plot generated by analyse_FadingMeasurement() by @mcol in #591
- Fix the minimum device plot size checks in analyse_pIRIRSequence() by @mcol in #594
- Tighten checks on inputs and consolidate code in calc_CosmicDoseRate() by @mcol in #596
- Tighten the outlier threshold in calc_FadingCorr() by @mcol in #598
- Improve validation and documentation of calc_FadingCorr() arguments by @mcol in #600
- Improve validation against a character vector by @mcol in #602
- Fix crash in analyse_FadingMeasurement() if not enough curves are available by @mcol in #604
- Fix crashes in sort_RLum() if more than one field is specified by @mcol in #607
- Don't crash when sorting an empty RLum.Analysis object by @mcol in #609
Full Changelog: v1.0.0...v1.0.1
v1.0.0 (CRAN)
Changes in version 1.0.0 (2024-02-21)
New functions
-
apply_Crosstalk(),calc_MoransI(),plot_SingleGrainDisc()and
plot_MoranScatterplot()were contributed by Anna-Maartje de Boer and Luc
Steinbuch (#560). An introductory example on how to use these functions
is available by executingvignette("crosstalk"). -
calc_EED_Model()models incomplete and heterogeneous bleaching of
mobile grains after Guibert et al. (2017). Along with the function, the
newExampleData.MortarDatadata set was added. -
fit_DoseResponseCurve()andplot_DoseResponseCurve()are two new
functions derived fromplot_GrowthCurve(): the first only performs the
fitting of a dose-response curve, while the second plots it. This brings
greater flexibility and increased speed, as plotting is now independent of
fitting (#141, fixed in #318). -
melt_RLum(): Creates a new flatdata.framethat can be used for instance
in combination with'ggplot2'. It works only onRLum.Data.Curve-class
andRLum.Analysis-classobjects and lists of such objects. -
merge_RLum.Data.Spectrum(): This new function allows to merge two or
moreRLum.Data.Spectrumobjects in different ways (#368, fixed in #419). -
add_metadata(),rename_metadata(),replace_metadata():
These function allow to manipulate the metadata of
Risoe.BINfileData,RLum.AnalysisandRLum.Dataobjects (#480, fixed
in #514, #524, #525, #527, #534, #545). -
sort_RLum(): Allows to sort the records ofRLum.Analysisand
Risoe.BINfileDataobjects according to a given slot or info element
(#528, fixed in #571 and #576). -
view(): Provides a shortcut to theutils::View()spreadsheet-like data
viewer tailored to the objects in the package (#489, fixed in #490).
Breaking changes
-
We have dropped our dependency on the
readxlpackage: functions
analyse_baSAR()anduse_DRAC()now do not accept XLS files anymore but
CSV files instead (#237, fixed in #270). CSV files can be easily generated
from XLS files by Excel or similar applications, or by reading them with
readxl::read_excel()and saving them withwrite.csv(). -
The
plot.singleoption, which was available for several functions,
sometimes under a slightly different name, has now been renamed to
plot_singlePanelsfor overall consistency and clarity. Function
scale_GammaDose()used that option but gave it the opposite meaning: now
also this function conforms to the rest of the package. The use of the
older names is now deprecated and will produce a warning (#351, fixed in #408). -
The
NumberIterations.MCoption ofplot_GrowthCurve()has now been
renamed ton.MCfor consistency with other functions. Potentially affected
are alsoanalyse_Al2O3C_ITC(),analyse_baSAR(),analyse_SAR.CWOSL(),
analyse_SAR.TL(),calc_Huntley2006(),calc_Lamothe2003(),
as they may pass that optionplot_GrowthCurve()via their...argument.
The use of the older name is now deprecated and will produce a warning (#546,
fixed in #547).
Renamed functions and deprecations
-
Function
Analyse_SAR.OSLdata()is now officially deprecated,
analyse_SAR.CWOSL()should be used instead (#216, fixed in #264). -
Functions
CW2pHMi(),CW2pLM(),CW2pLMi()andCW2pPMi()have been
renamed toconvert_CW2pHMi(),convert_CW2pLM(),convert_CW2pLMi()
andconvert_CW2pPMi(), respectively. The use of the older names is now
deprecated and will produce a warning (#499, fixed in #503). -
Function
Second2Gray()has been renamed toconvert_Second2Gray()
(#498, fixed in #500). -
Function
PSL2Risoe.BINfileData()has been renamed toconvert_PSL2Risoe.BINfileData()
(#555, fixed in #556).
New dependencies
- We have added package
’vdiffr’as dependency insuggests. The package
enables us to automatically verify the consistency of plot outputs generated
by package functions against reference figures captured earlier. Although
this new dependency does not have any user-visible impact, it is required
when building’Luminescence’from source. The primary advantage lies in the
developer's domain, as it ensures that modifications to functions do not
inadvertently alter plot outputs.
Bugfixes
analyse_Al2O3C_CrossTalk()
- The function doesn't crash anymore if option
recordTypeis specified and
none of the records in the data set is of that type (#487, fixed in #488).
analyse_baSAR()
- Argument
XLS_filehas been replaced byCSV_fileand, as mentioned
above, the function now only accepts CSV files as input (#237, fixed in #270). - Add support for
recordTypepassed toget_RLumin the additional arguments. - Option
plot.singlehas been renamed toplot_singlePanels(#351, fixed
in #408). - The function crashed if the number of MCMC iterations was set equal to the
thinning interval; on the other hand, we saw errors reported from JAGS if the
number of MCMC iterations was not at least double the thinning interval. To
address this, we slightly retouched our automatic setting of the thinning
interval (which was problematic only if the number of MCMC iterations was
extremely low); on the other hand, if a user sets a thinning interval that
is too high, we now reset it to a lower value and raise a warning (#407,
fixed in #409). - The function crashed if a
Risoe.BINFileDataobject was provided and the
argumentirradiation_timeswas set; fixed. - The function was supposed to remove non-OSL curves from the dataset, but
it almost never did; fixed. - The function is more robust against input that may have been subset
inconsistently (#517, fixed in #518). - The function doesn't crash but reports more helpful messages in case the
user overrides the default set of monitored variables usingvariable.names
within themethod_controlargument (#521, fixed in #522).
analyse_SAR.CWOSL()
- The function crashed for a list input that led to
NULLfor various
reasons (e.g., unsuitable set of curves). Here the self-call attempted to
extract information from the results that did not exist in the first place
instead of returningNULL; fixed. - The produced
RLum.Resultsobject now also contains a column for the
grain (#553, fixed in #554).
analyse_FadingMeasurement()
- The function now checks for the version of the BIN-file that originated the
RLum.Analysisobject given as input, and reports a message if a version
older than 5 was used (#281, fixed in #282). - The function doesn't crash anymore on some
RLum.Analysisinput files
(#283, fixed in #288). - Option
plot.singlehas been renamed toplot_singlePanels(#351, fixed
in #408). - The function doesn't crash anymore if no record is left after removal of
records with negative time since irradiation (#454, fixed in #456). - The function has been made more robust in the calculation of rho' (#558,
fixed in #559).
analyse_IRSAR.RF()
- The performance of this function has been improved for the "SLIDE" and
"VSLIDE" methods, thanks both to tweaks in the C++ implementation of the
sliding algorithm and in how that is managed on the R side. In particular,
the default number of sliding windows tested in the algorithm has been
reduced from 10 to 3: this value is no longer hardcoded, but can be tuned
through the newnum_slide_windowssetting (part of themethod.control
option), thus allowing to find a balance between computation time and
quality of fit (#372, fixed in #388, #398 and #399). - The function is more robust against
sequence_structuremisspecifications
(#393, fixed in #394). - Some data preparation steps where not correctly applied for
method = "VSLIDE"
(#396, fixed in #397). - Option
method.controlhas been renamed tomethod_controlfor consistency
with all other functions in the package (#411, fixed in #412).
analyse_pIRIRSequence()
- Option
plot.singlehas been renamed toplot_singlePanels(#351, fixed
in #408). - The produced
RLum.Resultsobject now also contains a column for the
grain (#553, fixed in #554). - The function now checks that the
sequence.structureargument contains
at least one IR step (#579, fixed in #580).
analyse_SAR.CWOSL()
- Option
plot.singlehas been renamed toplot_singlePanels(#351, fixed
in #408). - The function shifted the curves correctly in cases where the first channel
is zero and a log-transformation on the x-axis is requested (#580, fixed in
#531).
apply_CosmicRayRamoval()
- Support has been added for the internal function
smooth_RLumthat can
be passed as new argument formethod.
calc_AverageDose()
- The function crashed if the data contained non-positive values: now these
are removed before proceeding (#532, fixed in #533).
calc_CentralDose()
- Argument
na.rmis now deprecated: the function will now always remove
missing values, as otherwise the presence of anyNAwould propagate and
produce unusable results (allNAs) or buggy behaviour (#302, fixed in #304). - The function stops the fixed-point iteration for the computation of the
profile log-likelihood as soon assigma < 1e-16, as allowingsigmato
become zero leads to infinities and buggy behaviour (also fixed in #304).
calc_FastRatio()
calc_FiniteMixture()
calc_gSGC()
- The function crashed if the data contained negative errors: to avoid this,
we now take the absolute values of errors (#479, fixed in #481).
calc_Huntley2006()
v0.9.26 (CRAN)
Changes in version 0.9.26 (2024-11-18)
Removed functions
- Function
calc_Kars2008()(deprecated since version 0.8.1) is now
officially defunct,calc_Huntley2006()should be used instead
(#252, fixed in #257).
Bugfixes
analyse_pIRIRSequence()
- The function crashed with a object merge error if run in a loop
because of amerge_RLum()error. This was caused by a regression
while implementing then_Ncalculation inplot_GrowthCurve().
Potentially affected was alsoanalyse_SAR.CWOSL(). - The function now shows a warning and sets
plot = FALSEwhen option
plot.single = FALSEis set but the device size is too small. This
should prevent “Figure margins too large” errors. - The function will not crash anymore during the plotting in another
edge case related to single grain data.
analyse_SAR.CWOSL()
- The function crashed for mixed set of
RLum.Analysis-classobjects
typically observed for single grain data, e.g., one object contains
only TL curves while all others contain the OSL/IRSL data from the
grain. As the function filters those records automatically, it
crashed because the aliquot number assignment internally relied on
the length of the object (regression, #373, fixed)
analyse_SAR.TL()
- The function now produces a more correct
rejection.criteriadata
frame (#245, fixed in #246). - Several edge cases that led to crashes have been fixed (#147, fixed
in #247).
get_RLum()
- When the function was used on a list of
RLum.Analysis-class
objects with the argumentnull.rm = TRUEit would remove all
NULLobjects, but not elements that becamelist()(empty list)
during the selection; fixed. - Fix an edge case that caused a rather non-expected, more visible
output problem. When curves were selected viarecordTypeon
RLum.Analysis-classobjects (or a list of them) containing only a
singleRLum.Data-classobject, the function returned the
RLum.Data.Curve-classobject regardless of the selection in
recordType. In other words: if a user triedrecordType = "TL"on
anRLum.Analysis-classobject that contained only a single IRSL
curve, the function would still return that single IRSL curve
instead of an empty element. The reason for this behaviour was a
poor attempt to deal withNAin therecordTypename that led to
missing values and unexpected behaviour for a logical comparison.
Now, before the subset happens,NAvalues inrecordTypeare
converted to"NA"(a character), allowing us to fix the incorrect
subsetting.
plot_RLum.Data.Spectrum()
- Add support for
lphiandlthetalight direction arguments for
plot.type = "persp". - Fix the reason for the unclear warning
In col.unique == col :
longer object length is not a multiple of shorter object length
write_R2BIN()
- Recently, non-ASCII characters in comments or file names have become
more common and that led to crashes during the file export. To avoid
this, now all non-ASCII characters are replaced by_before
writing them to the BIN/BINX files. - The function now returns the file path of the export.
- Fix a bug that left connections open if the function crashed.
Internals
- Two new internal functions
.throw_warning()and.throw_error()
sometimes flushed the terminal with messages if called (internally)
in particular circumstances. Now we maintain a stack of function
names, so that at any time we can report correctly the name of the
function where an error or a warning is thrown (#254, fixed in
#256).
What's Changed
- Post release version bump by @mcol in #240
- Don't use the bbmle::profile() try_harder option in calc_MinDose() by @mcol in #241
- Remove the windows-2019 (oldrel) instance from the CI actions by @mcol in #242
- Add the expect_snapshot_RLum() test helper and start using it by @mcol in #244
- Correct the rejection.criteria data frame created by analyse_SAR.TL() by @mcol in #246
- Fix crashes in analyse_SAR.TL() by @mcol in #247
- Silence notes raised by R CMD check by @mcol in #249
- Use add = TRUE with on.exit() by @mcol in #255
- Replace the implementation of .throw_error() and .throw_warning() by @mcol in #256
- Set calc_Kars2008() as defunct by @mcol in #257
Full Changelog: v0.9.25...v0.9.26
v0.9.25 (CRAN)
Changes in version 0.9.25 (2024-09-12)
This package version requires R >= 4.3
New functions
read_HeliosOSL2R(): New import function to support the new zero rad
Helios luminescence reader and its.oslfile format. The output is
anRLum.Analysis-classobject.
Bugfixes
analyse_baSAR()
- Fix #183 addressing an edge-case crash when the function was called
on an object containing no records of the appropriate type (#184,
@mcol).
analyse_FadingMeasurements()
- Add
...support to disable the blue trend line via
plot.trend = FALSE - Fix #175 to deal gracefully with the case when the size of Lx and Tx
doesn’t match (#192, @mcol).
analyse_portableOSL()
- Function did not respect argument
main; fixed.
convert_Wavelength2Energy()
- Fix #133 addressing cases where R throws an uncontained error when R
drops the object structure in very rare cases (#134; thanks @mcol)
calc_Huntley2006()
- Improve success rate of GOK fitting of the unfaded data using a two
step approach: first an exponential fit is applied then this values
are used as start parameters.
calc_Statistics()
- The skewness and kurtosis depended on number of MC samples (#122);
fixed with #123 (thanks to @mcol)
calc_TLLxTxRatio()
calc_WodaFuchs2008()
- The function now officially supports numeric vectors and single-column
data frames as input (#200). - The function computed the number of breaks for the histogram
incorrectly (#197, fixed with #198). - The function now supports more types of
RLum.Resultsobjects without
crashing, although if the object contains only one data point it will
stop immediately to avoid problems withnls()(#199, fixed in
#219).
extract_IrradiationTimes()
- If a BIN/BINX-file is provided, the function will now check that it
contains the same amount of data as the corresponding XSYG file a bit
earlier than before, thus avoiding a possible crash (#228, fixed in
#229).
fit_CWCurve()
- Argument
output.pathhas been removed, and a warning is raised when
attempting to use it (#207, fixed in #209).
fit_EmissionSpectra()
fit_OSLLifeTimes()
- The validation of the minimum dataset size didn’t account for the use
of thesignal.rangeargument (#182, fixed by #195, @mcol).
fit_SurfaceExposure()
- Fix #162 to remove a dimension mismatch if the input data contained
NAs, which would generate unexpected warnings (#163, @mcol). - The function doesn’t stop anymore with an error if called on an
RLum.Resultsobject (#165, @mcol).
plot_AbanicoPlot()
- Argument
plot.ratiowill now throw an error on non-positive
numerical values (#221, fixed in #222). - The function doesn’t crash anymore when setting
interactive = TRUE
(#220, fixed in #233).
plot_DetPlot()
- Argument
signal.integral.maxis now enforced to be greater than
signal.integral.min, as otherwise the computation of the number of
channels would produceInf(#203, fixed in #206). - Fix a crash when using option
analyse_function = "analyse_pIRIRSequence"(#210, fixed in #211).
plot_GrowthCurve()
- The function now calculates the relative saturation (
n/N) using the
ratio of the two integrates. The value is part of the output table. - Argument
na.rmhas been removed: as of version 0.9.23, it was
defunct and only acceptedTRUEas valid value and produced an error
otherwise, so there is no effective change in behaviour (#137, fixed
in #214).
plot_Histogram()
plot_KDE()
- It now officially supports numeric vectors and single-column data
frames, for which it assumes that the De error at each measurement is
10^-9 (#189, fixed in #194, @mcol).
plot_NRt()
- The function reports an helpful message rather than crashing when
applied to an object of unexpected type or when there is a mismatch in
time values (#177, fixed with #179 by @mcol).
plot_RadialPlot()
- The function doesn’t crash anymore when a single-column data frame is
provided (#191, fixed in #212).
plot_RLum.Data.Analysis()
- The function now supports all arguments from
plot_RLum.Data.Spectrum(); before it had only basic functionality
forRLum.Data.Spectrum-classdata.
plot_RLum.Data.Spectrum()
- The plot function can now handle non-increasing column values for
plotting (with a warning).
read_BIN2R()
ignore.RECTYPEnow supports numeric values, e.g., 128. Records for
this type will be ignored during import.- BINX-files with
RECTYPE = 128will not crash anymore, thanks for
asking Anna-Maartje Boer and replying Karsten Bracht. - The function now stops graciously when attempting to read an empty
file (#225, fixed in #226).
read_PSL2R()
- The function is out of the beta status, hence the flag was removed.
- The
RLum.Analysis-classobject returned by the function gained a new
elementSequence, which is a data frame. with the measured sequence.
This way, if the original sequence was lost, it can still be extracted
from the.psldata. - If no
.pslfile was found the function got trapped in an infinite
loop (#127); fixed with #128 (thanks to @mcol)
read_XSYG2R()
- Fix spectrometer data import for basically broken files.
read_Daybreak2R()
Risoe.BINfileData2RLum.Analysis()
Internals
- New internal function + tests added
.get_named_list_element(). It
just does what the names says.
What's Changed
- Don't let a 1-column matrix become a vector in convert_Wavelength2Energy() by @mcol in #134
- Check length of g_value argument in calc_Lamothe2003(). by @mcol in #132
- Fix crash in calc_TLLxTxRatio() if Tx.data.background=NULL. by @mcol in #130
- Improve input validation and complete coverage in read_PSL2R.R by @mcol in #128
- Complete coverage for read_RF2R.R. by @mcol in #126
- Increase coverage in calc_gSGC_feldspar.R. by @mcol in #125
- complete coverage in calc_Statistics.R by @mcol in #124
- Fix computation of skewness and kurtosis with MCM. by @mcol in #123
- Fix error message and awkward code in plot_GrowthCurve() by @mcol in #139
- More coverage by @mcol in #136
- More coverage by @mcol in #143
- Better detection of non-ASCII files in read_Daybreak2R.R by @mcol in #140
- Clean up input validation in calc_FiniteMixture() by @mcol in #142
- More coverage and some typos by @mcol in #145
- Don't pollute the working directory with generated output from test_write_RLum2CSV.R by @mcol in #149
- More coverage and typos by @mcol in #150
- Use nocov start/end to exclude untestable regions from coverage by @mcol in #151
- Validation of scalar variable expected to be positive by @mcol in #152
- More coverage by @mcol in #153
- Remove duplicated list of authors from the DESCRIPTION file by @mcol in #154
- Fix .throw_error() and .throw_warning() by @mcol in #155
- More coverage by @mcol in #156
- Add option null.ok to .validate_positive_scalar() by @mcol in #158
- Improve input validation in calc_FastRatio.R by @mcol in #159
- Propagate the input_scale argument in fit_EmissionSpectra() by @mcol in #160
- Remove warnings from fit_SurfaceExposure() if data contains NAs by @mcol in #163
- More coverage and fixes by @mcol in #164
- two small errors in fit_SurfaceExposure() by @mcol in #165
- Remove test results for R version < 3.6 by @mcol in #166
- Switch globally to testthat 3rd edition by @mcol in #167
- Copy the tests/testdata files to tests/testthat/_data and package them by @mcol in #170
- Some more coverage by @mcol in #171
- Include testthat/data into the package and update tests to refer to it by @mcol in #169
- More coverage by @mcol in #172
- Start silencing output from tests by @mcol in https://github.com/R-Lum/Luminescence/p...
v0.9.24 (CRAN)
Changes in version 0.9.24 (2024-06-07)
This package version requires R >= 4.3
New functions
-
trim_RLum.Data(): This new function enables trimming off the number
of channels of all supportedRLum.Data-classon the time domain. For
instance, an OSL curve (RLum.Data.Curve-class) has 1000 channels;
one may want to extract only channels 10 to 100. Moreover, sometimes,
RLum.Data-classobjects have a different number of channels but are
otherwise measured with the exact time resolution. Until now, it was
possible to merge those curves, but the subsequent analysis usually
failed because most of the analysis functions check whether the number
of channels matches. -
import_Data(): A convenience wrapper around all functions commencing
withread_. The functions steps through all functions and the one
that can import a file is chosen. This function simplifies writing of
scripts for different data formats.
The Thermochronometry functions (internal)
- Add internal function to import thermochronometry XLSX sheets into R;
an R implementation ofSTAGE1, ExcelToStructure; the function has no
user visible use for the moment.
Bugfixes and changes
analyse_IRSARRF()
- The function crashed for
RF_nat.limsettings with two parameters;
fixed (thanks to Mariana Sontag-Gonzalez for reporting) - The function gained a new argument option for
method:"VSLIDE". If
set, the vertical sliding with the range set to"auto"is used for
the estimation of the equivalent dose.
analyse_SAR.CWOSL()
- The function gained a new argument
trim_channels. The default is
FALSEto do not break existing code. IfTRUEOSL and IRSL are
curves are checked for the lowest number of channels on the curves and
then all curves are trimmed accordingly usingtrim_RLum.Data(). This
should fix an issue where data could not be analysed due to different
channel numbers erroneously produced by the luminescence readers. - The dose points names are returned as
factors(which they are)
instead ofcharacters, with their class in the correct order. If you
expect character values this may break existing code. - The
$dataelement gained two new columnsALQandPOSwhere the
functions tries to store data about the running aliquot number and the
position of the aliquot in the reader. The latter can only be accessed
if this information was provided in measurement data (e.g., XSYG or
BIN/BINX) - The argument
rejection.criteriagained a new option
recuperation_referencepreset to"Natural"to specify the
regeneration reference dose point taken into account for calculating
the recuperation rate (suggested by Anna-Maartje Boer and Jakob
Wallinga)
calc_Huntely2006()
- If the age is
NAdue toLn/Tnvalues lower than the smallest
simulatedLx/Txvalue, a warning with an explanation is returned.
Thanks to Christina Neudorf for providing the test dataset. - Better catch a few uncontrolled errors and improve the success of the
fitting (thanks to Salome Oehler for providing scripts and datasets) - Regression: The changes in the last version led to unexpected function
behaviour in cases where users tried the fading correction with only a
few dose points in the lower part of the dose-response curve because
the fits were no longer forced through the origin. This issue is now
corrected, and the user can use the argument
fit.force_through_origin(which is passed down to
plot_GrowthCurve()) to force the fit again through the origin
(thanks to Junjie Zhang for reporting the issue).
convert_Activity2Concentration()
- The function did not work as expected if input was provided as
abundance and the output data frame was missing values; fixed. - The parameter
input_unitnow expects either"activity"(the
default) or"abundance"instead of"Bq/kg"or"ppm/%'. The old
input parameters are still silently accepted. - Potentially breaking change: The naming of the output data frame
now reports SI unit conform values, i.e. weppmis no longer
acceptable because it might have different interpretations. To reflect
this change, in the function title we replaced “concentration” with
“abundance”.
read_BIN2R()
- Argument
n.recordscan now be provided as a vector to specifically
select records for the import. All other records are skipped and not
imported. This can be useful in particular for very large
BIN/BINX-files because allows importing single records very quickly
without parsing the entire file - The function is now less talkative for zero byte records and stopped
spamming the console. - The function learned about
RECTYPE128 records and can now import
them (before those records were skipped). As it is in the original
format, these information are only appended to the BIN/BINX file,
means they do not really represent measurement data. Please note that
this support is highly experimental! - The download of files now uses the new internal function
.download_file()
read_Daybreak2R()
- The function gained the
...argument for compatibility reasons
read_RF2R()
- The function gained the
...argument for compatibility reasons
read_SPE2R()
- The function gained the
...argument for compatibility reasons - The argument verbose was not fully respected; fixed
read_TIFF2R()
- The function gained the
...argument for compatibility reasons
read_XSYG2R()
- Tries a little bit harder to determine the correct file path.
- Returns the file path as
@infoobject in theRLum.Analysis-class
output. - If the file is not readable it only shows the R error and not anymore
the internal error.
plot_DetPlot()
- New argument
plot: The function gained the new parameterplotto
provide the possibility to disable the plot output for more complex
operations - Additional input: The function now understands lists of
RLum.Analysis-classobjects and iterates over those objects
automatically. - New argument
multicore: As an addition to the list operation, the
function can let it run in a multi core session - The legend displayed the wrong labels for the equivalent dose and the
Ln/Tnvalues; fixed. - The legend is now disabled by default if no shine-down curve is shown;
it can be activated again manually usinglegend. - The par settings were not correctly reset; fixed.
- The function now supports the
trim_channelargument from
analyse_SAR.CWOSL()
plot_GrowthCurve()
- Edge case: If the
Ln/Tnvalues was way below the fit and
fit.method = EXPwas chosen for the fitting, the function still
returned a positive equivalent dose formode = interpolation. Now
the returned value isNAsince no interpolation was possible. - Minor graphical polish: the dashed lines are drawn to the end of the
plot area.
plot_RLum()
- The function knows how to process results produces by
analyse_SAR.CWOSL(),analyse_pIRIRSequence()and
analyse_IRSARRF(); the functionality is very basic and for fast
reporting situations only.
report_RLum()
- The file
*.Rdsfile path download did not function anymore; fixed. - The function threw an non-conclusive warning; fixed.
Risoe.BINfileData-class()
- The
showmethod now knows aboutRECTYPE128 and will account for
it.
Risoe.BINFfileData2RLum.Analysis()
- The function learned about
RECTYPE128 records. Those records
contain ROI data from camera measurements and are skipped for the
moment because they do not really belong to measurement data. This may
change future.
Internals
- Add internal download helper
.download_file()for a more consistent
approach to detect URL schemes and download files across the package - Cover tricky edge case for the internal function
.expand_parameters(). The function is used to recycle and expand
function parameters if the input is a list object. It apparently
showed odd behaviour if a function was used in a loop with objects of
its own, e.g.,f(x = i + 1), then the function would recyclei + 1
and then evaluatei + 1in the function environment. Usually, this
should throw an error, but in particular,iis an object name
commonly used in loops, so the function went upwards in the
environments until it found the firsti. However, this is not the
iinserted by the user. The result was that the loop did not seem to
work for no apparent reason. Now,.expand_parameters()evaluates
input in the parent environment before passing it down.
v0.9.23 (CRAN)
Changes in version 0.9.23 (2023-11-03)
This package version requires R >= 4.2
Bugfixes and changes
analyse_portableOSL() (potentially breaking changes)
The function received a major update, including an updated output
object. Please make sure that you read the changes before updating,
because it may break your existing code!
- New argument
modeadded with two options'profile'(the default)
and'surface'. The latter is intended for 2D surface interpolation
of luminescence signals and was newly added. - New argument
coordadded, to allow the user to provide a list or
matrix of xy-coordinates of the sampling position. If nothing is
provided, the coordinates are extracted from the file name or an index
is calculated. - The function now always translates input order in x and y coordinates,
to have the treatment consistent. - In profile mode, the function now returns also the dark count values
with their standard deviation. The dark counts can also be plotted in
the surface mode, although it probably does not make much sense. invert = TRUEthe y-axis is now also inverted and the inversion
works more consistently...argumentgrid(enabled by default) for better parameter
reading...argumentsamplewas changed torunbetter complying with the
terminology of the PSL format, where...argumentbg_imgwas added to provide a background image (e.g.,
a profile photo) for overlay the sample name is called run....supports a lot more arguments to enable better plot
modifications in particular for the newly added surface interpolation
mode.
calc_Huntley2006()
- The function can now handle
"extrapolation"forfit.method = "GOK"
orfit.method = "EXP"and is therefore suited to additive
measurement protocols. This implementation has beta character and
needs further testing.
read_PSL()
- Remove unwanted characters less aggressively from sample name; with
this new setting, coordinates can be passed.
plot_GrowthCurve()
- The function crashed for the setting
plot_GrowthCurve(..., mode = "alternate", fit.method = "LambertW");
fixed (#114, @Eiskeil, thanks for reporting). - Now throws a warning in
mode = "extrapolation", fit.method = "LambertW"of the standard root
estimation failed and hence the results can become inconclusive. fit.method = "GOK"now supports fits that are not necessarily forced
through the origin.- If the calculated fit weights were invalid, the parameter was not set
always correctly set; fixed. - Non-user visible change: the fit formula is now extracted more
consistently and less error-prone. - If the first
Lx/Txvalue was very high, the x-axis origin in the
plot was not always shown by default. This was intended behaviour,
however, sometimes this causes confusion. Now the axis origin is
always shown. Still the axis limits can still be modified usingylim
andxlim. (Thanks to Salome Oehler for flagging this issue). - The fitted curve now always extends to the plot margins.
Internals
- Adding new dependency to
'interp' - Remove dependency to orphaned package
'plotrix'; the code in one
affected function was replaced using base R code
v0.9.22 (CRAN)
Changes in version 0.9.22 (2023-08-07)
This package version requires R >= 4.1
New functions
subset_SingleGrainData(): the function provides a convenient sub
setting ofRisoe.BINFileData-classobjects using a table of position
and grain pairs
Bugfixes and changes
convert_PSL2CSV()
- The function still contained a bug if the parameters were combined in
a certain way; fixed.
extract_IrradiationTimes()
- Now silently handles
RLum.Analysis-classobjects imported via
read_BIN2R(..., fastFoward = TRUE), this allows to use the function
in a more general manner.
merge_RisoeBINfileData()
- Does not anymore throw an error if the number of input objects was
smaller than two. It just passes the input through unchanged.
plot_DetPlot()
- The function now returns a clear error message if the input object is
not of typeRLum.Analysis - Edge case: the function does not crash anymore if used in a loop and
if all equivalent doses wereNA; it sill throws warnings though.
(thanks to Annette Kadereit for reporting)
write_RLum2CSV()
- The behaviour of the parameter
prefixcaused confusion, because in
combination with multiple files the function overwrote created files,
although this was wanted behaviour now the prefix is always added to
the automatically created files names.