Electric field gradient tensor in modulated ionic crystals