### Spectral variation

Figure 3a depicts an example of typical power spectra, an enlargement of which is shown in Fig. 2; the blue and red lines indicate the spectra from earlywood and latewood, respectively. The intensities in the spectrum of the earlywood are slightly higher than those for latewood. Both spectra repeat every 500 Hz, probably because of the transformation from matrix to vector. For this reason, the following analyses are focused on the restricted frequency interval from 1 to 500 Hz with the aim to reduce the computational complexity. In normal spectrum analysis, the peak intensity of a specific frequency is often of most interest. In this study, however, we examined the spectral variations using statistical mechanics and therefore do not consider the spectral variation as individual variables (that is, frequency) separately but rather as a whole for the wood system. Statistical mechanics deals with physical properties of systems that comprise an enormous number of microscopic elements, that is, many-body systems [33,34,35]. Here, we consider the spectral variables abstractly as microscopic elements comprising the wood system.

Additionally, we assumed the physical system to be in an equilibrium state that conforms to the requirements of equilibrium statistical physics. In this study, the power spectrum is regarded as a state vector representing the physical state of a given wood. To attain the equilibrium state, many spectra that show an almost similar pattern in variation are required. Prior to the eigenvalue analyses, 500 samples were simulated in accordance with the bootstrap resampling procedure [36]. The intensity at each frequency is assumed to follow an empirical distribution of the measured data, and the mean of the bootstrap samples was obtained by repeating the procedure 500 times using the ‘simpleboot’ package [37]. Simulations were performed with the images of earlywood and latewood. Consequently, spectral matrices corresponding to the earlywood and latewood data, each with 500 rows and 500 columns, were obtained for both low and high-shrinkage samples (Fig. 3b) and were used for the following analyses. The elements of the variance–covariance matrix calculated from this 500 × 500 random matrices were assumed to obey a Gaussian orthogonal ensemble [24].

### Eigenvalue distribution

From the distributions of the (energy) eigenvalues calculated from the variance–covariance matrix *C* for low-shrinkage sample (Fig. 4), the eigenvalues from latewood images (panel (b)) are widely distributed compared with those from earlywood images (panel (a)). The same results were found for high-shrinkage sample (Fig. 4c, d). These results indicate that the spectral matrix of the latewood images varied in a more orderly manner than that of the earlywood images. Indeed, the images of latewood were mostly occupied by cell walls and therefore there is no distinctive variation in the distribution of the cell wall.

Using the distribution function *Z* (Eq. 2) as a normalization factor, the probability that the system of interest is in the energy eigenstate *E*_{i} was found to be

$${p}_{i}=\frac{1}{Z}\text{exp(}-\beta {E}_{i}\text{)}, (i=1,\ldots , N).$$

(3)

Let *β* be a constant. The distribution of probability *p*_{i} corresponding to each energy eigenstate (Fig. 5) show that for low (panel (a)) and high (panel (b)) shrinkage samples, *p*_{i} of earlywood images (blue lines) has a flat distribution compared with that of latewood images (red lines). This suggests that earlywood displays a more disordered pattern of cell wall distribution compared with latewood. As evident from the optical micrographs (Fig. 1), the low-shrinkage samples contain more earlywood area than the high-shrinkage samples; moreover, the former have a more disordered cellular structure than the latter.

### Stochastic energetics for the distribution of cell wall

The thermodynamic functions were calculated using the set of eigenvalues \(\{{E}_{1},{E}_{2},\ldots , {E}_{N}\}\) to assess the distribution pattern of cell wall quantitatively. The Helmholtz free energy *F* is given by the logarithm of the distribution function,

$$F=\frac{1}{\beta } \log Z.$$

(4)

The Helmholtz free energy is an important quantity in the sense that it contains all the information of the physical properties of a system. Although both *Z* and *F* depend on *β*, the first eigenvalue *E*_{1} of the matrix *C* can be evaluated from *F* in the limit *β* → ∞ [23],

$${E}_{1}=2\underset{\beta \to \infty }{\mathrm{lim}}F\left(\beta |{\varvec{C}}\right).$$

(5)

As evident in the eigenvalue distribution (Fig. 4), for low and high-shrinkage samples, the first eigenvalues, that is, Helmholtz free energy, associated with the latewood images were higher than those of the earlywood images. The high-shrinkage sample moreover featured a large Helmholtz free energy because of the high possession of latewood. This result is associated with the distribution pattern of cell walls evident in Fig. 1 and was consistent with our previous understanding that tangential shrinkage and swelling are largely controlled by the changes in the latewood [1]. Because large dimensional changes seem to involve a lot of work arising from the stress during shrinkage or swelling, the result is also consistent with the actual physical picture. This study dealt with woods having almost the same wood density. Hence, the eigenvalues would carry a lot of information concerning various factors other than wood density that influence shrinkage and provide a comprehensive understanding concerning dimensional changes in wood.

We can next calculate the Shannon entropy *S* from the results of the probability *p*_{i},

$$S=-\sum_{i=1}^{N}{p}_{i}\log {p}_{i}. $$

(6)

Figure 6 shows the variation of entropy *S* with *β*. The domain of *β* was set so that the entropy could be calculated. For both low and high-shrinkage samples, the earlywood images showed larger entropy *S* than the latewood images. Therefore, the low-shrinkage sample displayed a large entropy because of the high possession of earlywood. These results coincide with the optical micrographs (Fig. 1); specifically, the gradual transition from earlywood to latewood for low-shrinkage samples may be interpreted as a consequence of the distribution of the cell wall being more homogeneous. High-shrinkage samples show low entropy, where the distribution of the cell walls is a well-ordered repetitive pattern from earlywood to latewood. This can be explained from the distribution of brightness in the optical micrographs of the transverse section (Fig. 1). Figure 7 shows Histograms of the luminous intensity of the grayscale micrographs for the low-shrinkage sample (a) and high-shrinkage sample (b). In general, the distribution of brightness shows the bimodality due to the contrast of cell walls and lumen. Sharpness of the peaks were obviously different between the samples. Two peaks were clearly identified in the micrographs of high-shrinkage sample but were spread in the low-shrinkage sample.

The physical approaches proposed in this study is suitable for evaluating phenomena where many factors contribute to a system cooperatively rather than individually [33,34,35]. As mentioned above, a wood may be regarded as a physical system with multiple degrees of freedom. Based on this suggestion, it seems that the spectral variables are like *generalized coordinates* in analytical mechanics [33]. That is, we consider the variation of data points as if they were the movements of a point particle in configuration space. Actually, in the Hamiltonian Monte Carlo method in simulating the posterior distribution, we consider the model parameter space of the probability distribution to be a configuration space and evaluate the potential energy using the logarithm posterior distribution [38]. Although the power spectra of image data were used in this study, the data from wood can be arbitrarily selected as long as they are multi-dimensional and spectral-like in this way of thinking. The proposed concept for considering the wood variation thus has very widely applicability.