def parse_hdr(header):
	"""
	parse_hdr(header)

	Helper function that returns spectral WCS keywords from a FITS header.

	Inputs:
	  header - FITS header

	Outputs:
	  list containing crval, crpix, cd, and a flag indicating whether the
	    wavelength is in lambda or log-lambda coordinates.
	"""
	crval = header['crval1']
	try:
		crpix = header['crpix1']
	except:
		crpix = 1
	log = 0
	try:
		cd = header['cd1_1']
	except:
		cd = header['cdelt1']
	try:
		log = header['dc-flag']
	except:
		try:
			tmp = header['WFITTYPE']
			if tmp=='LOG_LINEAR':
				log = 1
		except:
			pass 
	return [crval,crpix,cd,log]