This paper presents a probabilistic formulation and a generalised version of the two foil method for estimating electron temperature from soft x-ray radiation, motivated by its application to the COMPASS-U tokamak. Using synthetic data representative of the expected diagnostic configuration, we benchmark the performance of the method and investigate the impact of tungsten line radiation on its accuracy. The results show that neglecting tungsten line radiation can lead to a substantial underestimation of the electron temperature, highlighting a key limitation of the standard approach. To address this issue, we propose a generalised two foil method that explicitly incorporates line radiation from plasma impurities into the probabilistic model. The generalised formulation relates the ratio of emissivities measured by two detectors with different filters to the electron temperature, electron density, effective charge, and tungsten density. The method is demonstrated using simulations of COMPASS-U plasma scenarios with a synthetic model of a planned soft x-ray diagnostic system consisting of two detector sets with different filters capable of tomographic inversions. Benchmarking is performed under different a priori assumptions on plasma parameters, considering both the standalone method and cases where additional constraints from other diagnostics are included. We identify three distinct regimes in plasma parameter space in which the diagnostic sensitivity is dominated by the electron temperature, by the impurity content, or coupled dependence on both parameters.