## 1 Introduction  
Porous silicon (_p_-Si) has attracted great interest in recent years due to its unique opto-electronic properties. The nanoscale sponge-like structure of _p_-Si, whereas porosity significantly enlarges its surface-to-volume ratio, exhibits the quantum confinement effect [1], resulting in faster carrier recombination [2], accompanied, at certain conditions, by photo-luminescence [3] and optical nonlinearities [4]. These effects are usually greatly enhanced in comparison to the conventional crystalline silicon (_c_-Si). These new capabilities extend the implementation of the traditional silicon material in photonics and optoelectronics to a wider range of potential applications of all-optical switching [5; 6], optical sensing [7; 8], energy conservation [9] and photonics devices [10]. However, possible applications encountering the enhanced nonlinearities of _p_-Si can be either an issue or advantage. Unwanted non-linear effects may result in sample damage through the undesirable self-focusing and two-photon absorption effects. However, the same effects may also bring advantages such as the use of _p_-Si as a material for 3D-laser micro-structuring [11] and an all-optical switching system [12]. Yet, the information on _p_-Si nonlinearity remains scarce, and our work attempts to form a clearer understanding of the topic through investigating the self-focusing and two-photon absorption (TPA) processes. For the investigation, we employed the _Z_-scan technique using 800-nm and 2.4-\(\upmu\)m femtosecond laser beams. The Z-scan is the main method used in this work. It was first proposed by [PERSON] et al. [13] in the 1990s for identifying the third-order nonlinearities of materials by translating a test sample through the focus of a Gaussian beam and recording the transmittance at each sample position. This method is highly sensitive and gives distinguishable features for the measurements of the near (closed aperture) and far (open aperture) field transmittance, corresponding to the nonlinear refraction and TPA processes, respectively. For nonlinearly refractive materials, a higher intensity in the centre of the Gaussian beam, in comparison to its surroundings, results in a variation of the refractive index along the beam cross-section. Therefore, samples behave as a focusing or defocusing lens depending on the sign of the nonlinear refractive index, \(n_{2}\). This effect can be observed by recording only the centre intensity of the transmitted light, which is normally accomplished by placing an aperture before a detector. In contrast, the total transmitted intensity (without the aperture) carries the information about nonlinear absorption, as it records a change of the total beam intensity, which is commonly governed by the TPA. The main purpose of this work is to compare nonlinear properties of \(p\)-Si to \(c\)-Si and to examine possible effects of the morphology and confinement. We employed the Z-scan method for both \(p\)-Si and \(c\)-Si using 800-nm incident light, which has photon energy greater than the band-gap of both materials. The majority of researchers focus on this energy regime because the nonlinear response benefits from strong single-photon resonance enhancement [14]. However, to have a better understanding of the nonlinearities arising from the anharmonic motion of bound electrons, we further extended the experiments to 2.4 \(\upmu\)m, where the incident light energy is below the band-gap. We measured the normalised transmittance, \(T(z)/T_{0}\), with a closed and open aperture for \(p\)-Si and \(c\)-Si free-standing thin films with a 15- and 9-\(\upmu\)m thickness, respectively. Here, \(T(z)\) is the measured transmittance at a sample position \(z\), relative to the location of the beam focus and \(T_{0}\) is the linear transmittance. The acquired experimental data were used to retrieve the nonlinear refractive index, \(n_{2}\), and TPA coefficient, \(\beta\). For the data analysis, we applied the Gaussian decomposition method [15].