  The near-infrared calibration unit (NI-CU) on board Euclid's Near-Infrared
Spectrometer and Photometer (NISP) is the first astronomical calibration lamp
based on light-emitting diodes (LEDs) to be operated in space. Euclid is a
mission in ESA's Cosmic Vision 2015-2025 framework, to explore the dark
universe and provide a next-level characterisation of the nature of
gravitation, dark matter, and dark energy. Calibrating photometric and
spectrometric measurements of galaxies to better than 1.5% accuracy in a survey
homogeneously mapping ~14000 deg^2 of extragalactic sky requires a very
detailed characterisation of near-infrared (NIR) detector properties, as well
their constant monitoring in flight. To cover two of the main contributions -
relative pixel-to-pixel sensitivity and non-linearity characteristics - as well
as support other calibration activities, NI-CU was designed to provide
spatially approximately homogeneous (<12% variations) and temporally stable
illumination (0.1%-0.2% over 1200s) over the NISP detector plane, with minimal
power consumption and energy dissipation. NI-CU is covers the spectral range
~[900,1900] nm - at cryo-operating temperature - at 5 fixed independent
wavelengths to capture wavelength-dependent behaviour of the detectors, with
fluence over a dynamic range of >=100 from ~15 ph s^-1 pixel^-1 to >1500 ph
s^-1 pixel^-1. For this functionality, NI-CU is based on LEDs. We describe the
rationale behind the decision and design process, describe the challenges in
sourcing the right LEDs, as well as the qualification process and lessons
learned. We also provide a description of the completed NI-CU, its capabilities
and performance as well as its limits. NI-CU has been integrated into NISP and
the Euclid satellite, and since Euclid's launch in July 2023 has started
supporting survey operations.
