read_header_keywords_lisobs

raccoon.fitsutils.read_header_keywords_lisobs(lisobs, kws, notfound=nan, ext=0, names=None, index=None)

Read keywords in kws from FITS header for the observations in lisobs.

Parameters:
lisobslist of str or list of astropy header object (astropy.io.fits.header.Header)

List of the FITS files from which to read the header or list of astropy header objects (faster if header already loaded before). If it is a header object, the parameter ext is not used.

kwsstr or list-like
notfoundany (default np.nan)

Value to write in the output if the keyword is not found in the header.

extint, str (default 0)

Extension of the FITS from which to get the header.

namesdict

Names for the output dictionary keys, to substitute the original header keywords. E.g. names={‘oldk: ‘newk}. Must contain all the keywords in kws. If not a dictionary or old keywords not correct, no change is made.

indexlist-like

Used if want the returned dataframe to have a specific index. If None and list of observations provided, index will be the observations names (path + file name). If None and headers provided, index will be numeric.

Returns:
datapandas dataframe

Index: lisobs, Columns: kws