  Charge density waves (CDWs) are understood in great details in one dimension,
but they remain largely enigmatic in two dimensional systems. In particular,
numerous aspects of the associated energy gap and the formation mechanism are
not fully understood. Two long standing riddles are the amplitude and position
of the CDW gap with respect to the Fermi level ($E_F$) and the frequent absence
of CDW contrast inversion (CI) between opposite bias scanning tunneling
microscopy (STM) images. Here, we find compelling evidence that these two
issues are intimately related. Combining density functional theory and STM to
analyse the CDW pattern and modulation amplitude in 1$T$-TiSe$_2$, we find that
CI takes place at an unexpected negative sample bias because the CDW gap opens
away from $E_F$, deep inside the valence band. This bias becomes increasingly
negative as the CDW gap shifts to higher binding energy with electron doping.
This study shows the importance of CI in STM images to identify periodic
modulations with a CDW and to gain valuable insight into the CDW gap, whose
measurement is notoriously controversial.
