-
Notifications
You must be signed in to change notification settings - Fork 7
/
NEWS.Rmd
200 lines (172 loc) · 11.2 KB
/
NEWS.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
---
output: github_document
header-includes:
- \usepackage{amsmath}
- \usepackage{amssymb}
---
<!-- NEWS.md was auto-generated by NEWS.Rmd. Please DO NOT edit by hand!-->
# Changes in version `r RLumBuild::.get_pkg_version()` (`r Sys.Date()`)
## New functions
* `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` from the objects that can be
used for instance in combination with `'ggplot2'`. Works only on `RLum.Data.Curve-class`
and `RLum.Analysis-class` objects and lists of such objects.
## 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()`.
## Removed functions and deprecations
* Function `Analyse_SAR.OSLdata()` is now officially deprecated,
`analyse_SAR.CWOSL()` should be used instead (#216, fixed in #264).
* 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_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.
### `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).
### `analyse_IRSAR.RF()`
* 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).
### `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 other contain the OSL/IRSL
data from the grain. Because 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).
### `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 `NA`s) 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_Lamothe2003()`
* We addressed a long-standing issue regarding the calculation of the `Ln/Tn`
error after fading correction, which led to smaller than expected errors
(#96, fixed in #296).
### `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) and the object contained 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) and the wiggling around that was causing the lousy subsetting was removed.
### `plot_GrowthCurve()`
* The function is now implemented as a wrapper around `fit_DoseResponseCurve()`
and `plot_DoseResponseCurve()`. There should be no visible user-facing
changes (#319, fixed in #322).
* Support new `...` arguments for plotting (implementation in `plot_DoseResponseCurve()`) for
`legend` (turn on/off legend) and `reg_points_pch` for fine grained control over the point shape.
* Add `density_polygon`, `density_pologyon_col` and `density_rug` as `...` arguments to plot and
add respective plot options
* The function crashed contained for single grain data that sometimes cause a lot of `NaN` values
during log conversions required for estimating the start parameters. The result was the error `object 'b.MC' not found`
(#374; fixed)
* If `fit.method = "EXP+LIN"`, the function got sometimes stuck in an endless
loop in cases where the number of parameters was larger or equal the number of
data points. To avoid this, we replaced `nls()` `minpack.lm::nlsLM()`.
Please keep in mind that it does not mean that the fit results make any sense, it just helps to avoid uncontained events
in the R session (addresses #381).
### `plot_RLum.Data.Curve()`
* Argument `norm` is now better validated so that specifying an incorrect
value returns an error instead of silently skipping curve normalisation (#250,
fixed in #263).
### `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`
* The gradient between colours when `plot.type = "persp"` is now more
consistent and doesn't produce artefacts in the regions of transition
between colours (#371, fixed in #380).
### `read_BIN2R()`
* The function is now much faster: we have recorded an overall improvement
of over 60% on a 46M file, with potentially bigger time savings for larger
files (#298, fixed in #333, #355 and #360).
* Argument `n.records` is now better supported for BIN files v3 and v4 and
doesn't lead to a crash when used in conjunction with the `fastForward`
option (#343, fixed in #344).
* Argument `zero_data.rm` was not correctly propagated if the input object
was provided as a list (#342, fixed in #345).
* The `METADATA` fields that are not actually read from the BINX file in
case of a ROI record are now set to `NA` rather than being assigned the
value from the previous record (#336, fixed in #360).
* The `.RESERVED` slot is now kept in sync with the rest of the object
when records are dropped from the input BIN/BINX file (#337, fixed in #348).
* The function doesn't crash anymore when reading a file that contains a
record with an unrecognised version after other records with a valid version
have been read (#352, fixed in #353).
* The function doesn't crash anymore when reading a file that contains a
ROI record while using `fastForward = TRUE` (#356, fixed in #360).
### `read_XSYG2R()`
* The new `n_records` argument now enables to control the number of records
to import, which can be useful in case the file is faulty.
* The function sometimes struggled with the import if only a directory was provided; fixed.
* The function truncated the terminal output under certain circumstances; fixed.
### `template_DRAC()`
* The function gained a new argument `file_input` that enables the creating of a DRAC template
based on an existing DRAC CSV file. This way, already available DRAC files
can be conveniently modified without having to call `use_DRAC()` first.
* The template contained a couple of minor mistakes that got fixed along with a
more strict enforcement of the class of each field, which is now set as an attribute;
the change should have no user-visible effect.
* The function now supports the conversion factors by Cresswell et al. (2018)
(`Cresswelletal2018`).
Please ensure that the server supports that option.
### `use_DRAC()`
* Support for DRAC v1.1 XLS/XLSX files has been dropped, users should use
CSV files according to the DRAC v1.2 CSV template.
* The function gained support for three new `...` arguments: `version_ignore` to ignore the
DRAC version check, `user` and `password` to access password protected websites.
### `verify_SingleGrainData()`
* **Potentially breaking old code!**: if `cleanup = TRUE` the result was not consistent
and produced a mixture of `RLum.Results-class` and `RLum.Analysis-class`/`Risoe.BINFileData-class` objects in
particular when run over a list, this was not expected from what is written in the manual. Now the function
indeed cleans up the object, hence if a list of `RLum.Analysis` objects is provided, the result is a cleaned list
of that object. If the clean-up means that the everything was removed, the result is `NULL`.
* Improve warning messages; it was indeed not very intelligible.
* The function doesn't crash anymore when applied to an empty list (#365,
fixed in #366).
* Silence the very talkative terminal output even if nothing was removed
from a record for `cleanup = TRUE`.
* The function now provides better terminal feedback if the selection results
in an empty record.
### `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.
* Any open connection is now correctly closed if the function crashes.
## Internals
* Two new internal functions `.throw_warning()` and `.throw_error()`, added
in v0.9.25, in particular circumstances flushed very long traceback messages
to the terminal instead of reporting the name of the calling function. Now we
maintain an internal 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).
* `get_DRAC_references()` now works also on a `DRAC.list` got updated references.