Skip to content

Releases: R-Lum/Luminescence

v0.9.26 (CRAN)

18 Nov 13:30
v0.9.26
be1521a
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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.

v0.9.21 (CRAN)

03 Feb 12:20
197b028
Compare
Choose a tag to compare

Changes in version 0.9.21 (2023-02-03)

This package version requires R >= 4.1

Bugfixes and changes

analyse_portableOSL()

  • The function can now handle a list of RLum.Analysis-class objects
    and automatically process them in a conventional way. Potential
    breaking change warning
    : the $summary data frame gained an
    additional column, SAMPLE. If you access columns index-based, you
    have to double-check your code. The manual was updated accordingly.
  • A new ... argument sample was added to allow adding information on
    the sample for the plot
  • The function did not like sequences with only one pair of OSL/IRSL and
    returned an error; fixed.

convert_PSL2CSV()

  • Add new argument single_table to enable the export of PSL data into
    a single spreadsheet table (CSV file), each curve is represented by
    two columns
  • Add new argument extract_raw_data, which allows extracting the raw
    data convienently. Those data are already imported by read_PSL2R()
    but they remain somewhat hidden in the @info slots of each
    RLum.Data.Curve object.

fit_LMCurve()

  • If the argument fit.calcError was set to TRUE and the parameter
    confidence interval calculation failed, the function stopped with an
    uncontrolled error. Now it shows a meaningful warning instead.

plot_RadialPlot()

  • Fix a few visual problems if the dataset has negative values (thanks
    to Alice Versendaal for reporting)

read_BIN2R()

  • Function crashed under edge conditions while testing concise records
    returning a subscript out-of-bounds error; fixed.
  • The function struggled to read files from downloads (URL instead of a
    local file path) correctly on Windows machines; fixed.

write_RLum2CSV()

  • The function now accepts data.frame objects as input. This has no
    particular advantage over the base R functions, such as write.csv()
    but is used internally in combination with other functions.

Internals

  • Fix outdated URL in github.R

v0.9.20 (CRAN)

14 Jul 14:06
0de842f
Compare
Choose a tag to compare

Changes in version 0.9.20 (2022-07-14)

This package version requires R >= 4.1

Bugfixes and changes

analyse_Al2O3C_Measurement()

  • Add support for sequences without TL curves in the sequence;
    however, the function still expects three OSL curves for natural,
    regenerated, and background signal.

merge_RLum.Data.Curve()

  • The function works better if curves of different lengths are
    merged, but it still throws an error if the resolution is not
    similar.

plot_RLum.Data.Curve()

  • Add support for ... arguments las and axes

plot_RLum.Data.Spectrum()

  • The plot.types = "single" and plot.type = "multiple.lines" had
    two long-standing issues with the colour rug (both are fixed):

    • The colour rug showed ugly overplotting,
    • the colour rug had a resolution that depended on the x-axis
      (wavelength) scaling.
  • plot.types = "single" and plot.type = "multiple.lines" now
    support a ... parameter box for removing the outer plot frame.
    The argument was named box to avoid a confusion with the term
    frames used for image stacks.

  • plot.types = "single" and plot.type = "multiple.lines" now
    support a ... parameter frames for picking the frames to be
    visualised beyond the axis limitation.

plot_DRCSummary()

  • The function did not know how to hand the output, if the fit was
    LambertW; added.
  • The function now roughly checks whether all curves have used the
    same equation for the fitting, if not it throws an error.
  • The ... arguments allowed to modify the plot are now mentioned in
    the documentation.
  • The ... are better recycled to avoid a function crash in case the
    user did not provide the arguments in the required length.

plot_GrowthCurve()

  • The formula returned in the output if fit.method = "LambertW" was
    not correct; fixed. The fit and the fitting were not affected;
    though.

read_BIN2R()

  • The example in the documentation was a little bit too generic and is
    now replaced by an example that works.

write_R2BIN()

  • The running example was not working because it used outdated example
    data. The example was replaced by a working example using an actual
    BINX-file. (thanks @JohannesFriedrich for reporting, #110)
  • The terminal output of the function could not be silenced. Now the
    output (except for the progress bar, which can be switched off) is a
    message(), allowing to disable the terminal output.

Internals

  • Add new internal function .add_fancy_log_axis() to provide a more
    sophisticated log-axis to plots if needed with minor ticks and
    proper labelling.
  • Fix wrong usage of class() where needed

v0.9.19 (CRAN)

10 Mar 21:33
Compare
Choose a tag to compare

Changes in version 0.9.19 (2022-03-10)

This package version requires R >= 4.0.5

New functions

  • extract_ROI(): Light-weighted function to extract pixel values
    from pre-defined regions-of-interest (ROI) from
    RLum.Data.Image-class, array or matrix objects and provide
    simple image processing capacity. While the function comes with a
    simple control plot output, the results can be passed also to
    plot_ROI()

  • write_R2TIFF(): Export RLum.Data.Image and RLum.Data.Spectrum
    objects or a list of such to TIFF Images. A convenient wrapper
    around the function tiff::writeTIFF()

Bugfixes and changes

merge_RLum.Results()

  • If elements of type matrix, data.frame or vector were merged,
    usually attributes, additional to the standard attributes (e.g.,
    class for data.frame) were lost during the merging. Now, such
    attributes are preserved so far they are not of a similar name as
    the standard object of the object element (e.g., dim for matrix
    or class for data.frame). This small addition allows to merge
    more complex objects and retain all attributes for further
    processing.

plot_DRTResults()

  • The plot messed with the par() settings, which was problematic if,
    for instance, a second x-axis was wanted; fixed.
  • The function examples were not anymore up-to-date; fixed.

plot_RLum.Data.Image()

  • Minor correction of the colour legend, which did always show the
    highest value
  • New ... argument zlim_image to maintain a consistent z-scale
    over a series of images.
  • The colour stretching could fail for lin and a lot of zero values;
    fixed.

plot_RLum.Data.Spectrum()

  • Fixed a bug that let plot_RLum.Data.Spectrum() crash under very
    particular circumstances due to a wrong conditional statement.
  • If the count limits are oddly chosen, i.e. limit_counts is smaller
    than the actual number of counts on the z-scale, the function does
    not crash anymore but replaces the value with the lowest possible
    value.
  • The argument box for the plot persp now accepts alternate for
    the customized plot without the box usually drawn around the plot.
  • The function now returns the adjusted matrix used for the plotting
    regardless of whether the argument plot is set to TRUE or
    FALSE.
  • If the plot type is persp, the default, the “viewing
    transformation matrix” is returned as an attribute pmat. This can
    be further used in conjunction with the function graphics::trans3d
    to add additional information to the graphic.

plot_FilterCombinations()

  • The function returned a wrongly calculated optical density, using
    log() instead of log10; fixed.= Note: The shiny filter app was
    not immediately affected because the values here were taken from a
    spreadsheet.
  • The output object is now invisible since the function’s main purpose
    is to plot a graphic and not return an object.

plot_ROI()

  • Add support for the new function extract_ROI()
  • Add new argument bg_image to support background image plotting
  • The numerical output is now consistently invisble as it is for all
    plot functions in the package

v0.9.18 (CRAN)

17 Jan 19:25
Compare
Choose a tag to compare

Changes in version 0.9.18 (2022-01-17)

This package version requires R >= 4.0.5

Breaking changes

Changes in RLum.Data.Image and removal of import 'raster'

The S4 class RLum.Data.Image was heavily revised to strip
'Luminescence' of the dependency to the package 'raster' and replace
the functionality with base R functions and objects. The 'raster'
package came in at an early stage of 'Luminescence' to handle image
data. However, most of its massive feature set was never used, but
'raster' caused a lot of trouble to many users and in our automated
tests because of its own dependencies. Soon, 'raster' will be retired
and replaced by an even more powerful package called 'terra'. This was
our cue to make some serious changes instead of carrying forward this
unfortunate implementation in 'Luminescence'.

  • Within the RLum.Data.Image-class image data are now stored in an
    array instead of a RasterBrick object.
  • The function plot_RLum.Data.Image() does not know any more about a
    plot type plotRGB. However, the standard raster plot was even
    improved. Please watch out, however, for changed arguments.
  • The image format import functions read_SPE2R() and read_TIFF2R()
    were modified to support the new class design.
  • The corresponding example dataset was updated.

Removal of app_RLum()

This function was essentially a wrapper around RLumShiny::app_RLum()
written to promote 'RLumShiny'; a package providing a graphical user
interface to 'Luminescence'. 'Luminescence' is essential for
'RLumShiny'. However, this two-way dependency caused unwanted trouble
once the package 'raster' was removed. By removing app_RLum()
'Luminescence' comes lighter because it has fewer dependencies this
unfortunate reverse dependency can be avoided. RLumShiny::app_RLum()
will still work as before, but it cannot be called anymore out of
'Luminescence'. In summary, except for one function less, not much has
changed since both packages need to be installed to run the shiny
applications.

Bugfixes and changes

convert_Activity2Concentration()

  • The function had had-coded conversion factors, now the factors are
    calculated, making it easier to include new data, such as updated
    half-life values.
  • The documentation is extended and should now be read more clear.

use_DRAC()

  • The function now supports up to 5000 datasets, instead of before 33.
    The function template_DRAC() was revised accordingly.

v0.9.17 (CRAN)

01 Jan 16:28
Compare
Choose a tag to compare

Changes in version 0.9.17 (2022-01-01)

This package version requires R >= 4.0.5

Bugfixes and changes

calc_MinDose()/calc_MaxDose()

  • The error message if no likelihood profiling can be done now reads
    more clear.

fit_EmissionSpectra()

  • method_control = list() gained a new sub-argument norm to
    enable/disable the normalisation of the data. The default is TRUE.

plot_AbanicoPlot()

  • The keyword internally set for the font decoration 'plain' was not
    used in get_Layout(), where 'normal' was expected causing the
    function to crash in R-devel if the argument legend was used;
    fixed (#108).

plot_RadioPlot()

  • An additional line, e.g., plot_RadialPlot(...,line = 1) was not
    always drawn where the user expected it to be seen; fixed (#106,
    reported by Li Bo)
  • The radial z-scale did not always extend to the limits of the data,
    even if limits for the z-scale were set, leading to an odd graphical
    offset and unsuitable plots; fixed (reported by Christina Neudorf)
  • The plot now always draws the lower limit of the z-scale.

plot_RLum.Analysis()

  • The parameter records_max removed more curves than required;
    fixed.

plot_RLum.Data.Spectrum()

  • The function gained a new argument plot that can disable the plot
    and return the matrix used for the plotting instead. This may sound
    a little bit awkward, but it adds enormous flexibility. The function
    does a lot of internal transformations, such as binning or colour
    calculations, which could not be used in other functions before. Now
    the function can be ‘misused’ to create an output object ready to be
    passed to other packages and functions, such as the package
    'plot3D'.