# Rescaling for Compression

Sometimes when coring, cores can become compressed in the chamber. For example, if you know you’ve started a drive at 1 m, and finished at 2 m, but only collected 0.95 m of sediment, you may have compression. This is often a problem for Livingstone-type corers, but not an issue with Russian-types. This can be caused by:

• stretch in locking lines for corer heads (or ground compression if those lines are locked to the surface),
• friction of sediment inside the tube,
• airlocks inside the tube,
• poor cutting performance of the corer end.

It’s difficult to know whether you’ve lost material or suffered compression, so good practice says the stratigraphy should be cross-correlated with an adjacent sequence. If there is compression, this can be corrected for, but in practice it can be a pain. Here’s a simple way of doing it in `R`. Here I’m correcting the depths for sub-samples taken at 10 mm intervals, in a core that should have been 1 m in length, from 1 m to 2 m depth, but was actually 0.95 m in length when extracted.

```length <- 950     # the measured length of the core when extracted
truestart <- 1000 # the starting depth of the drive
trueend <- 2000   # the finishing depth of the drive
intervals <- 10   # the sampling interval

# create the sampling sequence - this may already be available in your data
z <- seq(from = trueend-length, to = trueend, by = intervals)

# correct those depths
zc <- seq(from = truestart, to = trueend, length.out = length(z))

# compare the data
df <- data.frame(original = z,
corrected = round(zc, digits = 0),
difference = round(z-zc, digits = 0)
)
tail(df)
```

This code assumes that there’s more compression at the top, and less at the bottom of the sequence, which is not unreasonable given the possibles causes listed above. Sometimes cores can expand due to decompression of the sediment following coring. This is particularly common in gytjja from lakes, where the weight of the water column compresses the sediment in-situ, thus it expands ex-situ. Take an example where we have a core of length 1.05 m, but we know we only cored from 1 m to 2 m; we need to compress the core back to 1 m length. The following code deals with this problem:

```length <- 1050    # the measured length of the core when extracted
truestart <- 1000 # the starting depth of the drive
trueend <- 2000   # the finishing depth of the drive
intervals <- 10   # the sampling interval

# create the sampling sequence - this may already be available in your data
z <- seq(from = truestart, to = truestart+length, by = intervals)

# shift the depths so they are centered
zs <- z-(max(z)-trueend)/2

# correct these depths
zc <- (trueend-truestart)/length * zs + mean(c(trueend, truestart)) - ((trueend-truestart)/length) * mean(zs)

# compare the data
df <- data.frame(original = z,
shifted = zs,
corrected = round(zc, digits = 0),
difference = round(zs-zc, digits = 0)
)