n.items()
            ])

        material_func = partial(func, fractional_masses)

        material.mass_attenuation_coefficient.func = material_func
        return material


def get_detector_absorption(energies=None):
    mass_fraction = {&#39;Te&#39;: 0.531644, &#39;Cd&#39;: 0.4683554}
    density = 5.85 * u.g / u.cm**3
    thickness = 1 * u.mm
    material = Transmission.create_material(name=&#39;cdte&#39;,
                                            fractional_masses=mass_fraction,
                   