  We present a modified version of the Judd-Ofelt theory, which describes the
intensities of f-f transitions for trivalent lanthanide ions (Ln$^{3+}$) in
solids. In our model, the properties of the dopant are calculated with
well-established atomic-structure techniques, while the influence of the
crystal-field potential is described as a perturbation, by three adjustable
parameters. Compared to our previous work [G. Hovhannesyan \textit{et al.}, J.
Lumin. \textbf{241}, 118456 (2022)], the spin-orbit interaction within the
first excited configuration 4f$^{w-1}$5d is described in a perturbative way,
whereas it is exactly taken into account in the ground configuration 4f$^w$,
using all the eigenvector components of the free-ion levels. Moreover, the
wavelength-dependence of the refractive index of the host material is also
accounted for. We test the validity of our model on three ions: Eu$^{3+}$,
Nd$^{3+}$ and Er$^{3+}$. The results of the extension are satisfactory, we are
able to give a physical insight into all the transitions within the ground
electronic configuration, and also to reproduce quantitatively experimental
absorption oscillator strengths. We also performed calculations of standard JO
parameters, and the results are in good agreement with the values reported in
the literature. The code used to make the calculations is available on GitLab.
