The invention relates to an optical fiber presenting a core, cladding, and a
grating written by irradiation and coupling at least one light mode into the cladding
so that it is dissipated therein. The invention proposes causing the mean index
to vary progressively along the grating, at least at the ends of the grating. The
progressive variation in mean index or in the amplitude of index modulation for
writing the grating serves to limit insertion losses to the filter formed by the
grating. Analogously, in a written-in grating, the invention provides the equivalent
of progressively varying the core size of the fiber for interconnecting two optical
fibers presenting different core diameters. The invention is applicable in particular
to gain-equalizing filters in WDM transmission systems.