Refactored amplitude setting to handle generic units and mnemonics.