/
Luminescence-package.R
1319 lines (1281 loc) · 38.3 KB
/
Luminescence-package.R
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#' @title Comprehensive Luminescence Dating Data Analysis\cr
#'
#'
#' \if{html}{
#' \figure{Luminescence_logo.png}{options: width="75" alt="r-luminescence.org"}
#' }
#'
#' @description A collection of various R functions for the purpose of luminescence dating
#' data analysis. This includes, amongst others, data import, export,
#' application of age models, curve deconvolution, sequence analysis and
#' plotting of equivalent dose distributions.
#'
#' @name Luminescence-package
#'
#' @aliases Luminescence-package Luminescence
#'
#' @docType package
#'
#' @details
#'
#' **Supervisor of the initial version in 2012**
#'
#' Markus Fuchs, Justus-Liebig-University Giessen, Germany
#'
#' **Support contact**
#'
#' - \email{developers@@r-luminescence.org}
#' - [https://github.com/R-Lum/Luminescence/discussions]()
#'
#' **Bug reporting**
#'
#' - \email{developers@@r-luminescence.org} or
#' - [https://github.com/R-Lum/Luminescence/issues]()
#'
#' **Project website**
#'
#' - [https://r-luminescence.org]()
#'
#' **Project source code repository**
#'
#' - [https://github.com/R-Lum/Luminescence]()
#'
#' **Related package projects**
#'
#' - [https://cran.r-project.org/package=RLumShiny]()
#' - [https://cran.r-project.org/package=RLumModel]()
#' - [https://cran.r-project.org/package=RLumCarlo]()
#'
#' **Package maintainer**
#'
#' Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany),\cr
#' \email{sebastian.kreutzer@@aber.ac.uk}
#'
#' **Funding**
#'
#' 2011-2013: The initial version of the package was developed, while Sebastian Kreutzer
#' was funded through the DFG programme "Rekonstruktion der Umweltbedingungen
#' des Spätpleistozäns in Mittelsachsen anhand von Löss-Paläobodensequenzen"
#' (DFG id: 46526743)
#'
#' 2014-2018: Cooperation and personal exchange between the developers is gratefully
#' funded by the DFG (SCHM 3051/3-1) in the framework of the program
#' "Scientific Networks". Project title: "RLum.Network: Ein
#' Wissenschaftsnetzwerk zur Analyse von Lumineszenzdaten mit R" (2014-2018)
#'
#' 05/2014-12/2019: The work of Sebastian Kreutzer as maintainer of the package was supported
#' by LabEx LaScArBx (ANR - n. ANR-10-LABX-52).
#'
#' 01/2020-04/2022: Sebastian Kreutzer as maintainer of the package has received funding
#' from the European Union’s Horizon 2020 research and innovation programme under
#' the Marie Skłodowska-Curie grant agreement No 844457 (CREDit), and could continue
#' maintaining the package.
#'
#' @references
#' Dietze, M., Kreutzer, S., Fuchs, M.C., Burow, C., Fischer, M.,
#' Schmidt, C., 2013. A practical guide to the R package Luminescence.
#' Ancient TL, 31 (1), 11-18.
#'
#' Dietze, M., Kreutzer, S., Burow, C., Fuchs, M.C., Fischer, M., Schmidt, C., 2016. The abanico plot:
#' visualising chronometric data with individual standard errors. Quaternary Geochronology 31, 1-7.
#' https://doi.org/10.1016/j.quageo.2015.09.003
#'
#' Fuchs, M.C., Kreutzer, S., Burow, C., Dietze, M., Fischer, M., Schmidt, C.,
#' Fuchs, M., 2015. Data processing in luminescence dating analysis: An
#' exemplary workflow using the R package 'Luminescence'. Quaternary
#' International, 362,8-13. https://doi.org/10.1016/j.quaint.2014.06.034
#'
#' Kreutzer, S., Schmidt, C., Fuchs, M.C., Dietze, M., Fischer, M., Fuchs, M.,
#' 2012. Introducing an R package for luminescence dating analysis. Ancient TL,
#' 30 (1), 1-8.
#'
#' Mercier, N., Kreutzer, S., Christophe, C., Guérin, G., Guibert, P., Lahaye, C., Lanos, P., Philippe, A.,
#' Tribolo, C., 2016. Bayesian statistics in luminescence dating: The 'baSAR'-model and its
#' implementation in the R package ’Luminescence’. Ancient TL 34 (2), 14-21.
#'
#' Mercier, N., Galharret, J.-M., Tribolo, C., Kreutzer, S., Philippe, A., 2022.
#' Luminescence age calculation through Bayesian convolution of equivalent dose
#' and dose-rate distributions: the De_Dr model.
#' Geochronology 4, 297–310. https://doi.org/10.5194/gchron-4-297-2022
#'
#' Smedley, R.K., 2015. A new R function for the Internal External Uncertainty (IEU) model.
#' Ancient TL, 33 (1), 16-21.
#'
#' King, E.G., Burow, C., Roberts, H., Pearce, N.J.G., 2018. Age determination
#' using feldspar: evaluating fading-correction model performance. Radiation Measurements 119, 58-73.
#' https://doi.org/10.1016/j.radmeas.2018.07.013
#'
#' @keywords package
#'
#' @import utils methods data.table
#'
#' @importFrom Rcpp evalCpp
#'
#' @importFrom graphics plot plot.default frame abline mtext text lines par layout lines arrows axTicks axis barplot box boxplot contour curve grconvertX grconvertY hist legend persp points polygon rug segments title grid close.screen screen split.screen
#' @importFrom grDevices adjustcolor axisTicks colorRampPalette gray.colors rgb topo.colors xy.coords dev.off
#' @importFrom stats formula approx as.formula complete.cases density dnorm glm lm median na.exclude na.omit nls nls.control pchisq pnorm quantile rnorm runif sd smooth smooth.spline spline t.test uniroot var weighted.mean setNames coef confint predict update residuals fitted qf
#' @importFrom parallel parLapply makeCluster stopCluster
#' @importFrom httr GET accept_json status_code content
#'
#' @useDynLib Luminescence, .registration = TRUE
#'
#' @md
NULL
#' Base data set of dose-rate conversion factors
#'
#' Collection of published dose-rate conversion factors to convert concentrations
#' of radioactive isotopes to dose rate values.
#'
#' @format
#'
#' A [`list`] with three elements with dose-rate conversion factors
#' sorted by article and radiation type (alpha, beta, gamma):
#'
#' \tabular{ll}{
#'
#' `AdamiecAitken1998`: \tab
#' Conversion factors from Tables 5 and 6 \cr
#'
#' `Cresswelletal2018`: \tab
#' Conversion factors from Tables 5 and 6 \cr
#'
#' `Guerinetal2011`: \tab
#' Conversion factors from Tables 1, 2 and 3 \cr
#'
#' `Liritzisetal2013`: \tab
#' Conversion factors from Tables 1, 2 and 3 \cr
#' }
#'
#' @section Version: 0.2.0
#'
#' @references
#'
#' Adamiec, G., Aitken, M.J., 1998. Dose-rate conversion factors: update.
#' Ancient TL 16, 37-46.
#'
#' Cresswell., A.J., Carter, J., Sanderson, D.C.W., 2018.
#' Dose rate conversion parameters: Assessment of nuclear data.
#' Radiation Measurements 120, 195-201.
#'
#' Guerin, G., Mercier, N., Adamiec, G., 2011. Dose-rate conversion
#' factors: update. Ancient TL, 29, 5-8.
#'
#' Liritzis, I., Stamoulis, K., Papachristodoulou, C., Ioannides, K., 2013.
#' A re-evaluation of radiation dose-rate conversion factors. Mediterranean
#' Archaeology and Archaeometry 13, 1-15.
#'
#'
#' @source
#' All gamma conversion factors were carefully read from the tables given in the
#' references above.
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## Load data
#' data("BaseDataSet.ConversionFactors", envir = environment())
#'
#' @name BaseDataSet.ConversionFactors
#' @md
NULL
#' @title Base dataset for grain size attenuation data by Guérin et al. (2012)
#'
#' @description Grain size correction data for beta-dose rates
#' published by Guérin et al. (2012).
#'
#'#' @format
#'
#' A [`data.frame`] seven columns and sixteen rows. Column headers
#' are `GrainSize`, `Q_K`, `FS_K`, `Q_Th`, `FS_Th`, `Q_U`, `FS_U`.
#' Grain sizes are quoted in µm (e.g., 20, 40, 60 etc.)
#'
#' @section Version: 0.1.0
#'
#' @source Guérin, G., Mercier, N., Nathan, R., Adamiec, G., Lefrais, Y., 2012.
#' On the use of the infinite matrix assumption and associated concepts:
#' A critical review. Radiation Measurements, 47, 778-785.
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## load data
#' data("BaseDataSet.GrainSizeAttenuation", envir = environment())
#'
#' @name BaseDataSet.GrainSizeAttenuation
#' @md
NULL
#' Base data set of fractional gamma-dose values
#'
#' Collection of (un-)published fractional gamma dose-rate values to scale the
#' gamma-dose rate considering layer-to-layer variations in soil radioactivity.
#'
#' @format
#'
#' A [`list`] with fractional gamma dose-rate values
#' sorted by article:
#'
#' \tabular{ll}{
#'
#' `Aitken1985`: \tab
#' Fractional gamma-dose values from table H.1
#' }
#'
#'
#' @section Version: 0.1
#'
#' @references
#' Aitken, M.J., 1985. Thermoluminescence Dating. Academic Press, London.
#'
#' @source
#' Fractional gamma dose values were carefully read from the tables given in the
#' references above.
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## Load data
#' data("BaseDataSet.FractionalGammaDose", envir = environment())
#'
#' @name BaseDataSet.FractionalGammaDose
#' @md
NULL
#' Example data for scale_GammaDose()
#'
#' An example data set for the function `scale_GammaDose()` containing layer
#' specific information to scale the gamma dose rate considering variations in
#' soil radioactivity.
#'
#' @format
#'
#' A [`data.frame`]. Please see `?scale_GammaDose()` for a detailed description
#' of its structure.
#'
#'
#' @section Version: 0.1
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## Load data
#' data("ExampleData.ScaleGammaDose", envir = environment())
#'
#' @name ExampleData.ScaleGammaDose
#' @md
NULL
#' Example data for calc_CobbleDoseRate()
#'
#' An example data set for the function [calc_CobbleDoseRate] containing layer
#' specific information for the cobble to be used in the function.
#'
#' @format
#'
#' A [`data.frame`]. Please see [calc_CobbleDoseRate] for detailed information
#' on the structure of the [data.frame].
#'
#' @section Version: 0.1.0
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## Load data
#' data("ExampleData.CobbleData", envir = environment())
#'
#' @name ExampleData.CobbleData
#' @md
NULL
#' Base data set for cosmic dose rate calculation
#'
#' Collection of data from various sources needed for cosmic dose rate
#' calculation
#'
#'
#' @format
#'
#' \tabular{ll}{
#'
#' `values.cosmic.Softcomp`: \tab
#' data frame containing cosmic dose rates
#' for shallow depths (< 167 g cm^-2) obtained using the "AGE" program by
#' Rainer Gruen (cf. Gruen 2009). These data essentially reproduce the graph
#' shown in Fig. 1 of Prescott & Hutton (1988). \cr
#'
#' `values.factor.Altitude`: \tab
#' data frame containing altitude factors
#' for adjusting geomagnetic field-change factors. Values were read from Fig. 1
#' in Prescott & Hutton (1994). \cr
#'
#' `values.par.FJH`: \tab
#' data frame containing values for parameters F, J
#' and H (read from Fig. 2 in Prescott & Hutton 1994) used in the expression \cr
#' }
#'
#' \deqn{Dc = D0*(F+J*exp((altitude/1000)/H))}
#'
#' @section Version: 0.1
#'
#' @references
#' Gruen, R., 2009. The "AGE" program for the calculation of luminescence age estimates.
#' Ancient TL, 27, pp. 45-46.
#'
#' Prescott, J.R., Hutton, J.T., 1988. Cosmic ray and gamma ray dosimetry for
#' TL and ESR. Nuclear Tracks and Radiation Measurements, 14, pp. 223-227.
#'
#' Prescott, J.R., Hutton, J.T., 1994. Cosmic ray contributions to dose rates
#' for luminescence and ESR dating: large depths and long-term time variations.
#' Radiation Measurements, 23, pp. 497-500.
#'
#' @source
#' The following data were carefully read from figures in mentioned
#' sources and used for fitting procedures. The derived expressions are used in
#' the function `calc_CosmicDoseRate`.
#'
#' **values.cosmic.Softcomp**
#'
#' \tabular{ll}{
#' Program: \tab "AGE"\cr
#' Reference: \tab Gruen (2009) \cr
#' Fit: \tab Polynomials in the form of
#' }
#'
#' For depths between 40-167 g cm^-2:
#'
#' \deqn{y = 2*10^-6*x^2-0.0008*x+0.2535}
#'
#' (For depths <40 g cm^-2)
#'
#' \deqn{y = -6*10^-8*x^3+2*10^-5*x^2-0.0025*x+0.2969}
#'
#' **`values.factor.Altitude`**
#'
#' \tabular{ll}{
#' Reference: \tab Prescott & Hutton (1994) \cr
#' Page: \tab 499 \cr
#' Figure: \tab 1 \cr
#' Fit: \tab 2-degree polynomial in the form of
#' }
#'
#' \deqn{y = -0.026*x^2 + 0.6628*x + 1.0435}
#'
#'
#' **`values.par.FJH`**
#'
#' \tabular{ll}{
#' Reference: \tab Prescott & Hutton (1994) \cr
#' Page: \tab 500 \cr
#' Figure: \tab 2 \cr
#' Fits: \tab 3-degree polynomials and linear fits
#' }
#'
#' F (non-linear part, \eqn{\lambda} < 36.5 deg.):
#'
#' \deqn{y = -7*10^-7*x^3-8*10^-5*x^2-0.0009*x+0.3988}
#'
#' F (linear part, \eqn{\lambda} > 36.5 deg.):
#'
#' \deqn{y = -0.0001*x + 0.2347}
#'
#' J (non-linear part, \eqn{\lambda} < 34 deg.):
#'
#' \deqn{y = 5*10^-6*x^3-5*10^-5*x^2+0.0026*x+0.5177}
#'
#' J (linear part, \eqn{\lambda} > 34 deg.):
#'
#' \deqn{y = 0.0005*x + 0.7388}
#'
#' H (non-linear part, \eqn{\lambda} < 36 deg.):
#'
#' \deqn{y = -3*10^-6*x^3-5*10^-5*x^2-0.0031*x+4.398}
#'
#' H (linear part, \eqn{\lambda} > 36 deg.):
#'
#' \deqn{y = 0.0002*x + 4.0914}
#'
#' @keywords datasets
#'
#' @examples
#'
#' ##load data
#' data(BaseDataSet.CosmicDoseRate)
#'
#' @name BaseDataSet.CosmicDoseRate
#' @aliases values.cosmic.Softcomp values.factor.Altitude values.par.FJH
#'
#' @md
NULL
#' @title Example data from a SAR OSL and SAR TL measurement for the package
#' Luminescence
#'
#' @description Example data from a SAR OSL and TL measurement for package Luminescence
#' directly extracted from a Risoe BIN-file and provided in an object of type
#' [Risoe.BINfileData-class]
#' @format
#'
#' `CWOSL.SAR.Data`: SAR OSL measurement data
#'
#' `TL.SAR.Data`: SAR TL measurement data
#'
#' Each class object contains two slots: (a) `METADATA` is a [data.frame] with
#' all metadata stored in the BIN file of the measurements and (b) `DATA`
#' contains a list of vectors of the measured data (usually count values).
#'
#' @section Version: 0.1
#'
#' @references
#' **CWOSL.SAR.Data**: unpublished data
#'
#' **TL.SAR.Data**: unpublished data
#'
#' @source **CWOSL.SAR.Data**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Bayreuth \cr
#' Lab-Code: \tab BT607 \cr
#' Location: \tab Saxony/Germany \cr
#' Material: \tab Middle grain quartz measured on aluminium cups on a Risø TL/OSL DA-15 reader\cr
#' Reference: \tab unpublished
#' }
#'
#' **TL.SAR.Data**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory of Cologne\cr
#' Lab-Code: \tab LP1_5\cr
#' Location: \tab Spain\cr
#' Material: \tab Flint \cr
#' Setup: \tab Risoe TL/OSL DA-20 reader (Filter: Semrock Brightline, HC475/50, N2, unpolished steel discs) \cr
#' Reference: \tab unpublished \cr
#' Remarks: \tab dataset limited to one position
#' }
#'
#' @note
#' Please note that this example data cannot be exported to a BIN-file using the function
#' `writeR2BIN` as it was generated and implemented in the package long time ago. In the meantime
#' the BIN-file format changed.
#'
#' @docType data
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## show first 5 elements of the METADATA and DATA elements in the terminal
#' data(ExampleData.BINfileData, envir = environment())
#' CWOSL.SAR.Data@@METADATA[1:5,]
#' CWOSL.SAR.Data@@DATA[1:5]
#'
#' @name ExampleData.BINfileData
#' @aliases CWOSL.SAR.Data TL.SAR.Data
#' @md
NULL
#' Example CW-OSL curve data for the package Luminescence
#'
#' `data.frame` containing CW-OSL curve data (time, counts)
#'
#' @name ExampleData.CW_OSL_Curve
#'
#' @docType data
#'
#' @format Data frame with 1000 observations on the following 2 variables:
#'
#' \describe{
#' \item{list("x")}{a numeric vector, time}
#' \item{list("y")}{a numeric vector, counts}
#' }
#'
#' @references
#' Baartman, J.E.M., Veldkamp, A., Schoorl, J.M., Wallinga, J.,
#' Cammeraat, L.H., 2011. Unravelling Late Pleistocene and Holocene landscape
#' dynamics: The Upper Guadalentin Basin, SE Spain. Geomorphology, 125,
#' 172-185.
#'
#' Bos, A.J.J. & Wallinga, J., 2012. How to visualize quartz OSL signal
#' components. Radiation Measurements, 47, 752-758.
#'
#' @source **ExampleData.CW_OSL_Curve**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Bayreuth\cr
#' Lab-Code: \tab BT607\cr
#' Location: \tab Saxony/Germany\cr
#' Material: \tab Middle grain quartz measured on aluminium cups on a Risø TL/OSL DA-15 reader.\cr
#' Reference: \tab unpublished data }
#'
#' **CW_Curve.BosWallinga2012**
#'
#' \tabular{ll}{
#' Lab: \tab Netherlands Centre for Luminescence Dating (NCL)\cr
#' Lab-Code: \tab NCL-2108077\cr
#' Location: \tab Guadalentin Basin, Spain\cr
#' Material: \tab Coarse grain quartz\cr
#' Reference: \tab Bos & Wallinga (2012) and Baartman et al. (2011)
#' }
#'
#' @keywords datasets
#'
#' @examples
#'
#' data(ExampleData.CW_OSL_Curve, envir = environment())
#' plot(ExampleData.CW_OSL_Curve)
#'
#' @aliases CW_Curve.BosWallinga2012 ExampleData.CW_OSL_Curve
#' @md
NULL
#' Example portable OSL curve data for the package Luminescence
#'
#' A `list` of [RLum.Analysis-class] objects, each containing
#' the same number of [RLum.Data.Curve-class] objects representing
#' individual OSL, IRSL and dark count measurements of a sample.
#'
#' @name ExampleData.portableOSL
#'
#' @docType data
#'
#' @source
#'
#' **ExampleData.portableOSL**
#'
#' \tabular{ll}{
#' Lab: \tab Cologne Luminescence Laboratory\cr
#' Lab-Code: \tab `none` \cr
#' Location: \tab Nievenheim/Germany\cr
#' Material: \tab Fine grain quartz \cr
#' Reference: \tab unpublished data
#' }
#'
#' @keywords datasets
#'
#' @examples
#'
#' data(ExampleData.portableOSL, envir = environment())
#' plot_RLum(ExampleData.portableOSL)
#'
#' @md
NULL
#' Example data for fit_LMCurve() in the package Luminescence
#'
#' Linearly modulated (LM) measurement data from a quartz sample from Norway
#' including background measurement. Measurements carried out in the
#' luminescence laboratory at the University of Bayreuth.
#'
#' @format Two objects (data.frames) with two columns (time and counts).
#'
#' @references
#' Fuchs, M., Kreutzer, S., Fischer, M., Sauer, D., Soerensen, R., 2012. OSL and IRSL
#' dating of raised beach sand deposits along the south-eastern coast of Norway.
#' Quaternary Geochronology, 10, 195-200.
#'
#' @source
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Bayreuth\cr
#' Lab-Code: \tab BT900\cr
#' Location: \tab Norway\cr
#' Material: \tab Beach deposit, coarse grain quartz measured on aluminium discs on a Risø TL/OSL DA-15 reader\cr
#' }
#'
#' @examples
#'
#' ##show LM data
#' data(ExampleData.FittingLM, envir = environment())
#' plot(values.curve,log="x")
#'
#' @name ExampleData.FittingLM
#' @aliases values.curve values.curveBG
#' @md
NULL
#' Example Lx/Tx data from CW-OSL SAR measurement
#'
#' LxTx data from a SAR measurement for the package Luminescence.
#'
#' @format A [`data.frame`] with 4 columns (Dose, LxTx, LxTx.Error, TnTx).
#'
#' @references unpublished data
#'
#' @source
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Bayreuth\cr
#' Lab-Code: \tab BT607\cr
#' Location: \tab Ostrau (Saxony-Anhalt/Germany)\cr
#' Material: \tab Middle grain (38-63 \eqn{\mu}m) quartz measured on a Risoe TL/OSL DA-15 reader.
#' }
#'
#' @examples
#'
#' ## plot Lx/Tx data vs dose [s]
#' data(ExampleData.LxTxData, envir = environment())
#' plot(LxTxData$Dose,LxTxData$LxTx)
#'
#' @name ExampleData.LxTxData
#' @aliases LxTxData
#' @md
NULL
#' Example Lx and Tx curve data from an artificial OSL measurement
#'
#' `Lx` and `Tx` data of continuous wave (CW-) OSL signal curves.
#'
#' @format Two [`data.frame`]s containing time and count values.
#'
#' @references unpublished data
#'
#' @source
#' Arbitrary OSL measurement.
#'
#' @examples
#'
#' ##load data
#' data(ExampleData.LxTxOSLData, envir = environment())
#'
#' ##plot data
#' plot(Lx.data)
#' plot(Tx.data)
#'
#' @name ExampleData.LxTxOSLData
#' @aliases Lx.data Tx.data
#' @md
NULL
#' Example data as [RLum.Analysis-class] objects
#'
#' Collection of different [RLum.Analysis-class] objects for
#' protocol analysis.
#'
#' @format
#'
#' `IRSAR.RF.Data`: IRSAR.RF.Data on coarse grain feldspar
#'
#' Each object contains data needed for the given protocol analysis.
#'
#' @section Version: 0.1
#'
#' @references
#' **IRSAR.RF.Data**
#'
#' Kreutzer, S., Lauer, T., Meszner, S., Krbetschek, M.R., Faust, D., Fuchs,
#' M., 2014. Chronology of the Quaternary profile Zeuchfeld in Saxony-Anhalt /
#' Germany - a preliminary luminescence dating study. Zeitschrift fuer
#' Geomorphologie 58, 5-26. doi: 10.1127/0372-8854/2012/S-00112
#'
#' @source **IRSAR.RF.Data**
#'
#' These data were kindly provided by Tobias Lauer and Matthias Krbetschek.
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory TU Bergakademie Freiberg\cr
#' Lab-Code: \tab ZEU/SA1\cr
#' Location: \tab Zeuchfeld (Zeuchfeld Sandur; Saxony-Anhalt/Germany)\cr
#' Material: \tab K-feldspar (130-200 \eqn{\mu}m)\cr
#' Reference: \tab Kreutzer et al. (2014)
#' }
#'
#' @keywords datasets
#'
#' @examples
#'
#' ##load data
#' data(ExampleData.RLum.Analysis, envir = environment())
#'
#' ##plot data
#' plot_RLum(IRSAR.RF.Data)
#'
#' @name ExampleData.RLum.Analysis
#' @aliases IRSAR.RF.Data
#' @md
NULL
#' Example data as [RLum.Data.Image-class] objects
#'
#' Measurement of Princton Instruments camera imported with the function
#' [read_SPE2R] to R to produce an
#' [RLum.Data.Image-class] object.
#'
#'
#' @format Object of class [RLum.Data.Image-class]
#'
#' @section Version: 0.1
#'
#' @source
#' **ExampleData.RLum.Data.Image**
#'
#' These data were kindly provided by Regina DeWitt.
#'
#' \tabular{ll}{
#' Lab.: \tab Department of Physics, East-Carolina University, NC, USA\cr
#' Lab-Code: \tab - \cr
#' Location: \tab - \cr
#' Material: \tab - \cr
#' Reference: \tab - \cr
#' }
#'
#' Image data is a measurement of fluorescent ceiling lights with a cooled
#' Princeton Instruments (TM) camera fitted on Risø DA-20 TL/OSL reader.
#'
#' @keywords datasets
#'
#' @examples
#'
#' ##load data
#' data(ExampleData.RLum.Data.Image, envir = environment())
#'
#' ##plot data
#' plot_RLum(ExampleData.RLum.Data.Image)
#'
#' @name ExampleData.RLum.Data.Image
#' @md
NULL
#' Example data for a SAR OSL measurement and a TL spectrum using a lexsyg
#' reader
#'
#' Example data from a SAR OSL measurement and a TL spectrum for package
#' Luminescence imported from a Freiberg Instruments XSYG file using the
#' function [read_XSYG2R].
#'
#' @format
#'
#' `OSL.SARMeasurement`: SAR OSL measurement data
#'
#' The data contain two elements: (a) `$Sequence.Header` is a
#' [data.frame] with metadata from the measurement,(b)
#' `Sequence.Object` contains an [RLum.Analysis-class] object
#' for further analysis.
#'
#' `TL.Spectrum`: TL spectrum data
#'
#' [RLum.Data.Spectrum-class] object for further analysis. The
#' spectrum was cleaned from cosmic-rays using the function
#'
#' `apply_CosmicRayRemoval`. Note that no quantum efficiency calibration
#' was performed.
#'
#' @section Version: 0.1
#'
#' @seealso [read_XSYG2R], [RLum.Analysis-class], [RLum.Data.Spectrum-class],
#' [plot_RLum], [plot_RLum.Analysis], [plot_RLum.Data.Spectrum]
#'
#' @references
#' Unpublished data measured to serve as example data for that
#' package. Location origin of sample BT753 is given here:
#'
#' Fuchs, M., Kreutzer, S., Rousseau, D.D., Antoine, P., Hatte, C., Lagroix,
#' F., Moine, O., Gauthier, C., Svoboda, J., Lisa, L., 2013. The loess sequence
#' of Dolni Vestonice, Czech Republic: A new OSL-based chronology of the Last
#' Climatic Cycle. Boreas, 42, 664--677.
#'
#' @source
#' **OSL.SARMeasurement**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Giessen\cr
#' Lab-Code: \tab no code\cr
#' Location: \tab not specified\cr
#' Material: \tab Coarse grain quartz on steel cups on lexsyg research reader\cr
#' Reference: \tab unpublished
#' }
#'
#' **TL.Spectrum**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Giessen\cr
#' Lab-Code: \tab BT753\cr
#' Location: \tab Dolni Vestonice/Czech Republic\cr
#' Material: \tab Fine grain polymineral on steel cups on lexsyg research reader\cr
#' Reference: \tab Fuchs et al., 2013 \cr
#' Spectrum: \tab Integration time 19 s, channel time 20 s\cr
#' Heating: \tab 1 K/s, up to 500 deg. C
#' }
#'
#' @keywords datasets
#'
#' @examples
#' ##show data
#' data(ExampleData.XSYG, envir = environment())
#'
#' ## =========================================
#' ##(1) OSL.SARMeasurement
#' OSL.SARMeasurement
#'
#' ##show $Sequence.Object
#' OSL.SARMeasurement$Sequence.Object
#'
#' ##grep OSL curves and plot the first curve
#' OSLcurve <- get_RLum(OSL.SARMeasurement$Sequence.Object,
#' recordType="OSL")[[1]]
#' plot_RLum(OSLcurve)
#'
#' ## =========================================
#' ##(2) TL.Spectrum
#' TL.Spectrum
#'
#' ##plot simple spectrum (2D)
#' plot_RLum.Data.Spectrum(TL.Spectrum,
#' plot.type="contour",
#' xlim = c(310,750),
#' ylim = c(0,300),
#' bin.rows=10,
#' bin.cols = 1)
#'
#' ##plot 3d spectrum (uncomment for usage)
#' # plot_RLum.Data.Spectrum(TL.Spectrum, plot.type="persp",
#' # xlim = c(310,750), ylim = c(0,300), bin.rows=10,
#' # bin.cols = 1)
#'
#' @name ExampleData.XSYG
#' @aliases OSL.SARMeasurement TL.Spectrum
#' @md
NULL
#' Example De data sets for the package Luminescence
#'
#' Equivalent dose (De) values measured for a fine grain quartz sample from a
#' loess section in Rottewitz (Saxony/Germany) and for a coarse grain quartz
#' sample from a fluvial deposit in the rock shelter of Cueva Anton
#' (Murcia/Spain).
#'
#'
#' @format A [list] with two elements, each containing a two column [data.frame]:
#'
#' \describe{
#' `$BT998`: De and De error values for a fine grain quartz
#' sample from a loess section in Rottewitz.
#'
#' `$CA1`: Single grain De
#' and De error values for a coarse grain quartz sample from a fluvial deposit
#' in the rock shelter of Cueva Anton
#' }
#'
#' @references
#' **BT998**
#'
#' Unpublished data
#'
#' **CA1**
#'
#' Burow, C., Kehl, M., Hilgers, A., Weniger, G.-C., Angelucci, D., Villaverde,
#' V., Zapata, J. and Zilhao, J. (2015). Luminescence dating of fluvial
#' deposits in the rock shelter of Cueva Anton, Spain. Geochronometria 52, 107-125.
#'
#' **BT998**
#'
#' \tabular{ll}{
#' Lab: \tab Luminescence Laboratory Bayreuth\cr
#' Lab-Code: \tab BT998\cr
#' Location: \tab Rottewitz (Saxony/Germany)\cr
#' Material: \tab Fine grain quartz measured on aluminium discs on a Risø TL/OSL DA-15 reader\cr
#' Units: \tab Values are given in seconds \cr
#' Dose Rate: \tab Dose rate of the beta-source at measurement ca. 0.0438 Gy/s +/- 0.0019 Gy/s\cr
#' Measurement Date: \tab 2012-01-27
#' }
#'
#' **CA1**
#'
#' \tabular{ll}{
#' Lab: \tab Cologne Luminescence Laboratory (CLL)\cr
#' Lab-Code: \tab C-L2941\cr
#' Location: \tab Cueva Anton (Murcia/Spain)\cr
#' Material: \tab Coarse grain quartz (200-250 microns) measured on single grain discs on a Risoe TL/OSL DA-20 reader\cr
#' Units: \tab Values are given in Gray \cr
#' Measurement Date: \tab 2012
#' }
#'
#' @keywords datasets
#'
#' @examples
#'
#' ##(1) plot values as histogram
#' data(ExampleData.DeValues, envir = environment())
#' plot_Histogram(ExampleData.DeValues$BT998, xlab = "De [s]")
#'
#' ##(2) plot values as histogram (with second to gray conversion)
#' data(ExampleData.DeValues, envir = environment())
#'
#' De.values <- Second2Gray(ExampleData.DeValues$BT998,
#' dose.rate = c(0.0438, 0.0019))
#'
#'
#' plot_Histogram(De.values, xlab = "De [Gy]")
#'
#' @name ExampleData.DeValues
#' @md
NULL
#' Example data for feldspar fading measurements
#'
#' Example data set for fading measurements of the IR50, IR100, IR150 and
#' IR225 feldspar signals of sample UNIL/NB123. It further contains regular equivalent dose
#' measurement data of the same sample, which can be used to apply a
#' fading correction to.
#'
#'
#' @format A [list] with two elements, each containing a further [list] of
#' [data.frame]s containing the data on the fading and equivalent dose measurements:
#'
#' \describe{
#' `$fading.data`: A named [list] of [data.frame]s,
#' each having three named columns (`LxTx, LxTx.error, timeSinceIrradiation`).\cr
#' `..$IR50`: Fading data of the IR50 signal.\cr
#' `..$IR100`: Fading data of the IR100 signal.\cr
#' `..$IR150`: Fading data of the IR150 signal.\cr
#' `..$IR225`: Fading data of the IR225 signal.\cr
#'
#'
#' `$equivalentDose.data`: A named of [data.frame]s,
#' each having three named columns (`dose, LxTx, LxTx.error`).\cr
#' `..$IR50`: Equivalent dose measurement data of the IR50 signal.\cr
#' `..$IR100`: Equivalent dose measurement data of the IR100 signal.\cr
#' `..$IR150`: Equivalent dose measurement data of the IR150 signal.\cr
#' `..$IR225`: Equivalent dose measurement data of the IR225 signal.\cr
#' }
#'
#' @source
#'
#' These data were kindly provided by Georgina E. King. Detailed information
#' on the sample UNIL/NB123 can be found in the reference given below. The raw
#' data can be found in the accompanying supplementary information.
#'
#' @references
#'
#' King, G.E., Herman, F., Lambert, R., Valla, P.G., Guralnik, B., 2016.
#' Multi-OSL-thermochronometry of feldspar. Quaternary Geochronology 33, 76-87.
#' doi:10.1016/j.quageo.2016.01.004
#'
#' **Details**
#'
#' \tabular{ll}{
#' Lab: \tab University of Lausanne \cr
#' Lab-Code: \tab UNIL/NB123 \cr
#' Location: \tab Namche Barwa (eastern Himalayas)\cr
#' Material: \tab Coarse grained (180-212 microns) potassium feldspar \cr
#' Units: \tab Values are given in seconds \cr
#' Lab Dose Rate: \tab Dose rate of the beta-source at measurement ca. 0.1335 +/- 0.004 Gy/s \cr
#' Environmental Dose Rate: \tab 7.00 +/- 0.92 Gy/ka (includes internal dose rate)
#' }
#'
#'
#' @keywords datasets
#'
#' @examples
#'
#' ## Load example data
#' data("ExampleData.Fading", envir = environment())
#'
#' ## Get fading measurement data of the IR50 signal
#' IR50_fading <- ExampleData.Fading$fading.data$IR50
#' head(IR50_fading)
#'
#' ## Determine g-value and rho' for the IR50 signal
#' IR50_fading.res <- analyse_FadingMeasurement(IR50_fading)
#'
#' ## Show g-value and rho' results
#' gval <- get_RLum(IR50_fading.res)