Regularly, men who experience erectile dysfunction are given a nocturnal penile tumescence (NPT) test, usually over a three day period. Such a test detects the presence of an erection occurring during sleep using either (1) a small, portable computer connected to two bands placed around the shaft of the penis which records penile tumescence, or (2) a band of paper tape with perforations (like postage stamps) that is fit snugly around the shaft of the penis and will break at the perforations during penile tumescence.
The goal of nocturnal penile tumescence testing is to determine whether a man can experience an erection while sleeping after reporting he is unable to experience an erection while awake. If a man does obtain an erection while sleeping, but cannot obtain one while awake, a psychological cause is usually suspected. Else, if a man does not obtain an erection in either state, a physiological cause is usually suspected.