code: def cf_photosic_reference(X: np.ndarray) -> float:
      """vector X is only the thicknesses of each layers, because the materials (so the epislon)
      are imposed by the function. This is similar in the chirped function.
      """
      lam_min = 375
      lam_max = 750
      n_lam = 100
      theta = 0 * np.pi / 180
      vlam = np.linspace(lam_min, lam_max, n_lam)
      scc = np.zeros(n_lam)
      Ab = np.zeros(n_lam)
      for k in range(n_lam):
          lam = vlam[k]
          epsilon = np.array([1, 2, 3, epscSi(lam)], dtype=complex)
          mu = np.ones(epsilon.size)
          type_ = np.append(
              0,
              np.append(np.tile(np.array([1, 2]), int(X.size / 2)), 3),
          )
          hauteur = np.append(0, np.append(X, 30000))
          pol = 0
          absorb = absorption(
              lam, epsilon, mu, type_, hauteur, pol, theta
          )
          scc[k] = solar(lam)
          Ab[k] = absorb[len(absorb) - 1]
      max_scc = np.trapz(scc, vlam)
      j_sc = np.trapz(scc * Ab, vlam)
      CE = j_sc / max_scc
      cost = 1 - CE
      return cost
  
file_path: nevergrad/nevergrad/functions/photonics/photonics.py
imports: import typing
  from pathlib import Path
  import numpy
  from scipy.linalg import toeplitz
label_desc: Use image node_id 14 for calling a global function with example usage: cf_photosic_reference(X) and returns: cost