change ampmap = None -> ampmap = [] to avoid iter over None