The "sp" files (eg. spBest.sample8.fits) contains the spectroscopic information for each tiled target, if it exists. It contains all zeroes if the information does not exist.
These files are created based on the spectroscopic results posted on sdssdata at Princeton. The choice to use the Princeton results is solely a matter of convenience: they are posted in uniform fits format in a consistent place, which makes my life easy. My understanding is that the "official" results and the Princeton results differ only in small ways. The redshift errors in each set occur in somewhat different ways, but for galaxy targets it really is not a big issue. I will be happy to switch to the official survey results when/if someone makes those reductions are available in a timely and easy-to-use fashion.
I make the list unique by grouping the spectra using a 0.5 arcsec linking length and picking the highest signal-to-noise successful redshift in each group. This gets rid of QA duplicates as well as accidental duplicates.
Then I match it to the tsObj files. Entries are made for all tsObj tiled targets; when spectroscopic data is not available all zeros are entered. Spectra for non-tiled targets (ie. which do not correspond to entries in the tsObj files here) are appended to the end of the file.
For reference, here is the fits header:
XTENSION= 'BINTABLE' /Binary table written by MWRFITS BITPIX = 8 /Required value NAXIS = 2 /Required value NAXIS1 = 373 /Number of bytes per row NAXIS2 = 252134 /Number of rows PCOUNT = 0 /Normally 0 (no varying arrays) GCOUNT = 1 /Required value TFIELDS = 49 /Number of columns in table COMMENT COMMENT *** Column formats *** COMMENT TFORM1 = 'J ' / TFORM2 = 'J ' / TFORM3 = 'J ' / TFORM4 = 'J ' / TFORM5 = '5J ' / TFORM6 = '19A ' / TFORM7 = 'E ' / TFORM8 = 'E ' / TFORM9 = '6A ' / TFORM10 = '10A ' / TFORM11 = 'E ' / TFORM12 = 'E ' / TFORM13 = 'E ' / TFORM14 = 'J ' / TFORM15 = 'E ' / TFORM16 = '22A ' / TFORM17 = '10J ' / TFORM18 = 'J ' / TFORM19 = 'E ' / TFORM20 = 'E ' / TFORM21 = 'E ' / TFORM22 = 'E ' / TFORM23 = 'E ' / TFORM24 = 'E ' / TFORM25 = 'J ' / TFORM26 = 'E ' / TFORM27 = '10E ' / TFORM28 = '5E ' / TFORM29 = '5E ' / TFORM30 = '5E ' / TFORM31 = 'J ' / TFORM32 = 'J ' / TFORM33 = 'E ' / TFORM34 = 'E ' / TFORM35 = 'E ' / TFORM36 = 'E ' / TFORM37 = 'E ' / TFORM38 = 'E ' / TFORM39 = 'J ' / TFORM40 = 'J ' / TFORM41 = 'J ' / TFORM42 = 'J ' / TFORM43 = 'J ' / TFORM44 = 'J ' / TFORM45 = 'J ' / TFORM46 = 'J ' / TFORM47 = 'J ' / TFORM48 = 'J ' / TFORM49 = 'J ' / COMMENT COMMENT *** Column Names *** COMMENT TTYPE1 = 'PLATE ' / TTYPE2 = 'TILE ' / TTYPE3 = 'MJD ' / TTYPE4 = 'FIBERID ' / TTYPE5 = 'OBJID ' / TTYPE6 = 'OBJTYPE ' / TTYPE7 = 'PLUG_RA ' / TTYPE8 = 'PLUG_DEC ' / TTYPE9 = 'CLASS ' / TTYPE10 = 'SUBCLASS ' / TTYPE11 = 'Z ' / TTYPE12 = 'Z_ERR ' / TTYPE13 = 'RCHI2 ' / TTYPE14 = 'DOF ' / TTYPE15 = 'RCHI2DIFF ' / TTYPE16 = 'TFILE ' / TTYPE17 = 'TCOLUMN ' / TTYPE18 = 'NPOLY ' / TTYPE19 = 'THETA ' / TTYPE20 = 'VDISP ' / TTYPE21 = 'VDISP_ERR ' / TTYPE22 = 'WAVEMIN ' / TTYPE23 = 'WAVEMAX ' / TTYPE24 = 'WCOVERAGE ' / TTYPE25 = 'ZWARNING ' / TTYPE26 = 'SN_MEDIAN ' / TTYPE27 = 'FRACNSIGMA ' / TTYPE28 = 'COUNTS_SPECTRO ' / TTYPE29 = 'COUNTS_SYNTH ' / TTYPE30 = 'COUNTS_SKY ' / TTYPE31 = 'ANYANDMASK ' / TTYPE32 = 'ANYORMASK ' / TTYPE33 = 'SPEC1_G ' / TTYPE34 = 'SPEC1_R ' / TTYPE35 = 'SPEC1_I ' / TTYPE36 = 'SPEC2_G ' / TTYPE37 = 'SPEC2_R ' / TTYPE38 = 'SPEC2_I ' / TTYPE39 = 'RUN ' / TTYPE40 = 'CAMCOL ' / TTYPE41 = 'RERUN ' / TTYPE42 = 'FIELD ' / TTYPE43 = 'PARENT ' / TTYPE44 = 'ID ' / TTYPE45 = 'NCHILD ' / TTYPE46 = 'OBJC_TYPE ' / TTYPE47 = 'CATID ' / TTYPE48 = 'PRIMTARGET ' / TTYPE49 = 'SECTARGET ' / COMMENT COMMENT *** End of required fields *** COMMENT END