Photosensitive epilepsy (PSE) is a form of epilepsy in which seizures are triggered by visual stimuli that form patterns in time or space, such as flashing lights; bold, regular patterns; or regular moving patterns.
PSE affects approximately one in 4,000 people (5% of those with epilepsy).
 People with PSE experience epileptiform seizures upon exposure to certain visual stimuli. The exact nature of the stimulus or stimuli that triggers the seizures varies from one patient to another, as does the nature and severity of the resulting seizures (ranging from brief absence seizures to full tonic–clonic seizures). Many PSE patients experience an "aura" or feel odd sensations before the seizure occurs, and this can serve as a warning to a patient to move away from the trigger stimulus.
 The visual trigger for a seizure is generally cyclic, forming a regular pattern in time or space. Flashing lights (such as strobe lights) or rapidly changing or alternating images (as in clubs, around emergency vehicles, near overhead fans, in action movies or television programs, etc.) are examples of patterns in time that can trigger seizures, and these are the most common triggers. Static spatial patterns such as stripes and squares may trigger seizures as well, even if they do not move. In some cases, the trigger must be both spatially and temporally cyclic, such as a certain moving pattern of bars.
 Several characteristics are common in the trigger stimuli of many people with PSE. The patterns are usually high in luminance contrast (bright flashes of light alternating with darkness, or white bars against a black background). Contrasts in colour alone (without changes in luminance) are rarely triggers for PSE. Some patients are more affected by patterns of certain colours than by patterns of other colours. The exact spacing of a pattern in time or space is important and varies from one individual to another: a patient may readily experience seizures when exposed to lights that flash seven times per second, but may be unaffected by lights that flash twice per second or twenty times per second. Stimuli that fill the entire visual field are more likely to cause seizures than those that appear in only a portion of the visual field. Stimuli perceived with both eyes are usually much more likely to cause seizures than stimuli seen with one eye only (which is why covering one eye may allow patients to avoid seizures when presented with visual challenges). Some patients are more sensitive with their eyes closed; others are more sensitive with their eyes open.
 Sensitivity is increased by alcohol consumption, sleep deprivation, illness, and other forms of stress.
 Television has traditionally been the most common source of seizures in PSE. For people with PSE, it is especially hazardous to view television in a dark room, at close range, or when the television is out of adjustment and is showing a rapidly flickering image (as when the horizontal hold is incorrectly adjusted on analog television sets). Modern digital television sets that cannot be maladjusted in this way and which refresh the image on the screen at very high speed present less of a risk than older, analogue television sets.
 Some people with PSE, especially children, may exhibit an uncontrollable fascination with television images that trigger seizures, to such an extent that it may be necessary to physically keep them away from television sets. Some people (particularly those with cognitive impairments, although most people with PSE have no such impairments) self-induce seizures by waving their fingers in front of their eyes in front of bright light or by other means.
 UK television broadcasters require all screen content to pass an Automated PSE and QC test. Previously, the Harding FPA Test was used to assess content, however this has been replaced by software such as BATON or Vidchecker. Ofcom regularly updates their definition of a flashing sequence. This is an objective standard of assessment of potential to trigger seizures in the susceptible population. This test is not currently required internationally. An automated file-QC system like BATON implements algorithms to detect PSE levels based on the restrictions described in ITU-R BT.1702, Ofcom, and NAB-J guidelines. The recent versions of BATON support Ofcom, NAB-J, ITU-T BT. 1702 (2005 and ITU-R BT. 1702 (2018), there are plans to support ITU BT.1702-2 (10/2019) as well in the upcoming release.[citation needed]
 When functioning correctly, mains-powered fluorescent lighting has a flicker rate sufficiently high (twice the mains frequency, typically 100 Hz or 120 Hz) to reduce the occurrence of problems. However, a faulty fluorescent lamp can flicker at a much lower rate and trigger seizures.[medical citation needed] Newer high-efficiency compact fluorescent lamps (CFL) with electronic ballast circuits operate at much higher frequencies (10–20 kHz) not normally perceivable by the human eye, though defective lights can still cause problems.[medical citation needed]
 Diagnosis may be made by noting the correlation between exposure to specific visual stimuli and seizure activity. More precise investigation can be carried out by combining an EEG with a device producing intermittent photic stimulation (IPS). The IPS device produces specific types of stimuli that can be controlled and adjusted with precision. The testing physician adjusts the IPS device and looks for characteristic anomalies in the EEG, such as photoparoxysmal response (PPR), that are consistent with PSE and/or may herald the onset of seizure activity. The testing is halted before a seizure actually occurs.
 Sometimes diagnostic indicators consistent with PSE can be found through provocative testing with IPS, and yet no seizures may ever occur in real-life situations. Many people will show PSE-like abnormalities in brain activity with sufficiently aggressive stimulation, but they never experience seizures and are not considered to have PSE.
 No cure is available for PSE, although the sensitivity of some people may diminish over time. Medical treatment is available to reduce sensitivity, with sodium valproate being commonly prescribed. Patients can also learn to avoid situations in which they might be exposed to stimuli that trigger seizures and/or take steps to diminish their sensitivity (as by covering one eye) if they are unavoidably exposed. These actions together can reduce the risk of seizures to almost zero for many PSE patients.
 PSE affects approximately one in 4,000 people, or 5% of individuals with epilepsy. It is more common in women and people who are younger.
 A law requiring PSE warnings be displayed on packages and stores was proposed by the State of New York.[failed verification – see discussion]
 The first case of epileptiform seizures related to a video game was reported in 1981. Since then, "many cases of seizures triggered by video games were reported, not only in photosensitive, but also in nonphotosensitive children and adolescents with epilepsy... Specific preventive measures concerning the physical characteristics of images included in commercially available video games (flash rate, choice of colours, patterns, and contrast) can lead in the future to a clear decrease of this problem." Risks can be reduced through measures such as keeping a safe distance away from the screen (at least 2 meters).
 While computer displays in general present very little risk of producing seizures in PSE patients (much less risk than that presented by television sets), video games with rapidly changing images or highly regular patterns can produce seizures, and video games have increased in importance as triggers as they have become more common. Some people with no prior history of PSE may first experience a seizure while playing a video game. Often the sensitivity is very specific, e.g., it may be a specific scene in a specific game that causes seizures, and not any other scenes. Despite this, there are questions on the dangers of this, and calls for testing all video games for causing PSE.
 As with video games, rapidly changing images or highly regular patterns such as flashing banner ads or irregular fonts can trigger seizures in people with photosensitive epilepsy. Two sets of guidelines exist to help web designers produce content that is safe for people with photosensitive epilepsy:
 Photosensitive epilepsy was again brought to public attention in December 1997 when the Pokémon episode "Dennō Senshi Porygon" ("Cyber Soldier Porygon") was broadcast in Japan, showing a sequence of flickering images that triggered seizures simultaneously in hundreds of susceptible viewers (although 12,000 children reported symptoms which may be attributable to mass hysteria).
 In March 1997, the 25th episode of an anime series called YAT Anshin! Uchū Ryokō caused a similar incident, when a reported four children were taken to hospitals by ambulances after viewing a scene with red and white flashing colours.
 In March 2008, the Anonymous group of hackers was claimed to be behind an attack on a forum for people with epilepsy. The Anonymous hackers in turn blamed the Church of Scientology for the attacks, saying they were falsified to hurt Anonymous' image. The attacks first consisted of GIF images flashing at high speeds that were hidden in discussion threads with innocuous-sounding titles. Later attacks redirected web browsers to a page with "a more complex image designed to trigger seizures in both photosensitive and pattern-sensitive epileptics." The technology website Wired News considered it to be "possibly the first computer attack to inflict physical harm on the victims".
 An animated segment of a film promoting the 2012 Summer Olympics was blamed for triggering seizures in people with photosensitive epilepsy. The charity Epilepsy Action received telephone calls from people who had seizures after watching the film on television and online. In response, the London 2012 Olympic Committee removed the offending segment from its website.
 In December 2016, Newsweek journalist Kurt Eichenwald, who has epilepsy, reportedly had a seizure after an internet troll intentionally sent him a flashing GIF via Twitter. Three months later, the user behind the GIF was arrested and charged with cyberstalking.
 The 2018 Pixar film Incredibles 2 contains scenes with flashing lights starting about an hour into the film, in which a villain called the Screenslaver hypnotizes other characters. After concerns over possible triggering of seizures due to this scene, theatres posted warnings for audiences with this condition.
 Cyberpunk 2077, a video game released in December 2020, contains a "braindance" sequence with red and white flashing lights which reportedly resembles the patterns produced by medical devices used to intentionally trigger seizures. Liana Ruppert, a journalist for Game Informer who has photosensitive epilepsy, experienced a grand mal seizure while reviewing the game days before its release. After criticism from epilepsy advocacy groups that the game's disclaimers were insufficient, CD Projekt Red announced work on a fix and later patched the effect to be less likely seizure-inducing.