Josephson junctions as radiation detectors from millihertz to terahertz