A new method for directly locating single-event latchups using silicon pixel sensors in a gas detector