Skip to content

Releases: R-Lum/Luminescence

v0.9.16 (CRAN)

18 Nov 18:53
Compare
Choose a tag to compare

Changes in version 0.9.16 (2021-11-18)

This package version requires R >= 4.0.5

New functions

  • combine_Dr_De() This function allows to model dose rate and equivalent dose distributions to obtain an age from Bayesian modelling using both distributions. In the back, a couple of additional functions have been added to support this novel approach. This function requires JAGS (supported through 'rjags') on your computer along with a couple of other R packages prompted to you when you first try to use this function.

  • plot_OSLAgeSummary() Posterior distribution plot of ages. This function is used by combine_De_Dr(), however, it can be used as stand-alone plot.

Bugfixes and changes

analyse_FadingMeasurement()

  • If run in a loop (e.g., with lapply()), merging of the results with merge_RLum() failed because the returned objects were not always strictly identical; fixed.

analyse_SAR.CWOSL()

  • If all dose points were 0, the function crashed; fixed.

calc_CentralDose()

  • The output in element output$summary was confusing for log = FALSE. While the terminal output was correct, no differentiation was made between absolute and relative values in the output object depending on the log mode. Now two more columns were added to report the overdispersion always in absolute units (whatever that may be) and relative (thanks to Li Bo for reporting this problem).
  • No claim on the unit (e.g., Gy or s) is made in the terminal output anymore because we do not determine this information. Instead, now ‘abs.’ for absolute is used.

read_BIN2R()

  • The function crashed if it was run in a loop and encountered non-supported files; fixed.
  • The function does not crash anymore for zero-byte files but skips the import, returns a message and NULL.
  • For BINX files created using an EM-CCD camera, the function created, under particular circumstances, invalid records that could not be further transformed; fixed (thanks to Anna-Maartje de Boer for reporting).

plot_RadialPlot()

  • The function does not mess anymore with the par() settings of other subsequent plots

plot_GrowthCurve()

  • The function crashed in combination with analyse_SAR.CWOSL(...,fit.weights = TRUE) for unfortunate Lx/Tx error values (means, Inf) caused by noise-like OSL data; fixed. Thanks to Frederik Baumgarten for reporting the issue.

Internals

  • New dependency to the package 'mclust' is required by the two new functions.

v0.9.15 (CRAN)

24 Aug 14:22
Compare
Choose a tag to compare

New functions

  • fit_EmissionSpectra(): this new functions allows you to fit
    luminescence emission spectra (e.g., TL, RF) with a semi-automated
    start parameter estimation. The function was around quite some time
    but was finalised only recently.

Bugfixes and changes

General

  • We removed 'magrittr' from the dependency. It was never used
    within the package or required for examples, but loaded for
    convenience reasons to smooth the data analysis. However, with
    R >=4.1, a native pipe operator (|>) became available and
    'magrittr' is no longer needed (but can still be loaded by the
    user via library(magrittr) if needed).

analyse_FadingMeasurement()

  • Minor graphical issue in the plot output: if the shine-down curve
    did not start at 0 s, the integration limits were drawn incorrectly
    (the calculation was correct, though); fixed.

analyse_SAR.CWOSL()

  • The extraction of irradiation times, if irradiation curves were
    provided (e.g., usually part of XSYG files), did not work reliably;
    fixed.

calc_AverageDose()

  • The function aggressively reset plot areas also in cases nothing was
    plotted; fixed.

plot_AbanicoPlot()

  • If the input was of type data.frame the function struggled if the
    data.frame had more than two columns. While this was clearly
    indicated in the documentation, the behaviour was annoying, because
    it made always an extra sub-setting necessary when working with
    data.frames comprising more than two columns. Now the function
    discards all other columns except for the first two if the input is
    a data.frame.

plot_GrowthCurve()

  • The function crashed if fit.method = "LambertW" and the Ln/Tn
    largely exceeded the highest Lx/Tx point; fixed.

plot_RLum.Data.Spectrum()

  • For plot.type = "image" the labels for the contour did not scale
    for changed cex settings; fixed.

v0.9.14 (CRAN)

21 Jul 11:35
Compare
Choose a tag to compare

Changes in version 0.9.14 (2021-07-21)

This package version requires at least R >= 4.0.5

Bugfixes and changes

plot_AbanicoPlot()

  • The function lost the parameter output (default TRUE), which was
    superfluous because the output was calculated regardless this
    option. Now the output is always returned, but invisible on the
    terminal. This has no user-visible effect and does not break old
    code.
  • The function had a long-standing nasty bug that caused overplotting
    if the function was called repeatedly
    with par settings different from the default par(mfrow = c(1,1));
    fixed.
  • In the case, the plot was shown on different panels (e.g.,
    par(mfrow = c(1,2))) in combination with the option dots = TRUE,
    the function crashed with the cryptic message:
    Error in rep(20, length(dots.x.i) - 1) : invalid 'times' argument;
    fixed.

analyse_FadingMeasurement()

  • Apparently, the function never worked as intended for XSYG files;
    fixed. To prevent further problems, a test was added that monitors
    this functionality.
  • The parameter t_star now supports half_complex, which uses the
    long equation from Auclair et al. (2003). The difference is of
    theoretical nature, however, now the two values can be compared.
  • The plotting speed was improved by limiting the number of shine-down
    curves to a maximum of ten. Likewise, the lines showing the error
    range is now a polygon instead of single lines.

plot_RLum.Analysis()

  • The function gained a new argument records_max enabling only a
    limited number of curves to be shown in the mode combine = TRUE.
    This avoids that a large number of curves become indistinguishable.
    The first and the last curve are always shown, all other curves are
    shown following an evenly distributed index interval.
  • The ... argument sub (sub title of the plot) for
    combine = TRUE did not work properly due the R’s partial matching
    of arguments that conflicted with the argument subset. The
    argument sub was now renamed to sub_title to prevent this error
    from happening and support again subtitles.

verify_SingleGrainData()

  • Improve terminal and plot output
  • Add minimal support for ... to control plot output if wanted

v0.9.13 (CRAN)

03 Jun 16:48
Compare
Choose a tag to compare

Changes in version 0.9.13 (2021-06-03) (v0.9.12 was never released)

  • read_TIFF2R() Wrapper function to import TIF/TIFF files and TIFF
    image stack data

Bugfixes and changes

calc_FadingCorr()

  • If no solution could be found (usually the case for unrealistically
    large g-values), the function crashed with a non-helpful error
    message. Now a meaningful message is shown and the function returns
    NULL.
  • The function did not flag a problem but just crashed for non-numeric
    input; changed.
  • The function is now a little bit less forgiving if tc was not set.

RLum.Data.Image-class

  • Add S4-methods to coerce from and to list and array

plot_AbanicoPlot()

  • Documentation for the parameter y.axis clarified along with a new
    list of supported ... parameters.
  • Add supported for graphics::par() yaxt parameter to suppress the
    y-axis using yaxt == "n". Please note that in a such a case a
    newly added axis via axis(2) needs to be adjusted otherwise the
    scale is not correct.

plot_Histogramm()

  • If the input is of RLum.Results-class always the first element
    will be plotted. The function will not search anymore for an element
    'data'

plot_RLum.Data.Image()

  • Various minor improvements to better support image data plotting +
    update documentation

plot_RLum.Data.Spectrum()

  • Plot type "image" added based on graphics::image() added.

report_RLum()

  • Due to changes in R, the full report was not always visible or
    complete; fixed.
  • Now supports report distribution plotting for calc_AverageDose()
    model.

verify_SingleGrainData()

  • The function stops flooding the terminal with the same warning over
    and over again if run over a list.

Internals

  • mclust added as new package dependency to support the new Bayesian
    models
  • tiff added as new suggested package to support the new function
    read_TIFF2R()
  • report_RLum() was a little bit too aggressive when trying to close
    connections on exit (CRAN email from 2021-05-11)

v0.9.11 (CRAN)

30 Apr 09:49
Compare
Choose a tag to compare

Changes in version 0.9.11 (2021-04-29)

This package version requires R (>= 3.6.0).

New functions

  • convert_SG2MG() Convert single-grain data to multiple-grain data
    by adding curve signals from one disc. Works only for files created
    by Risø TL/OSL readers.

  • calc_gSGC_feldspar() Function to support the calculation of the
    equivalent dose using the global standardised growth curve (gSGC)
    for feldspar proposed by Li et al. (2015)

Bugfixes and changes

analyse_SAR.CWOSL()

  • The function, applied to a list of RLum.Analysis objects, crashed
    with a merge error under very particular circumstances after
    throwing a fitting error; fixed (reported by Brice Lebrun).

fit_LMCurve()

  • The function additionally returns a component_matrix (if the
    fitting was successful). The matrix contains xy-values obtained from
    the fitting with the resolution of the input data.

plot_GrowthCurve()

  • The quality index for the comparison of the De and
    the De estimated from the Monte-Carlo yielded > 100%
    if mode = 'extrapolation'; spooky and fixed.
  • The function caused a crash in analyse_SAR.CWOSL() for very small
    De error values and returned a user unfriendly error
    message (Error in temp.GC[, 2]/temp.GC[, 1]). This was caused by
    an unintentional type conversion to a character for very small
    values (#103, thanks to @IMHarly for spotting).
  • Add support for the Lambert W dose-response curve fitting as
    suggested by Pagonis et al. (2020) (thanks to @vpagonis for
    developing the math)
  • Minor tweaks to improve the graphical output and avoid various
    errors

read_BIN2R()

  • Only for BIN/BINX-file version 3 and 4: if the numbers of runs
    exceeded 128, the number became negative; fixed.

Internals

  • 'lamW' added as new package dependency. This is needed to support
    the Lambert W function as in the function plot_GrowthCurve()

v0.9.10 (CRAN)

05 Mar 23:21
Compare
Choose a tag to compare

Changes in version 0.9.10 (2020-12-10)

Bugfixes and changes

analyse_SAR.CWOSLOSL()

  • The recent changes in 0.9.9 improving the self-call had unwanted
    side effects if the input parameters were itself objects. For
    example: signal.integral.min = setting led to a
    missing parameter error; fixed (thanks to Thomas Kolb for
    reporting).

  • Note: While investigating the previous bug, it turned out that
    some users provide rejection criteria as unnamed list, albeit the
    manual says that is has to be a named list.

calc_FuchsLang2001()

  • The function caused a fatal error on the CRAN R-devel resources
    after recent changes in R and did not work anymore on R-devel. This
    is fixed now and has no user visible effects.
  • Minor code polish and better test coverage.

v0.9.9

29 Nov 11:12
Compare
Choose a tag to compare

Changes in version 0.9.9 (2020-11-29)

New functions

  • calc_OSLLxTxDecomposed() Calculate Lx/Tx ratio for decomposed
    CW-OSL signal components by Dirk Mittelstrass

Bugfixes and changes

analyse_SAR.CWOSLOSL()

  • The default value for rejection.criteria is now list() instead
    of NULL. As before, the default value means that internally set
    rejection criteria are applied and hence this change should not
    affect the behaviour of the function, but it allowed us to greatly
    simplify the underlying code.
  • The function did not check correctly for all record types, under
    particular circumstances, some of the non-support curves could slip
    through; corrected.
  • If the input records were not of type OSL, IRSL or POSL the
    function was supposed to return NULL but crashed instead; fixed.
  • As implemented by calc_OSLLxTxRatio() the function now supports
    NA values for the integrals. If set, sum curves are taken for the
    calculation. This option enables a bunch of new possibilities to
    test more experimental protocols without modifying the function.
  • Following the NA support, all integral arguments are now preset to
    NA. To avoid user errors, a warning is thrown each time the
    function runs with integral limits set to NA.
  • The identification of the allowed curves was further improved to
    cover cases where users may want to provide experimental OSL curves.
    Allowed are combinations where OSL is combined with additional
    letters [a-zA-Z]. Everything else is, as before, ignored.
  • The function now supports the input from the upcoming R package
    'OSLdecomposition' by Dirk Mittelstrass and hence gained a new
    argument called OSL.component.
  • In particular circumstances, when no TL-curves were detected as
    preheat, the function crashed; fixed (flagged by Dirk Mittelstrass).

calc_OSLLxTxRatio()

  • The function now supports NA as input for the signal.integral
    and/or background.integral. If set to NA the sum of the count
    values is used. This is useful if the users wants to process
    component data that were already extracted and do not need integral
    limits.
  • The output of the function is not anymore invisible. This should
    have no further effect.

plot_GrowthCurve()

  • Users sometimes complained about large uncertainties produced by the
    Monte-Carlo runs to estimate the error on the De,
    which returns the standard deviation of the MC runs. Large standard
    deviations are a result of large individual uncertainties (e.g.,
    noisy data) provided as input. The function now returns,
    experimentally, estimates of the highest probability density
    intervals as an alternative. Beyond we may recall that the results
    of the MC runs are always returned as a separate object by the
    function. Means, users ca run any statistic of choice to best
    estimate the uncertainties on the De.

read_Daybreak()

  • The function threw a lot of warnings for the *.DAT after
    R >= 4.0.0 started to be more strict about embedded null bytes
    within a character. The code was updated to a newer version and no
    further warnings are shown.
  • Under particular circumstances the function left open connections
    behind; fixed.

Internals

  • The automated tests now use consistently testthat >= 3.0.0.
    Naturally this has no user visible effect, however, we found a
    couple of minor bugs while updating the tests.

v0.9.8

16 Nov 13:46
Compare
Choose a tag to compare

Changes in version 0.9.8 (2020-11-16)

Important user affecting changes

New functions

  • read_RF2R() Add support for importing spatially resolved RF
    measurement results.

  • plot_ROI() Visualisation of ROI data imported by read_RF2R().

  • convert_Concentration2DoseRate() by Svenja Riedesel and Martin
    Autzen. This function converts radionuclide concentrations (K in %,
    Th and U in ppm) into dose rates (Gy/ka). Beta dose rates are also
    attenuated for the grain size. Beta and gamma dose rates are
    corrected for the water content.

  • calc_CobbleDoseRate() by Svenja Riedesel and Martin Autzen. The
    function calculates the dose rate profile through the cobble based
    on Riedesel and Autzen (2020).

Datasets

  • ExampleData.CobbleDate new example dataset to be used in
    conjunction with the function calc_CobbleDoseRate(). Contributed
    by Svenja Riedesel and Martin Autzen.

  • BaseDateSet.Conversion, Cresswelletal2019 was changed to
    Cresswelletal2018. The corresponding function scale_GammaDose()
    was updated.

  • BaseDateSet.GrainSizeAttenuation.rda: Grain size correction data
    for beta-dose rates published by Guérin et al. (2012). Dataset
    contributed by Svenja Riedesel and Martin Autzen.

Bugfixes and changes

analyse_SAR.CWOSLOSL()

  • The function gained a new argument plot_onePage. If set to TRUE,
    the plot output is gathered in one single plot window instead of
    three.
  • If the user decided for odd reasons to mix preheat steps recorded as
    TL (signal recorded) and simple preheat (no signal recorded) the
    function stopped with an uncontrolled error. Now the function is
    more flexible. However, this comes at a cost, e.g., if the user
    accidentally swaps the sequence order (such as OSL-TL, instead of
    TL-OSL) this may remain unnoticed.
  • For zero count data (e.g., observed in single grain curves), the
    function crashed with a non-indicative error message because NaN
    are usually produced if the recycling ratio is calculated; fixed
    (thanks to Brice Lebrun for reporting the issue).

analyse_FadingMeasurements()

  • Typo correction in the manual and a better documentation of
    supported ... arguments
  • The ylim argument can now be used to control the 'signal fading'
    plot output.
  • While the x-axis of the fading curve output was correct, it probably
    caused too much confusion, and now the values are shown with
    superscripts, e.g., 10^0, 10^1 etc. If the number of data points
    is too small, the function will fall back to the old representation.
  • The function did not work properly for less than five data points
    and stopped with
    Error in rep(rgb(0, 0, 0, 0.3), length(TIMESINCEIRR) - 5) (thanks
    to Annette Kadereit for flagging this issue)
  • The function now shows also the normalised log-values under the
    time-scale (#97)
  • As it turned out, t_star did not work if the input was produced by
    read_BIN2R(); fixed along with (#97)
  • t_star now can be a function, e.g., function(x) x+100, which
    would add a constant value to all TIMESINCEIRR values (#97).

analyse_IRSAR.RF()

  • The function learned to recognise input from read_RF2R and changes
    the header labelling accordingly.
  • An edge case crash that might occur in combination with the vertical
    sliding has be sanitized.
  • The text progress bar was not closed correctly, this could lead to
    artefacts in the terminal output; fixed.
  • The internal C++ function used for the curve sliding now uses
    Armadillo vectors via RcppArmadillo. Depending on the platform
    this gives a performance plus free house by at least 50%. However,
    it comes at the cost of a reduced maximum vertical sliding range of
    1e+07 (before 1e+08).

plot_RLum.Data.Curve()

  • The argument norm now supports the options "max" for a
    normalisation to the highest point (the default), "min" for a
    normalisation to the lowest point and huot for a normalisation
    suggested by Sébastien Huot (#87) via GitHub

plot_RLum.Analysis()

  • The argument norm now supports the options "max" for a
    normalisation to the highest point (the default), "min" for a
    normalisation to the lowest point and huot for a normalisation
    suggested by Sébastien Huot (#87) via GitHub. Please note that
    norm only works if combine = TRUE.

report_RLum()

  • Function complained about missing header; fixed.
  • Function threw warnings Duplicate identifier 'root'; fixed.

read_SPE2R()

  • The function threw a warning about truncated strings; the warning
    was not relevant and is no suppressed.

verify_SingleGrainData()

  • The function did not always return a plot: Fixed.

Internals

  • Risoe.BINfileData-class objects got a as.data.frame() S3-method
    to allow a direct conversion into a single data.frames. Count values
    are added in columns for each record (thanks to Annette Kadereit for
    the idea).

  • structure_RLum() for RLum.Analysis-class recycled rows in the
    output data.frame if objects had more than one parent id (.pid).
    This led to odd behaviour if functions expected (correctly) that the
    number of entries in the data.frame returned by
    structure_RLum(), cannot not have more rows than number of records
    in the object. This could happen, e.g., after merging
    RLum.Data.Curve-class objects. ow multiple .pid entries still
    create only one string and the number of rows matches the number of
    records in the object.

v0.9.7

06 Jan 10:08
Compare
Choose a tag to compare

Changes in version 0.9.7 (2020-01-04)

Bugfixes and changes

analyse_Al2O3C_Measurements()

  • Supplementary argument main never worked; fixed.
  • New supplementary argument title which allows to pass further
    names of a sample to the plot output.

plot_AbanicoPlot()

  • The plot now can handle negative values, fixed in combination with
    #88 (reported by Sébastien Huot)

plot_RadialPlot()

  • Fix display problem when log.z = FALSE combined with negative
    values (#88, reported by Sébastien Huot)

read_BIN2R()

  • Due to a typo, some bytes were read in the wrong order (big-endian
    instead of little-endian). While the fix does not affect the
    behaviour of the function, the non-fixed function would have soon
    crashed on CRAN servers. A big thanks to Tomas Kalibera from the
    CRAN team for his support and for pointing out this issue.

internal_as.latex.table()

  • The function gained a new argument rm.zero which is preset to
    TRUE. If set, all columns containing zero values only are removed.
    The new argument enables a better fine tuning of the latex output.

v0.9.6

04 Dec 16:21
Compare
Choose a tag to compare

Changes in version 0.9.6 (2019-12-05)

Bugfixes and changes

analyse_SAR_CWOSL()

  • Setting the argument plot.single = TRUE does not any longer
    interferes with the global par settings for the rejection criteria
    plot.

fit_OSLLifeTimes()

  • The function gained a new argument plot_simple to produce plots
    without residuals that can be combined using standard R layout plot
    functionality, e.g., par(mfrow = c(2,1)).
  • Function now handles the log = "x", log = "y" and log = "xy"
    options better.
  • In the self-call mode (input is RLum.Analysis-class object), all
    ... objects are supported as list and get recycled if the list
    does not equal the number of objects

plot_GrowthCurve()

  • The y-axis labelling of the test-dose response plot finally shows
    what was done since the beginning: the Tx values are normalised by
    the Tn values, i.e. Tn/Tx and not Tn/Tx. Thanks to Andrea Junge for
    spotting this flaw.

read_XSYG2R()

  • The function now supports the temperature recalculation of TL curves
    even they consist of only a single point value.

Internals

  • Changes in the development version of R caused error messages on
    CRAN and would have stopped the package from function properly in
    the future. This was corrected; the changes do not have any
    user-visible effect.
  • The internal function for the DRAC output .as.latex.table() gained
    a new argument tabular_only which gives a little bit more
    flexibility at hand of the output the DRAC is combined with LaTeX.