Title: | Laser Ablation Blast Through Endpoint Detection |
Version: | 1.0.1 |
Date: | 2023-04-17 |
Description: | Imports a data frame containing a single time resolved laser ablation mass spectrometry analysis of a foraminifera (or other carbonate shell), then detects when the laser has burnt through the foraminifera test as a function of change in signal over time. |
License: | LGPL (≥ 3) |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.2 |
Imports: | magrittr, ggplot2, smooth, scales, stats, rlang |
Depends: | R (≥ 3.5.0) |
LazyData: | true |
URL: | https://github.com/alexsb1/lablaster |
Language: | en-GB |
NeedsCompilation: | no |
Packaged: | 2023-04-17 22:33:35 UTC; Alex |
Author: | Alex Searle-Barnes
|
Maintainer: | Alex Searle-Barnes <c.j.a.searle-barnes@soton.ac.uk> |
Repository: | CRAN |
Date/Publication: | 2023-04-17 22:50:03 UTC |
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Arguments
lhs |
A value or the magrittr placeholder. |
rhs |
A function call using the magrittr semantics. |
Value
The result of calling rhs(lhs)
.
Time resolved analysis by laser ablation inductively coupled plasma mass spectrometry of a branching coral, identified hereon as “coral6”.
Description
A fragment of Acropora polystoma coral from Chris Standish.
Usage
coral6
Format
A data frame with 300 rows and 5 variables:
- Time
time stamp of each observation (in milliseconds)
- Mg24
raw data for 24Mg
- Ca43
raw data for 43Ca
- Mn55
raw data for 55Mn
- Sr86
raw data for 86Sr
Detects when the laser ablates through the target sample in a laser ablation mass spectrometry time resolved analysis.
Description
This function imports a data frame containing a single time resolved laser ablation mass spectrometry analysis of a foraminifera (or other carbonate shell).
It assumes that the first row contains the signal of the target sample and that background correction has already been applied.
Column names referencing the time stamps and target signal are specified as function arguments.
Then the signal column is evaluated by smoothing the values using a moving average, then scaled between 0-1 and the rate of change over a number of observations.
The function identifies the maximum rate of signal change, locates the corresponding time stamp and then subtracts the time it took for the laser to blast through the target.
The result (endTime) is the time stamp of the last observation while the laser is still focussed the desired target.
Usage
endPoint(
detectDf,
dt = 10,
smoothing = 5,
timeCol = "Time",
signalCol = "Ca44",
profile = "FLASE",
timeUnits = "seconds"
)
Arguments
detectDf |
A data frame containing a single time resolved analysis, with a column referencing time and another with the corresponding measured counts data. |
dt |
An integer that controls the number of observations (rows) are used in calculating a rolling lagged difference in 44Ca signal. Using a lower value for a faster blast through of chamber wall can improve end point sensitivity. Default = 10. |
smoothing |
Controls the length of the moving average filter to apply over the dt period. Default = 5. |
timeCol |
The column title in the data frame identifying the time stamp of the time resolved analysis. Default = "Time". |
signalCol |
The column title in the data frame identifying the numerical data used to identify the laser ablation blast through endpoint. This is often 44Ca but could be any column of numerical data that you want to detect the endpoint. Default = "Ca44". |
profile |
Logical. A visualisation of the endpoint detection mechanism as a ggplot2 object. To make this profile plot, set the argument to TRUE, otherwise set it to FALSE. Specifying to not make a plot can save a substantial amount of time. Default = "FALSE". |
timeUnits |
The units that the time resolved analysis is measured in. This is the units of the timeCol. This argument is a string and is only necessary if the argument profile = "TRUE". Default = "seconds". |
Value
The function returns a data frame containing the columns:
dfReturn$detectDf contains a data frame with only the observations between the first data frame row and the endTime.
dfReturn$startTime contains the earliest time in your TRA as a numerical value.
df$Return$endTime contains the last time step while the laser is still focussed the desired target in your TRA before the as a numerical value.
df$Return$profile contains a visualisation of your TRA identifying where the laser ablated through the carbonate shell as a ggplot object. This is only available if a profile was generated using profile = "TRUE".
Examples
endPoint(detectDf = foram72shot3, dt = 10, smoothing = 5, timeCol = "Time",
signalCol = "Ca44", profile = "TRUE", timeUnits = "seconds")
endPoint(detectDf = foram166shot7, dt = 8, smoothing = 7, timeCol = "Time",
signalCol = "Ca44", profile = "FALSE", timeUnits = "seconds")
endPoint(detectDf = foram174shot4, dt = 10, smoothing = 5, timeCol = "Time",
signalCol = "Ca43", profile = "TRUE", timeUnits = "seconds")
endPoint(detectDf = coral6, dt = 10, smoothing = 5, timeCol = "Time",
signalCol = "Sr86", profile = "FALSE", timeUnits = "milliseconds")
Time resolved analysis by laser ablation inductively coupled plasma mass spectrometry of a planktonic foraminifera
Description
The fifth from final chamber of Menardella exilis foraminifera 166, identified hereon as “foram166shot7”.
Usage
foram166shot7
Format
A data frame with 144 rows and 8 variables:
- Time
time stamp of each observation (in seconds)
- Mg24
raw data for 24Mg
- Al27
raw data for 27Al
- Ca43
raw data for 43Ca
- Ca44
raw data for 44Ca
- Mn55
raw data for 55Mn
- Cu65
raw data for 65Cu
- Sr88
raw data for 88Sr
Time resolved analysis by laser ablation inductively coupled plasma mass spectrometry of a planktonic foraminifera
Description
An antepenultimate chamber of Menardella exilis foraminifera 174, identified hereon as “foram174shot4”.
Usage
foram174shot4
Format
A data frame with 144 rows and 8 variables:
- Time
time stamp of each observation (in seconds)
- Mg24
raw data for 24Mg
- Al27
raw data for 27Al
- Ca43
raw data for 43Ca
- Ca44
raw data for 44Ca
- Mn55
raw data for 55Mn
- Cu65
raw data for 65Cu
- Sr88
raw data for 88Sr
Time resolved analysis by laser ablation inductively coupled plasma mass spectrometry of a planktonic foraminifera
Description
An antepenultimate chamber of Menardella exilis foraminifera 72, identified hereon as “foram72shot3”.
Usage
foram72shot3
Format
A data frame with 144 rows and 8 variables:
- Time
time stamp of each observation (in seconds)
- Mg24
raw data for 24Mg
- Al27
raw data for 27Al
- Ca43
raw data for 43Ca
- Ca44
raw data for 44Ca
- Mn55
raw data for 55Mn
- Cu65
raw data for 65Cu
- Sr88
raw data for 88Sr