def METHOD_NAME(spectra,calibration_wavelengths,center_wavelength = None,debug =0):
	'''
	spectra: spectra taken at same position (center wavelength) but with different incident laser wavelengths
	calibration_wavelengths - the wavelengths of the laser
	'''
	xs = peak_positions = [np.argmax(s) for s in spectra]
	ys = calibration_wavelengths
	#assuming that this is linear in the give pixel range
	[gradient, offset] = least_squares(xs,ys)
	if debug > 0:
		fig, ax = plt.subplots(1)
		ax.plot(xs,ys,'x',label="data")
		ax.plot(xs,gradient*np.array(xs) + offset,label="linear fit")
		ax.set_xlabel("Pixel index")
		ax.set_ylabel("Wavelength [nm]")
		ax.set_title("Pixel position vs Wavelength\n Center wavelength: {0}".format(center_wavelength))
		plt.show()
	return gradient, offset