I think I screwed something up when selecting data from a fits file...Basically what I did was:
File='/SomePath/xxx.fits'
hdulist=fits.open(File)
tbdata=hdulist[1].data
and applied a selection rule:
for i in range (0, len(tbdata)):
if tbdata[i]['z']<0.2:
A.append(tbdata[i])
Is there any way to recombine the data in A into a new fits file? I tried manipulations using Pandas but can't find the right method...