Single energy x-ray absorption detection: a combined electronic and structural local probe for phase transitions in condensed matter