def METHOD_NAME(pacton,file,y_roi,center_wavelength,exposure_time,show_= False, debug = 0, laser_wavelength = None):
	if debug > 0:
		print("y_roi",y_roi)
		print("center_wavelength",center_wavelength)
		print("exposure_time",exposure_time)
	spectrum_group = file.require_group("spectrum")
	#run calibration to get rid of low pixel value high intensity peaks due to camera response
	#get spectrum, drop interpolated wavelengths - they are wrong!
	[ymin,ymax] = y_roi
	xmin,xmax = [0,1024] #default to be over entire range!
	roi = [xmin,xmax,ymin,ymax]
	if debug > 0: print("Fiddling with exposure...")
	previous_exposure_time = pacton.pixis.GetExposureTime()
	pacton.pixis.SetExposureTime(exposure_time)
	if debug > 0: print("Getting spectrum...")
	spectrum,_ = pacton.METHOD_NAME(center_wavelength=center_wavelength,roi=roi)
	pacton.pixis.SetExposureTime(previous_exposure_time)
	pixel_indices = np.arange(0,1014)
	if debug > 0: print("Starting wavelength map...") 
	wavelengths = [mapper(center_wavelength,i) for i in pixel_indices]
	if laser_wavelength is not None:
		raman_shifts = [nm_to_raman_shift(laser_wavelength=laser_wavelength,wavelength=wl) for wl in wavelengths]
	attrs = {
		"wavelengths":wavelengths,
		"raman_shift": raman_shifts,
		"center_wavelength":center_wavelength,
		"roi":roi,
		"exposure_time[ms]": exposure_time
	}
	if debug > 0: print("writing data...")
	spectrum_group.create_dataset("series_%d",data=spectrum,attrs=attrs)
	if show_ == True:
		if laser_wavelength is None:
			fig, ax =plt.subplots(1)
			ax.plot(wavelengths,spectrum)
			ax.set_xlabel("wavelength [nm]")
			ax.set_ylabel("intensity [a.u.]")
		elif laser_wavelength is not None:
			fig, [ax1,ax2] = plt.subplots(2)
			ax1.plot(wavelengths,spectrum)
			ax2.plot(raman_shifts,spectrum)
			ax1.set_xlabel("wavelength [nm]")
			ax1.set_ylabel("intensity [a.u.]")
			ax2.set_xlabel("raman shift [$cm^{-1}$]")
			ax2.set_ylabel("intensity [a.u.]")
		plt.show()