Skip to content

Releases: R-Lum/Luminescence

v1.1.2 (CRAN)

12 Dec 08:40
v1.1.2
fd7d9ce

Choose a tag to compare

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() and CW2pPMi()
    (deprecated since 1.0.0) have been removed, but their functionality
    remains in the corresponding convert_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() and is.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 the inherits()
    function, as in inherits(object, "RLum.Data.Curve") (#1034).

Bugfixes and changes

analyse_Al2O3C_CrossTalk()

  • The function no longer crashes if dose_point is 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 = NULL is used with the
    FIT method (#1055).

  • The function has been optimized to be faster during the bootstrap and
    sliding phases for the SLIDE and VSLIDE methods, 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 = FALSE has
    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 ... argument labcex and scale with cex
    (#1075).

  • The size of the interpolation grid can be controlled via the ...
    arguments nx and ny (#1077).

  • The coord argument is now better validated to avoid a crash in case
    of misspecification (#1097).

analyse_SAR.CWOSL()

  • Empty subplots are inserted when onlyLxTxTable = TRUE to preserve
    the usual plot ordering. This prevents a crash that would otherwise
    occur if the option was set from analyse_pIRIRSequence() (#1186).

  • The function crashed when applied to an object generated by
    OSLdecomposition::RLum.OSL_decomposition() with plot = 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.criteria list specified a
    NULL value for recuperation_reference (#1204).

  • The space around the plots when using plot_onePage = TRUE has 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 (for RLum.Data.Curve), bin_size.row
    and bin_size.col (for RLum.Data.Spectrum) has been made stricter,
    so that invalid values produce an error (#1104).

calc_AliquotSize()

  • The function no longer hangs when grain.size is 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.iter argument to avoid an ugly
    crash if a non-positive value is provided (#1124).

  • The function now better validates its grain.size argument (#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 NA values 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_value is an RLum.Results
    object with an unsupported originator instead of returning NULL
    (#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 when pdf.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.data and Tx.data arguments 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_control argument (#1038).

fit_CWCurve()

  • If model fitting failed but an object named fit was present in the
    workspace, the function tried to use that one, which would lead to a
    crash or to unexpected results (#1081).

  • The output.table field of the RLum.Results object 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
    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 frame argument in order to avoid
    crashing on misspecified values (#1036).

  • The function no longer crashes when a small plot.ratio value is
    specified (#1062).

  • The function now validates the zlim argument to avoid a crash if
    negative values are used with log.z = TRUE (#1063).

  • The legend text now scales better at high cex values (#1066).

  • If summary.pos contains 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. If reg_points_pch is
    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.pos to one of “left”, “center”
    or “right” and normal_curve = TRUE resulted in the summary table not
    being visible (#1118).

plot_KDE()

  • Space a...
Read more

v1.1.1 (CRAN)

11 Sep 11:11
v1.1.1
74b8ae2

Choose a tag to compare

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) and Second2Gray() (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() and convert_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 NULL value
    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_argument as a numeric
    vector of length 3, as was already documented (#930).

analyse_SAR.CWOSL()

  • The function crashed if any of the curves had NA as its recordType
    (#867).

apply_CosmicRayRemoval()

  • The method argument of smooth_RLum() was not reachable via ...
    as the apply_CosmicRayRemoval() already has an argument called
    method. Now the ... argument is called method_smooth_RLum and
    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.MC argument, 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 for n.MC = 10000). This
    regression was introduced in version 1.0.0 (#867).

calc_MaxDose()

  • The function crashed if sigmab was set to a very small value (#898).

calc_MinDose()

  • The function crashed when bootstrapping with bs.M = 1. Now the
    bs.M parameter 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
    NA values (#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.raw column to
    store the calculated De value computed by the fitting function “as
    is”, without setting meaningless results to NA. The De and
    .De.raw columns differ only for mode = "interpolation", where the
    first sets the De to NA if 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 NA value 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$De data frame are now reported in a
    different order; an additional “Mode” column reports the value of the
    mode argument; 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 to 0 threw the correct warning
    but actually did nothing (38e4324).

fit_OSLLifeTimes()

  • The function ensures that the signal_range argument doesn’t contain
    negative values instead of crashing (#896).

get_RLum()

  • The function doesn’t crash anymore on RLum.Analysis objects if using
    the record.id argument 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 when merge_RLum() is called
    over a sufficiently large number of RLum.Analysis objects (#875).

merge_Risoe.BINfileData()

  • The function gained argument verbose to allow disabling the output
    from read_BIN2R() and write_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 frame argument is now respected also when the plot is rotated
    (#863).

  • The weighted median is computed correctly when summary = "median"
    and summary.method = "weighted" are used (#905).

plot_DoseResponseCurve()

  • We added support for the log graphical 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() 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 cex values (#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 cex values
    (#879).

  • The weighted median is computed correctly when summary = "median"
    and summary.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 cex settings
    (#854).

plot_RLum.Data.Curve()

  • The function gained a new logical argument interactive that enables
    interactive plotting of curves using plotly::plot_ly(). It requires
    the suggested package 'plotly' to be installed (e4746ea).

plot_RLum.Data.Spectrum()

  • Types image and contour gained more control of the contour line
    labels through the argument labcex.

  • For plot types "image" and "multiple.lines" the ... logical
    argument legend was added.

  • Plot type "image" further gained a legend with support through ...
    for legend.pos, legend.horiz and n_breaks to control the number
    of colours in the graphic.

read_BIN2R()

  • The FNAME metadata 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_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...
Read more

v1.1.0 (CRAN)

12 Jun 07:46
v1.1.0
dea00e1

Choose a tag to compare

Changes in version 1.1.0 (2025-06-11)

New functions

  • remove_SignalBackground(): A user-friendly method to subtract
    background signals from various curves in RLum.Analysis objects
    without resorting to lapply() loops. Depending on the record type,
    the function identifies pairs of curves; for instance, if in a
    sequence, a TL curve is immediately followed by another TL curve,
    the second curve is recognised as the background signal, subtracted
    using merge_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 modify RLum-class objects. It operates on
    RLum.Analysis objects or a list of such objects to remove unwanted
    records from datasets. Although the function calls get_RLum() and
    relies on its functionality, the new implementation facilitates a more
    logical workflow and analysis pipeline.

  • .as.latex.table(): Converts RLum.Results objects where suitable to
    LaTeX ready tables, for instance, objects produced by use_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

  • RF70Curves is a new dataset consisting of two IR-RF curves measured
    with the RF70 protocol. This new dataset provides a more realistic
    example for analyse_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() and plot_GrowthCurve(),
    the fit.method option LambertW was replaced by the more correct
    term OTOR.

  • Argument cex.global has been removed from plot_DoseResponseCurve()
    (and consequently also from plot_GrowthCurve()), and if set it will
    be silently ignored. Users can set the cex graphical parameter via
    ... in its place (#831).

  • The fit.method and fit.advanced arguments of function
    fit_LMCurve() have been removed. The default fitting method has been
    changed from port to LM, and support for the port algorithm has
    been removed. From now on, argument fit.method is silently ignored,
    unless fit.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 Lx and Tx curves was not
    equal when structure = 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 Lx and Tx
    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 ... argument verbose. Previously this could
    only be done via the txtProgressBar argument (which is still
    supported), but the new option makes the interface consistent with
    most other functions (#805).

  • The mtext and cex options are respected if method = "None"
    (#807).

  • The residual plot correctly respects the logarithmic transformation of
    the x-axis when log = "x" or log = "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 method is
    either SLIDE or VSLIDE, is also drawn when log = "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 cex graphical argument, and its plot
    output has been subtly improved thanks to various fixes that have
    occurred especially in plot_DoseResponseCurve() (#831).

analyse_portableOSL()

  • The function now returns an error if mode is something other than
    "profile" or "surface".

  • The mode argument 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.integral argument 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 cex and type graphical 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 ... argument contour never produced a meaningful
    contour plot due to an internal error (#686). Along, arguments
    contour_nlevels and contour_col are 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.test that is only of use in combination with the OTORX
    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 Grain panel 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.structure argument ensures that a “SIGNAL”
    entry has been specified (#779).

calc_AliquotSize()

  • The new argument sample_carrier.diameter allows 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.components argument
    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 sigmab there 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 sigmab and n.components (#708).

  • Another crash occurred when height of the largest density curve could
    not be estimated due to the presence of too many NA values 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.criteria argument
    to control whether the statistical criteria curves should be drawn.
    Moreover, support for the ... options has been added: cex to
    control the overall scaling, main.densities, main.proportions and
    main.criteria to set the subplot titles (#717).

  • Plots are now generated even when results contain NA values, 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 cores argument,
    and for the nls-fitting control options maxiter and trace.

  • The fitting of the simulated curve with the GOK model has been made
    more robust: when an initial fit of the model fails, the ...

Read more

v1.0.1 (CRAN)

07 Mar 16:56
v1.0.1
4884ccb

Choose a tag to compare

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 for n.MC other 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, ylim and zlim parameters 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 from analyse_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)

21 Feb 15:20
v1.0.0
602a84b

Choose a tag to compare

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 executing vignette("crosstalk").

  • calc_EED_Model() models incomplete and heterogeneous bleaching of
    mobile grains after Guibert et al. (2017). Along with the function, the
    new ExampleData.MortarData data set was added.

  • fit_DoseResponseCurve() and plot_DoseResponseCurve() are two new
    functions derived from plot_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 flat data.frame that can be used for instance
    in combination with 'ggplot2'. It works only on RLum.Data.Curve-class
    and RLum.Analysis-class objects and lists of such objects.

  • merge_RLum.Data.Spectrum(): This new function allows to merge two or
    more RLum.Data.Spectrum objects in different ways (#368, fixed in #419).

  • add_metadata(), rename_metadata(), replace_metadata():
    These function allow to manipulate the metadata of
    Risoe.BINfileData, RLum.Analysis and RLum.Data objects (#480, fixed
    in #514, #524, #525, #527, #534, #545).

  • sort_RLum(): Allows to sort the records of RLum.Analysis and
    Risoe.BINfileData objects according to a given slot or info element
    (#528, fixed in #571 and #576).

  • view(): Provides a shortcut to the utils::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 readxl package: functions
    analyse_baSAR() and use_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 with write.csv().

  • The plot.single option, which was available for several functions,
    sometimes under a slightly different name, has now been renamed to
    plot_singlePanels for 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.MC option of plot_GrowthCurve() has now been
    renamed to n.MC for consistency with other functions. Potentially affected
    are also analyse_Al2O3C_ITC(), analyse_baSAR(), analyse_SAR.CWOSL(),
    analyse_SAR.TL(), calc_Huntley2006(), calc_Lamothe2003(),
    as they may pass that option plot_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() and CW2pPMi() have been
    renamed to convert_CW2pHMi(), convert_CW2pLM(), convert_CW2pLMi()
    and convert_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 to convert_Second2Gray()
    (#498, fixed in #500).

  • Function PSL2Risoe.BINfileData() has been renamed to convert_PSL2Risoe.BINfileData()
    (#555, fixed in #556).

New dependencies

  • We have added package ’vdiffr’ as dependency in suggests. 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 recordType is specified and
    none of the records in the data set is of that type (#487, fixed in #488).

analyse_baSAR()

  • Argument XLS_file has been replaced by CSV_file and, as mentioned
    above, the function now only accepts CSV files as input (#237, fixed in #270).
  • Add support for recordType passed to get_RLum in the additional arguments.
  • Option plot.single has been renamed to plot_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.BINFileData object was provided and the
    argument irradiation_times was 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 using variable.names
    within the method_control argument (#521, fixed in #522).

analyse_SAR.CWOSL()

  • The function crashed for a list input that led to NULL for 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 returning NULL; fixed.
  • The produced RLum.Results object 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.Analysis object 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.Analysis input files
    (#283, fixed in #288).
  • Option plot.single has been renamed to plot_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 new num_slide_windows setting (part of the method.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_structure misspecifications
    (#393, fixed in #394).
  • Some data preparation steps where not correctly applied for method = "VSLIDE"
    (#396, fixed in #397).
  • Option method.control has been renamed to method_control for consistency
    with all other functions in the package (#411, fixed in #412).

analyse_pIRIRSequence()

  • Option plot.single has been renamed to plot_singlePanels (#351, fixed
    in #408).
  • The produced RLum.Results object now also contains a column for the
    grain (#553, fixed in #554).
  • The function now checks that the sequence.structure argument contains
    at least one IR step (#579, fixed in #580).

analyse_SAR.CWOSL()

  • Option plot.single has been renamed to plot_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_RLum that can
    be passed as new argument for method.

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.rm is now deprecated: the function will now always remove
    missing values, as otherwise the presence of any NA would propagate and
    produce unusable results (all NAs) or buggy behaviour (#302, fixed in #304).
  • The function stops the fixed-point iteration for the computation of the
    profile log-likelihood as soon as sigma < 1e-16, as allowing sigma to
    become zero leads to infinities and buggy behaviour (also fixed in #304).

calc_FastRatio()

  • A number of crashes related to input validation have been fixed (#471,
    fixed in #472).

calc_FiniteMixture()

  • Arguments dose.scale and pdf.scale were not used and have been
    removed (#566, fixed in #567).

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()

  • Some crashes in case of model misspecification have been solved (#538,
    fixed in #539).
  • Some details in the implementation of the function have been optimized, and
    now it is much faster than before. As ...
Read more

v0.9.26 (CRAN)

18 Nov 13:30
v0.9.26
be1521a

Choose a tag to compare

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 a merge_RLum() error. This was caused by a regression
    while implementing the n_N calculation in plot_GrowthCurve().
    Potentially affected was also analyse_SAR.CWOSL().
  • The function now shows a warning and sets plot = FALSE when option
    plot.single = FALSE is 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-class objects
    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.criteria data
    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 argument null.rm = TRUE it would remove all
    NULL objects, but not elements that became list() (empty list)
    during the selection; fixed.
  • Fix an edge case that caused a rather non-expected, more visible
    output problem. When curves were selected via recordType on
    RLum.Analysis-class objects (or a list of them) containing only a
    single RLum.Data-class object, the function returned the
    RLum.Data.Curve-class object regardless of the selection in
    recordType. In other words: if a user tried recordType = "TL" on
    an RLum.Analysis-class object 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 with NA in the recordType name that led to
    missing values and unexpected behaviour for a logical comparison.
    Now, before the subset happens, NA values in recordType are
    converted to "NA" (a character), allowing us to fix the incorrect
    subsetting.

plot_RLum.Data.Spectrum()

  • Add support for lphi and ltheta light 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)

12 Sep 12:03
b3c017d

Choose a tag to compare

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 .osl file format. The output is
    an RLum.Analysis-class object.

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()

  • Function crashed for Tx.data.background = NULL (#129); fixed with
    #130 thanks to @mcol

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.Results objects without
    crashing, although if the object contains only one data point it will
    stop immediately to avoid problems with nls() (#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.path has been removed, and a warning is raised when
    attempting to use it (#207, fixed in #209).

fit_EmissionSpectra()

  • Parameter input_scale was not correctly propagated when the function
    would self-call (#160, @mcol).

fit_OSLLifeTimes()

  • The validation of the minimum dataset size didn’t account for the use
    of the signal.range argument (#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.Results object (#165, @mcol).

plot_AbanicoPlot()

  • Argument plot.ratio will 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.max is now enforced to be greater than
    signal.integral.min, as otherwise the computation of the number of
    channels would produce Inf (#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.rm has been removed: as of version 0.9.23, it was
    defunct and only accepted TRUE as valid value and produced an error
    otherwise, so there is no effective change in behaviour (#137, fixed
    in #214).

plot_Histogram()

  • The function doesn’t crash anymore when setting interactive = TRUE
    (#186, fixed in #231).

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
    for RLum.Data.Spectrum-class data.

plot_RLum.Data.Spectrum()

  • The plot function can now handle non-increasing column values for
    plotting (with a warning).

read_BIN2R()

  • ignore.RECTYPE now supports numeric values, e.g., 128. Records for
    this type will be ignored during import.
  • BINX-files with RECTYPE = 128 will 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-class object returned by the function gained a new
    element Sequence, which is a data frame. with the measured sequence.
    This way, if the original sequence was lost, it can still be extracted
    from the .psl data.
  • If no .psl file 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()

  • Fix #135 to improve detection of non-ASCII files (#140, @mcol).

Risoe.BINfileData2RLum.Analysis()

  • Fix a crash when reading an empty Risoe.BINfileData input (#215, fixed
    in #224).

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...
Read more

v0.9.24 (CRAN)

07 Jun 14:38
2c5cf8a

Choose a tag to compare

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 supported RLum.Data-class on 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-class objects 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
    with read_. 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 of STAGE1, ExcelToStructure; the function has no
    user visible use for the moment.

Bugfixes and changes

analyse_IRSARRF()

  • The function crashed for RF_nat.lim settings 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
    FALSE to do not break existing code. If TRUE OSL and IRSL are
    curves are checked for the lowest number of channels on the curves and
    then all curves are trimmed accordingly using trim_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 of characters, with their class in the correct order. If you
    expect character values this may break existing code.
  • The $data element gained two new columns ALQ and POS where 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.criteria gained a new option
    recuperation_reference preset 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 NA due to Ln/Tn values lower than the smallest
    simulated Lx/Tx value, 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_unit now 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. we ppm is 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.records can 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 RECTYPE 128 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 @info object in the RLum.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 parameter plot to
    provide the possibility to disable the plot output for more complex
    operations
  • Additional input: The function now understands lists of
    RLum.Analysis-class objects 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/Tn values; fixed.
  • The legend is now disabled by default if no shine-down curve is shown;
    it can be activated again manually using legend.
  • The par settings were not correctly reset; fixed.
  • The function now supports the trim_channel argument from
    analyse_SAR.CWOSL()

plot_GrowthCurve()

  • Edge case: If the Ln/Tn values was way below the fit and
    fit.method = EXP was chosen for the fitting, the function still
    returned a positive equivalent dose for mode = interpolation. Now
    the returned value is NA since 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 *.Rds file path download did not function anymore; fixed.
  • The function threw an non-conclusive warning; fixed.

Risoe.BINfileData-class()

  • The show method now knows about RECTYPE 128 and will account for
    it.

Risoe.BINFfileData2RLum.Analysis()

  • The function learned about RECTYPE 128 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 recycle i + 1
    and then evaluate i + 1 in the function environment. Usually, this
    should throw an error, but in particular, i is an object name
    commonly used in loops, so the function went upwards in the
    environments until it found the first i. However, this is not the
    i inserted 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)

03 Nov 15:33
3cebcd4

Choose a tag to compare

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 mode added 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 coord added, 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 = TRUE the y-axis is now also inverted and the inversion
    works more consistently
  • ... argument grid (enabled by default) for better parameter
    reading
  • ... argument sample was changed to run better complying with the
    terminology of the PSL format, where
  • ... argument bg_img was 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" for fit.method = "GOK"
    or fit.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/Tx value 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 using ylim
    and xlim. (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)

07 Aug 13:40
0297125

Choose a tag to compare

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 of Risoe.BINFileData-class objects 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-class objects 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 type RLum.Analysis
  • Edge case: the function does not crash anymore if used in a loop and
    if all equivalent doses were NA; it sill throws warnings though.
    (thanks to Annette Kadereit for reporting)

write_RLum2CSV()

  • The behaviour of the parameter prefix caused 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.