spot.dist: Distance of sampling spots from margin along a measurement...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/spot.dist.R


Scale the location of sampling spots to visible growth bands, project the sampling spots along a measurement axis (main) and calculate the distance from margin. Useful for locating high-resolution LA-ICP-MS or SIMS sample spots in samples with non-linear growth bands.


spot.dist(rawDist, = NULL, = TRUE,
  use.centroids = TRUE)



a rawDist object for which the alignment should be done.

An optional parameter over-riding the sample name. If NULL (default), the sample name will be passed from the previous steps (read.ijdata, convert.ijdata)

a logical indicating whether to run averaging error estimation, if rawDist contains spot size information. Defaults to TRUE.


a logical indicating whether to use centroids of spot.owins instead of spots, if rawDist contains spot size information. Defaults to TRUE.


The alignment information with sample spot numbers is stored as a sublist called output and can be extracted to a data.frame. Otherwise the object behaves like any list in R. Relevant data can be subsetted as needed. Detailed data containing information of the alignment process is stored in a sublist called det.dat.

The function can either project growth lines on the distance (main) axis or use the crossing points between growth lines and the main axis. These two types of the main axis can be used for different applications. The main axis type is automatically selected by the following criteria:


Approperiate for samples with cut-off growth lines such as bivalve margin cross-sections and tree, sediment or ice-cores. This option is selected by placing the measurement axis such that it does not cross any of the marked growth lines. The location of each growth line is projected along the measurement axis from the beginning of the growth line (the point where you started marking the growth line in ImageJ).


Approperiate for approximately round cross-sections: samples where the growth lines continue through the entire width of the sample (such as tree, coral or calcareous algae cross-sections and umbo-regions of bivalves). This type is selected by making the main axis to cross each individual marked growth line. The location of each growth line along the main axis is considered as a crossing point.

These criteria are set due to the need of defining a location for each marked growth line along the distance (main) axis. The choice is rigid, to simplify calculations, and to avoid bias in results by allowing two different methods for growth line locations. The easiest way to test which type suits a particular sample best is to save two sets of ImageJ zip files by moving the measurement axis.


Returns a list of class spotDist containing information of the aligned sample spots and the digitized representation of the shell cross-section, which was already included in the rawDist object.


Mikko Vihtakari

See Also

read.ijdata for reading zip files containing ImageJ ROIs.

order.ijdata for ordering and subsetting read.ijdata output.

convert.ijdata for converting the coordinate information to spatstat point patterns.

plot.spotDist for plotting.

print.spotDist for printing.


shell_map <- convert.ijdata(shellspots)
x <- spot.dist(shell_map)

sclero documentation built on May 2, 2019, 2:26 p.m.