def METHOD_NAME(filename, da):
    """
    filename (str)
    da (DataArray of shape C11YX)
    """
    logging.debug("Will export data of shape %s to %s", da.shape, filename)
    # Get the metadata
    spectrum_range, unit = spectrum.get_spectrum_range(da)
    pxs = da.metadata.get(model.MD_PIXEL_SIZE, (1, 1))
    # Remove useless dimensions -> CYX
    da = da[:, 0, 0, :, :]
    with open(filename, 'w') as fd:
        csv_writer = csv.writer(fd)
        csv_writer.writerow(["wavelength (%s)" % unit, "X (m)", "Y (m)", "intensity"])
        # Y
        for iy in range(da.shape[-2]):
            # X
            for ix in range(da.shape[-1]):
                # Wavelength
                for wl, data in zip(spectrum_range, da[:, iy, ix]):
                    csv_writer.writerow([wl, ix * pxs[0], iy * pxs[1], data])