Combine uncertain orientations to show where a group of structures concentrates in azimuth or declination.
spd(pdf, xrange, normalise = F, .res = 0.01, .cutoff = 1e-05)
pdf |
A skyscapeR.pdf object created with either |
xrange |
Array of values (min and max) for SPD if different from range of pdf. If given, it overrides .cutoff |
normalise |
If TRUE, scale the returned density to unit area using trapezoidal integration. Default FALSE leaves the summed density unnormalised. |
.res |
Resolution with which to output SPD. Default is 0.01 degrees. |
.cutoff |
When the range is chosen automatically, set summed densities below this threshold to zero. Default |
A summed probability density gives each input measurement one density curve. The function linearly interpolates these curves onto one angular grid, assigns zero outside each curve's sampled support and adds their heights point by point. With an automatically chosen range it zeroes summed heights below the cutoff. With an explicit range it retains the calculated heights across that range.
Normalisation takes place after interpolation and any cutoff, over
the returned grid. An explicit restricted xrange therefore normalises
the retained portion only. Zero-area, nonfinite or negative densities and
grids with fewer than two points cannot be normalised and produce an error.
Earlier versions divided by the sum of sampled heights. Normalised outputs
now have a different scale; on a regular grid with zero endpoint densities,
new heights equal old heights divided by .res. Existing saved objects
are not converted. Changing resolution can still affect interpolation and
truncation accuracy, but the returned trapezoidal area is one.
A skyscapeR.spd list with metadata and a data
data frame containing coordinate x (degrees) and density y.
Normalised densities have units of inverse degrees.
The tested sums agreed with independently constructed density sums, and the normalised curves had unit trapezoidal area. See D01 validation in the technical manual.
For two bearings on a shared slope, the D02 comparison of summing before and after transformation gave an integrated absolute density difference of 0.00159 after normalisation. See the D02 check in the technical manual.
The six measurement families matched their analytic controls. Tests of disconnected highest-density regions recovered the expected endpoints. D01 study.
All 18 flat-horizon quantile comparisons met the 0.02-degree tolerance. Additional fixtures quantify errors on steep skylines and near a celestial pole. D02 study.
At nominal 5 percent, global rejection across tested uniform nulls with attainable ranks ranged from 4.25 to 5.85 percent. S01 study.
In six direct-input matched nulls, global rejection at nominal 5 percent ranged from 4.35 to 5.50 percent. The study separately quantifies effects of dependence and skyline transformation. S02 study.
The field-to-sky replay recovered the Gacrux position between the Skorba West entrance edges, 2.41 degrees above the measured skyline at the illustrated instant. W02 study.
Silva, F (2020) A probabilistic framework and significance test for the analysis of structural orientations in skyscape archaeology Journal of Archaeological Science 118, 105138. doi:10.1016/j.jas.2020.105138
az.pdf, coordtrans, hpdi, randomTest, dec.pdf, modelTest, plot.skyscapeR.spd
# SPD of azimuths
Az <- az.pdf(az=c(87,93,90,110), unc=3)
s1 <- spd(Az)
plot(s1)
s.norm <- spd(Az, normalise=TRUE)
with(s.norm$data, sum(diff(x) * (head(y,-1) + tail(y,-1))/2)) # 1
# SPD of declinations
hor <- createHor(az=c(0,360), alt=c(0,0), loc=c(35,-8,25)) # flat horizon
Dec <- coordtrans(Az, hor)
s2 <- spd(Dec)
plot(s2)