I'm new to python implementation and would like to do the following process.
Read a set of data from .fits files, go through all of them (a few hundred .fits files) and present in a dataframe (preferably) the following HEADERS: File, IMAGE, OBJECT, FILTER, EXPTIME, DATE-OBS, RA and DEC
This dataframe must display the Headers selected from all headers in the dataset.
Below is the block I made manually and typing the values directly. This is clearly not feasible when we are working with hundreds of files
import pandas as pd
df = pd.DataFrame({'File':["Bias","Flat","F0A","VOph","VOSgr1","VOSgr2","V6OSgr1", "VZSR1", "VZSR2"],
'IMAGE':["Bias_0.fits","FlatB_0.fits","FOAqrR1_0.fits","V2051OphR1_0.fits","V4140SgrR1_0.fits",
"V4140SgrR2_0.fits","617SgrR1_0.fits","foco_008.fits","VZSclR2_0.fits"],
'OBJECT':["Bias","Flat","FO Aqr","V2051 Oph","V4140 Sgr","V4140 Sgr","V617 Sgr","VZ Scl","VZ Scl"],
'FILTER':["Dark","B","B","B","B","B","B", "B", "B"],
'EXPTIME':[(1,00000),(7,00000),(10,00000),(20,00000),(20,00000),(20,00000),(10,00000),(20,00000),(20,00000)],
'DATE-OBS':["2018-09-11T21:33:05.129", "2018-09-11T21:42:12.854", "2018-09-11T23:04:28.561",
"2018-09-11T21:52:46.914", "2018-09-11T22:37:46.847", "2018-09-12T00:04:03.136",
"2018-09-12T00:26:25.792", "2018-09-12T01:15:04.282", "2018-09-12T05:05:14.991"],
'RA':["16:04:36", "16:04:36", "22:17:55", "17:08:19", "19:58:50", "19:58:50", "18:07:51", "23:50:09","23:50:09"],
'DEC':["-37:51:47", "-37:51:47", "-08:21:0", "-25:48:32", "-38:56:13", "-38:56:13", "-35:10:25",
"-26:22:5", "-26:22:53"]})
That is, I need to read each of the .fits of the dataset, and present the values of each head that I mentioned in a single dataframe
I only know how to do it manually, that is, presenting the data directly, my need is for this process to be done automatically, reading the .fits files individually, and printing the 8 headers that I mentioned for each of these files, where everything must appear in a single table or dataframe that I can traverse through the data.