# Section 1. Overview

The Large Sky Area Multi-Object Fiber Spectroscopic Telescope (LAMOST) is a Chinese national scientific research facility operated by the National Astronomical Observatories, Chinese Academy of Sciences. It is a special reflecting Schmidt telescope with 4000 fibers in a field of view of 20 deg2 in the sky. Since October 2018, LAMOST started the second stage survey program (LAMOST II), which contains both low- and medium-resolution spectroscopic surveys. LAMOST II takes about 50% nights (dark/gray nights) to continue the previous low-resolution spectroscopic survey, and another 50% nights (bright/gray nights) to conduct the medium-resolution survey (MRS)[1]. For LAMOST MRS, it includes two surveys, i.e., the time-domain and the non time-domain surveys. The main purpose of the time-domain survey is to investigate variable targets, which were repeatedly observed in several observation night, but targets of the non time-domain survey were observed only in one night in general.

This time, 11,410,538 single exposure spectra and 2,964,755 coadded spectra were obtained during the commissioning survey this time, which were written into 1,529,570 FITS files. Different from the low-resolution spectroscopic survey (LSR), all single exposure and coadd spectra were published for the MRS. For the non time-domain survey, there are totally 1,008,710 coadded spectra published, and for the time-domain survey 2,878,717 single exposure spectra were released. The data products of this data release can be available from the website http://dr7.lamost.org/v1.2/, and they include：

1. Spectra. - For a target of MRS, we can get two spectra within an exposure, including a blue (B) and a red (R) band spectrum, and their wavelength ranges are [4950 Å, 5350 Å] and [6300 Å, 6800 Å], respectively. Generally, each object was observed several times, and we would obtain the coadded B and R band spectra by combing the single exposure spectra. Few targets, however, lack of the spectral data of either band for some reason like the wavelength calibration, only one even no coadded spectra exists in their FITS file. For single exposure and coadd spectra, they both have a resolution of 7500 respectively at 5163 Å (blue) and 6593 Å (red).

2. Spectroscopic Parameter Catalogs. - In this data release, four spectroscopic parameter catalogs are published, and they are the LAMOST MRS General Catalog, the LAMOST MRS Parameter Catalog, the LAMOST MRS Observed Plate Information Catalog, and the LAMOST MRS Input Catalog, respectively. There are 33 basic spectroscopic parameters (such as right ascension, declination, signal to noise ratio (S/N), magnitude, and so on), eight radial velocities, eight radial velocity uncertainties, and three radial velocity flags included in the LAMOST MRS General Catalog, and it also provides two flags to determine whether a B or R band spectrum is problematic. In addition to 33 basic parameters, radial velocities, radial velocity uncertainties, and radial velocity flags mentioned above, the LAMOST MRS Parameter Catalog also provides atmospheric parameters (effective temperature, surface gravity, and metallicity), projected rotation velocity, and their uncertainties, which were estimated by the LAMOST Stellar Parameter pipeline (LASP), and alpha element abundance, atmospheric parameters, and 12 individual element abundances given by the label-transfer method based on a convolutional neural network (CNN). The LAMOST MRS Input Catalog includes 24 basic parameters mentioned above, and three parameters not in other catalogs, i.e., ‘unitid’, ‘epoch’, and ‘tname’. The LAMOST MRS Observed Plate Information Catalog provides nine parameters for each plate of MRS survey, for example, dome seeing.

In the following section 2, we introduce the released FITS file in detail, and present four parameter catalogs in section 3.

# Section 2. FITS File

## 2.1 Designation

In this data release, 1,529,570 FITS files are published on-line which include 11,422,346 single exposure spectra and 2,968,667 coadded spectra, and they are named in the form of ‘med-MMMMM-YYYY_spXX-FFF.fits’. ‘MMMMM’, ‘YYYY’, ‘XX’, and ‘FFF’ represent the local modified Julian day (LMJD), which is a non-negative integer, the plan identity string (PLANID), the spectrograph identity number which is between 1 and 16, and the fiber identity number which is in the range of 1 to 250, respectively.

## 2.2 Structure

For each of LAMOST targets, it has m (m <= n) B band and t (t <= n) R band single exposure spectra if it has n time exposures. If m and t are all larger than 0, the target has a B band and a R band coadded spectra, but no coadded spectrum is provided in the FITS file if at least one of m and n is equal to 0.

In a LAMOST median resolution (MR) FITS file, extension 0 is the primary HDU which is not followed by a primary data array, and extension 1 and 2 restore the coadded B and R band spectra, respectively. For extensions from 3 to m + 2, they save the information of m B band spectra obtained within n time exposures, and they are named as‘B-lmjm’, where ‘lmjm’ is the local modified Julian minutes at the beginning of each exposure. For following extensions from m+3 to m+t+2, t R band spectra of n time exposures are stored, and they are called as ‘R-lmjm’.

In following section 2.3, 2.4 and 2.5, we introduce the primary extension, extension 1 and 2, and other single exposure extensions.

## 2.3 Primary Extension

In this section, we describe the primary extension. Not like the low resolution FITS file, this extension of MR FITS file only has a file header, and it do not have following data array.

In the header file, we divided keywords into seven groups, and they are mandatory keywords, file information keywords, telescope parameter keywords, observation parameter keywords, spectrograph parameter keywords, weather condition keywords, and data reduction parameters keywords, respectively. We will explain keywords of each group from subsection 2.3.1 to 2.3.7.

### 2.3.1 Mandatory Keywords

Mandatory keywords are required in every Header Data Unit (HDU), and their value must be written in fixed format.

SIMPLE  =                    T /Primary Header created by MWRFITS v1.11b
BITPIX  =                   16 /
NAXIS   =                    0 /
EXTEND  =                    T /Extensions may be present  

SIMPLE Keyword --- It is required to be the first keyword in the primary header of all FITS file. The value field shall contain a logical constant with the value T if the file conforms to this standard. This keyword is mandatory for the primary header and is not permitted in extension headers. A value of F signifies that the file does not conform to this standard.

BITPIX Keyword --- The value field shall contain an integer, and it shall specify the number of bits that represent a data value. A value of -32 represents IEEE single precision floating point.

NAXIS Keyword --- The value field shall contain a non-negative integer no greater than 999, representing the number of axes in the associated data array. A value of zero signifies that no data follow the header in the HDU.

EXTEND Keyword --- The value field shall contain a logical value indicating whether the FITS file is allowed to contain conforming extensions following the primary HDU. This keyword may only appear in the primary header and must not appear in an extension header. If the value field is T then there may be conforming extensions in the FITS file following the primary HDU. This keyword is only advisory, so its presence with a value T does not require that the FITS file contains extensions, nor does the absence of this keyword necessarily imply that the file does not contain extensions.

### 2.3.2 File Information Keywords

FILENAME= 'med-58120-NGC228101_sp08-178.fits' /
OBSID   =            624608178 / Unique number ID of this spectrum
AUTHOR  = 'LAMOST Pipeline'    / Who compiled the information
DATA_V  = 'LAMOST DR7'   / Data release version
N_EXTEN =                    9 / The extension number
EXTNAME = 'Information'        / The extension name
ORIGIN  = 'NAOC-LAMOST'        / Organization responsible for creating this file
DATE    = '2020-02-19T12:54:18' / Time when this HDU is created (UTC)

FILENAME Keyword --- The value field shall contain a character string giving the name of this FITS file. Take the ‘med-58025-HIP507401_sp02-017.fits’ as an example. ‘58025’ is the local modified Julian day, ‘HIP507401’ is the plan ID, ‘sp02’ is the spectrograph ID, and ‘017’ is the Fiber ID.

OBSID Keyword --- The value field shall a non-negative integer giving the number ID of this spectrum.

AUTHOR Keyword --- This keyword contains a string constant ‘LAMOST Pipline’, which represents the author who produce this file.

DATA_V Keyword --- This keyword contains a string constant, which represents the data release version.

N_EXTEN Keyword --- The value field shall contain an integer giving the extension number of a FITS file.

EXTNAME Keyword --- This keyword contains a character string to be used to distinguish among different extensions of the same type in A FITS file. Within this context, the primary array should be considered as equivalent to an IMAGE extension.

ORIGIN Keyword --- This ORIGIN keyword contains a string constant ‘NAOC-LAMOST’, which indicates the Organization responsible for this FITS file. ‘NAOC’ represents the abbreviation of National Astronomical Observatories, Chinese Academy of Sciences.

DATE Keyword --- The value field shall contain a character string giving the UTC time when this FITS file is created.

### 2.3.3 Telescope Parameter Keywords

TELESCOP= 'LAMOST  '           / GuoShouJing Telescope
LONGITUD=               117.58 / [deg] Longitude of site
LATITUDE=                40.39 / [deg] Latitude of site
FOCUS   =                19964 / [mm] Telescope focus
CAMPRO  = 'NEWCAM  '           / Camera program name
CAMVER  = 'v2.0    '           / Camera program version


TELESCOP Keyword --- This keyword contains a string constant ‘LAMOST’ giving the name of our telescope.

LONGITUD Keyword --- The keyword contains a floating-point constant, which provide the longitude of Xinglong station where LAMOST is mounted on.

LATITUDE Keyword --- The keyword contains a floating-point constant, which provide the latitude of Xinglong station.

FOCUS Keyword --- The FOCUS keyword gives the telescope focus, and its unit is millimeter.

CAMPRO Keyword --- The value field contain a string constant ‘NEWCAM’, which shows the name of camera.

CAMVER Keyword --- The value field contain a character string, which gives the present camera program version.

### 2.3.4 Observation Parameter Keywords

DATE -OBS= '2018-01-01T15:21:00' / The observation median UTC
DATE-BEG= '2018-01-01T23:03:26.0' / The observation start local time
DATE-END= '2018-01-01T23:40:15.0' / The observation end local time
LMJD    =                58120 / Local Modified Julian Day
MJD     =                58119 / Modified Julian Day
PLANID  = 'NGC228101'          / Plan ID in use
RA      =           103.398334 / [deg] Right ascension of object
DEC     =            40.626064 / [deg] Declination of object
RA_OBS  =           103.398334 / [deg] Right ascension during observing
DEC_OBS =            40.626064 / [deg] Declination during observing
OFFSET  =                    F / Whether there's a offset during observing
OFFSET_V=                 0.00 / Offset value in arcsecond
GL      =           175.724039 / [deg] Galactic longitude of object
GB      =            17.653158 / [deg] Galactic latitude of object
DESIG   = 'LAMOST J065335.60+403733.8' / Designation of LAMOST target
FIBERID =                  178 / Fiber ID of Object
CELL_ID = 'F2217   '           / Fiber Unit ID on the focal plane
X_VALUE =             -191.336 / [mm] X coordinate of object on the focal plane
Y_VALUE =              398.645 / [mm] Y coordinate of object on the focal plane
OBJNAME = 'UCAC4_654-044946'   / Name of object
OBJTYPE = 'STAR    '           / Object type from input catalog
TSOURCE = 'LAMOST  '           / Name of input catalog
TCOMMENT= '        '           / Target information
TFROM   = '        '           / Target catalog
FIBERTYP= 'Obj     '           / Fiber type of object
FIBERMAS=                    0 / Bitmask of warning values, 0 means all is well
MAGTYPE = 'JHKVGRI '           / Magnitude type of object
MAG1    =                11.17 / [mag] Mag1 of object
MAG2    =                10.91 / [mag] Mag2 of object
MAG3    =                10.88 / [mag] Mag3 of object
MAG4    =                12.27 / [mag] Mag4 of object
MAG5    =                12.50 / [mag] Mag5 of object
MAG6    =                12.10 / [mag] Mag6 of object
MAG7    =                12.04 / [mag] Mag7 of object
OBS_TYPE= 'OBJ     '           / The type of target (OBJ, FLAT, ARC or BIAS)
OBSCOMM = 'Science '           / Science or Test
RADECSYS= 'FK5     '           / Equatorial coordinate system
EQUINOX =              2000.00 / Equinox in years
SKYLIST = 'skylines.dat'       / Sky emission line list
NEXP_B  =                    3 / Number of valid blue exposures
COMBIN_B=                    T / Whether the combined data of B band exists
NEXP_R  =                    3 / Number of valid red exposures
COMBIN_R=                    T / Whether the combined data of R band exists
SCAMEAN =                41.53 / [ADU] Mean level of scatter light


DATE-OBS Keyword --- The value field shall contain a character string, which gives the median moment UTC of multiple exposures.

DATE-BEG Keyword --- The value field shall contain a character string giving the observation start Beijing Time.

DATE-END Keyword --- The value field shall contain a character string, which provide the observation end Beijing Time.

LMJD Keyword --- The value field shall a non-negative integer giving the local modified Julian day.

MJD Keyword --- The value field shall a non-negative integer giving the modified Julian day.

PLANID Keyword --- The value field shall contain a character string providing the plan name of the target.

RA Keyword --- The value field shall contain a non-negative real floating-point number, which gives the right ascension of target from the input catalog.

DEC Keyword --- The value field shall contain a real floating-point number, which gives the declination of target from the input catalog.

RA_OBS Keyword --- The value field shall contain a non-negative real floating-point number, which gives the pointing right ascension of target during observation.

DEC_OBS Keyword --- The value field shall contain a non-negative real floating-point number, which gives the pointing declination of target during observation.

OFFSET Keyword --- The value field shall contain a boolean value (T or F), which indicates if there is a fiber-offset for the target. The fiber-offset usually applied for the very bright stars (r<11) to avoid CCD saturation.

OFFSET_V Keyword --- The value field shall contain a real floating-point number giving the offset value in unit of arcsec.

GL Keyword --- The The value field shall contain a real floating-point number, which gives the galactic longitude of target.

GB Keyword --- The The value field shall contain a real floating-point number, which gives the galactic latitude of target.

DESIG Keyword --- The value field shall contain a character string, which indicates the name of LAMOST target. Like the name of SDSS target, numbers after the character ‘J’ and before ‘+’ represents RA in unit of HMS, and numbers after the character ‘+’ are DEC in unit of DMS.

FIBERID Keyword --- The value field shall contain a non-negative integer between 1 and 250, which shows the fiber ID and shall be used together with the spectrograph ID.

CELL_ID Keyword --- The value field shall contain a character string, which gives the fiber unit ID on the focal plane. LAMOST focal plane is divided into four quadrant named ‘EFGH’ respectively, the first character of this keyword represents the quadrant number, the first two numbers after the first character is the row number in this quadrant, and the next two numbers is the column numbers.

X_VALUE and Y_VALUE Keywords --- The value field shall contain two real floating-point numbers, which give X and Y coordinates of target on the focal plane.

OBJNAME Keyword --- The value field shall contain character string, giving the name ID of object that determined by the RA, DEC and HTM method.

OBJTYPE Keyword --- The value field shall contain a character string giving the class of objects in input catalogs.

TSOURCE Keyword --- The value field shall contain a character string which shows the name of organization or person who submit input catalog.

TCOMMENT Keyword --- The value field shall contain a character string which shows the target ID from SDSS, UCAC4, PANSTAR and other catalogues.

TFROM Keyword --- The value field shall contain a character string which shows input catalog submitted by an organization or a person determined by the TSOURCE.

FIBERTYP Keyword --- The value field shall contain a character string, giving the type of fiber assigned to this target. This keyword has six values, i.e., Obj, Sky, F-std, Unused, PosErr and Dead. Obj means the fiber is assigned to an object, including star, galaxy and so on. Sky indicates that the fiber is allocated to take skylight. F-std shows the fiber is used to take the light of a flux calibration standard star. Unused, PosErr and Dead mean the unused fiber, a wrong fiber position, or out of commission respectively.

FIBERMAS Keyword --- The value field shall contain an integer, which is used to show the problems of fibers. If you want to know the exact problem of a fiber, you should first convert the decimal value of ‘FIBERMAS’ to a nine-bit binary number, which is shown in table 1. If the value of a bit is 1, it represents the fiber has associated problem, and the following table 2 lists the associated fiber problem of each bit.

Table 1: Nine bits of the ‘FIBERMAS’ field

 9 8 7 6 5 4 3 2 1

Table 2: The fiber problems

 Bit Problem Comment 1 NOALLOTTED Fiber not allotted 2 BADTRACE Bad trace from the routine TRACECENTER 3 BADFLAT Low counts in flat field 4 BADARC Bad arc solution 5 MANYBADPIXEL >10% pixels are bad on CCD 6 SATURATED >10% pixels are saturated 7 WHOPPER Whopping fiber 8 NEARWHOPPER Near a whopping fiber 9 BADSKYFIBER Sky fiber shows extreme residuals

MAGTYPE Keyword --- The value field shall contains a character string, which shows the magnitude type of a target.

MAG1, MAG2, MAG3, MAG4, MAG5, MAG6 and MAG7 Keywords --- The value field shall contains a real floating-point number between 0 and 100, giving the associated magnitudes of MAGTYPE keyword. For example, The MAGTYPE keyword is ‘ugrizjh’, the MAG1, MAG2, MAG3, MAG4, MAG5, MAG6 and MAG7 keywords provide the magnitudes of u, g, r, i, z, j and h filter respectively.

OBS_TYPE Keyword --- The value field shall contains a character string giving the type of observation targets, which include object, flat, bias and arc lamp.

OBSCOMM Keyword --- The value field shall contains a character string constant representing the observation purposes , which includes observations used for science researches and kinds of tests.

RADECSYS Keyword --- The value field shall contains a character string giving the equatorial coordinate system based on the J2000 position.

EQUINOX Keyword --- The value field shall contains a real floating-point number giving the standard epoch used at present.

SKYLIST Keyword --- The value field shall contains a character string giving the file name of sky emission line list, which is used in the process of sky subtraction.

NEXP_B and NEXP_R Keywords --- The value field of the two keywords shall contain two non-negative integers, which provide numbers of valid blue and red exposures respectively.

COMBIN_B and COMBIN_R Keywords --- The value field shall contains a boolean value (T or F), which indicates whether the coadded B or R band spectrum exists.

SCAMEAN Keyword --- The value field shall contains a real floating-point giving the mean level of scatter light, which is the average flux of regions where there is no fiber and is at the left and right edge of a two dimension spectra image.

### 2.3.5 Spectrograph Parameters Keywords

SPID    =                    1 / Spectrograph ID
SPRA    =          236.8408024 / [deg] Average RA of this spectrograph
SPDEC   =           12.0844527 / [deg] Average DEC of this spectrograph
SLIT_MOD= 'x2/3    '           / Slit mode, x1, x2/3 or x1/2


SPID Keyword --- The value field shall contains a non-negative integer numbers between 1 and 16, which provides the spectrograph ID.

SPRA and SPDEC Keywords --- The value field of these two keywords shall contain two real floating-point numbers, which are the averages of RA and DEC of all objects in each spectrograph.

SLIT_MOD Keyword --- The value field shall contains a character string of ‘x2/3’, which gives the slit mode and responds spectra resolution of 7500 respectively at 5163 Å (blue) and 6593 Å (red).

### 2.3.6 Weather Condition Keywords

TEMPCCDB=              -112.70 / [deg] The temperature of blue CCD
TEMPCCDR=              -195.90 / [deg] The temperature of red CCD
SEEING  =                 2.60 / [arcsec] Seeing during exposure
MOONPHA =                17.59 / [day] Moon phase for a 29.53 days period
TEMP_AIR= '        '           / [deg] Temperature outside dome
TEMP_FP =                 3.30 / [degree celsius] Temprature of the focalplane
DEWPOINT= '        '           / [deg]
DUST    = '        '           / Reservation
HUMIDITY= '        '           /
WINDD   = '        '           / [deg] Wind direction
WINDS   = '        '           / [m/s] Wind speed
SKYLEVEL= '        '           / Reservation

SEEING Keyword --- The value field shall contain a real floating-point number giving seeing during exposure, which is calculated by manually measuring the full width at half maximum of guide star image.

MOONPHA Keyword --- The value field shall contain a real floating-point number giving the moon phase.

TEMP_AIR Keyword --- The value field shall contain a real floating-point number giving the temperature outside dome, which is measured by automatic weather instrument. The unit ‘degree’ represents centigrade degree.

TEMP_FP Keyword --- The value field shall contain a real floating-point number giving the temperature of focal plane, which is measured by automatic weather instrument. The unit ‘degree’ represents centigrade degree.

DEWPOINT Keyword --- The value field shall contain a real floating-point number giving the dew-point temperature, which is also measured by the automatic weather instrument. The unit ‘degree’ represents centigrade degree.

DUST Keyword --- The value of this keyword is temporarily empty at present, because the dust measuring instrument is now in debugging, and we will write this parameters into fits header when problems are resolved.

HUMIDITY Keyword --- The value field shall contain a real floating-point number between 0 and 1, which gives humidity in the air.

WINDD Keyword --- The value field shall contain a real floating-point number which records the instantaneous wind direction when start exposure, and the direction of north is the 0 degree wind direction.

WINDS Keyword --- The value field shall contain a real floating-point number which records the instantaneous wind speed when start exposure, and wind direction and speed are also measured also by the automatic weather instrument.

SKYLEVEL Keyword --- This keyword is NULL now, because the instrument is debugging.

### 2.3.7 Data Reduction Parameters Keywords

EXTRACT = 'aperture'           / Extraction method
SFLATTEN=                    T / Super flat has been applied
PCASKYSB=                    T / PCA sky-subtraction has been applied
NSKIES  =                   34 / Sky fiber number
SKYCHI2 =                  3.4 / Mean chi^2 of sky-subtraction
HELIO   =                    T / Heliocentric correction
HELIO_RV=             -0.07809 / [km/s] Heliocentric correction
VACUUM  =                    T / Wavelengths are in vacuum


EXTRACT Keyword --- The value field shall contain a character string, which indicates the method of spectrum extraction. In LAMOST spectra reduction pipeline, only the aperture method is applied to spectra extraction.

SFLATTEN Keyword --- The value of this keyword shall be Boolean, which represents whether or not use the super flat. In LAMOST spectra reduction pipeline, super flat is used to make the fiber-to-fiber relative efficiency around 1.

PCASKYSB Keyword --- The value of this keyword shall be Boolean, which represents whether or not use the PCA method to subtract sky light. In LAMOST spectra reduction pipeline, the PCA method is used to subtract sky light at the wavelength range larger than 7200 Å.

NSKIES Keyword --- The value field shall contain an integer, which shows the number of sky fiber in a spectrograph.

SKYCHI2 Keyword --- The value field shall contain a real floating-point, which gives the mean chi-square of sky-subtraction. In the process of LAMOST spectra reduction, super sky is obtained by spline fitting m sky spectra. And thus, the chi-square between the super sky and each sky spectra in an exposure, and the average chi-square of m sky spectra can also be able to obtain. Assuming n times exposures, there will be 2n average chi-square because of n blue spectra and n red spectra, and this keyword will be evaluated by calculating the mean value of these 2n average chi-squares.

HELIO Keyword --- The value of this keyword shall be Boolean, which represents whether or not to perform the heliocentric correction.

HELIO_RV Keyword --- The value field shall contain a real floating-point, which gives the radial velocity used to carry out the heliocentric correction.

VACUUM Keyword --- The value of this keyword shall be Boolean, which represents whether or not the LAMOST spectra is converted to vacuum wavelength.

## 2.4 Extention 1 and 2

If a LAMOST target has coadded B and R band spectra, the extension 1 and 2 provide the information of their coadded spectra, otherwise the two extension do not have the data array as the primary extension.

In this section, we only introduce extension 1 and 2 for targets which have the coadded spectra. Following sub-section 2.4.1 will introduce each keyword in the header file, and the data array will be presented in the sub-section 2.4.2.

### 2.4.1 Keywords

In this sub-section, we introduce each keyword in the header file of extension 1 and 2, and all keywords are shown as follows.

XTENSION= 'BINTABLE'           /Binary table written by MWRFITS v1.11b
BITPIX  =                    8 /Required value
NAXIS   =                    2 /Required value
NAXIS1  =                   16 /Number of bytes per row
NAXIS2  =                 3760 /Number of rows
PCOUNT  =                    0 /Normally 0 (no varying arrays)
GCOUNT  =                    1 /Required value
TFIELDS =                    5 /Number of columns in table
EXTNAME = 'COADD_B '           / The extension name
LMJMLIST= '83692743-83692756-83692770' / Local Modified Julian Minute list
DATE-OBS= '2018-01-01T15:21:00' / The observation median UTC
DATE-BEG= '2018-01-01T23:03:26.0' / The observation start local time
DATE-END= '2018-01-01T23:40:15.0' / The observation end local time
LAMPLIST= 'lampsc_med.dat'     / Arc lamp emission line list
SNR     =                36.93 / Signal to noise ratio
TTYPE1  = 'FLUX    '           /
TTYPE2  = 'IVAR    '           /
TTYPE3  = 'LOGLAM  '           /
TFORM1  = 'E       '           /
TFORM2  = 'E       '           /
TFORM3  = 'E       '           /
TFORM4  = 'I       '           /
TFORM5  = 'I       '           /


XTENSION Keyword --- The value field shall contain a character string giving the name of the extension type. This keyword is mandatory for an extension header and must not appear in the primary header.

BITPIX Keyword --- The value field shall contain an integer, and it shall specify the number of bits that represent a data value. A value of -32 represents IEEE single precision floating point.

NAXIS Keyword --- The value field shall contain a non-negative integer no greater than 999, representing the number of axes in the associated data array. A value of zero signifies that no data follow the header in the HDU.

NAXIS1 and NAXIS2 Keywords --- The value field of these two indexed keywords shall contain a non-negative integer, representing the number of elements along axis n of a data array. The NAXIS1 keyword represents the number of wavelength array, i.e., the column number of the primary data array, and the NAXIS2 keyword indicates the row number of the primary data array.

PCOUNT Keyword --- The value field shall contain an integer that shall be used in any way appropriate to define the data structure. In IMAGE and TABLE extensions this keyword must have the value 0; in BINTABLE extensions, it is used to specify the number of bytes that follow the main data table in the supplemental data area called the heap.

GCOUNT Keyword --- The value field shall contain an integer that shall be used in any way appropriate to define the data structure. This keyword must have the value 1 in the IMAGE, TABLE and BINTABLE standard extensions.

TFIELDS Keyword --- The value field shall contain a non-negative integer representing the number of fields in each row. The maximum permissible value is 999.

EXTNAME Keyword --- This keyword contains a character string to be used to distinguish among different extensions of the same type in A FITS file. Within this context, the primary array should be considered as equivalent to an IMAGE extension.

LMJMLIS0-(n-1) Keyword --- This keyword contains a character string to show local modified Julian Minutes (LMJM) of N exposures. For each LMJMLISi (i = 0,2,…n-1), it includes the LMJM of three exposures at most. If the number of exposures (N) is larger than three, then n can be obtained with the equation of n = floor(N / 3) + 1, where floor represents round down. When N is less than three, the only LMJMLIS0 keyword will be renamed as the ‘LMJMLIST’.

DATE-OBS Keyword --- The value field shall contain a character string, which gives the median moment UTC of multiple exposures.

DATE-BEG Keyword --- The value field shall contain a character string giving the observation start Beijing Time.

DATE-END Keyword --- The value field shall contain a character string, which provide the observation end Beijing Time.

LAMPLIST Keyword --- The value field shall contain a character string giving the file name of arc lamp emission line list, which is used in the process of wavelength calibration.

SNR Keyword --- The value field for this keyword shall contain a real floating-point, which is the median of S/Ns of all pixels. The S/N of each pixel is calculated by the equation of flux * (inverse variance) ^ 0.5.

TTYPE1-n Keywords --- The value field for this indexed keyword shall contain a character string giving the name of field n.

TFORM1-n Keywords --- The value field of this indexed keyword shall contain a character string describing the format in which field n is encoded.

### 2.4.2 Data array

The data array of extension 1 and 2 have five rows and NAXIS1 (a keyword explained previously) columns, and table 3 explains the data in each row.

Table 3: Data array of extension 1 and 2

 Row Number Data Type 5 Ormask float 4 Andmask float 3 WaveLength float 2 Inverse Variance float 1 Flux float

The data array of extension 1 and 2 in LAMOST MR FITS file is shown in table 3. The first row is flux, and the second row stores the ‘inverse variance’ of the uncertainties (one over sigma-squared), which can be used to estimate S/N of each pixel (flux * (inverse variance) ^ 0.5). The third row stores logarithmic wavelength. The ‘andmask’ information in fourth row is a decimal integer determined by a six-bit binary number shown in table 4, which represents six situations respectively listed in table 5. The associated bit of ‘andmask’ will be set to 1, if the case always appears in each exposure. Like the ‘andmask’, the ‘ormask’ information in fifth row is also a decimal integer determined by a six-bit binary number. The difference is that each bit of ‘ormask’ will be set to 1 if the related case happens in any exposure.

 6 5 4 3 2 1

 Bit Keyword Comments 1 BADCCD bad pixel on CCD 2 BADPROFILE bad profile in extraction 3 NOSKY no sky information at this wavelength 4 BRIGHTSKY sky level too high 5 BADCENTER fiber trace out of the CCD 6 NODATA no good data

If you want to check which case in table 5 has happened in the spectrum reduction process, you can firstly convert the decimal ‘Andmask’ or ‘Ormask’ to a six-bit binary number. Then, a case must has happened in each exposure if associated bit is 1 in binary ‘Andmask’, and a case must has happened at least one time if associated bit is 1 in binary ‘Ormask’.

## 2.5 Extension 3 to (N-1)

In this section, we introduce the single exposure extensions. In the title of this section, N is the total number of extensions which can be obtained from the keyword ‘N_EXTEN’ in the header of primary extension. Assuming the target has n B band and n R band single exposure spectra, N is equal to 2n + 3.

In the following sub-section, we introduce each keyword in the header file, and the structure of data array.

### 2.5.1 Keywords

In this sub-section, all keywords in the header are shown as follows, and they are explained in detail.

XTENSION= 'BINTABLE'           /Binary table written by MWRFITS v1.11b
BITPIX  =                    8 /Required value
NAXIS   =                    2 /Required value
NAXIS1  =                   14 /Number of bytes per row
NAXIS2  =                 4136 /Number of rows
PCOUNT  =                    0 /Normally 0 (no varying arrays)
GCOUNT  =                    1 /Required value
TFIELDS =                    4 /Number of columns in table
EXTNAME = 'R-83692756'         / The extension name
DATE-OBS= '2018-01-01T15:21:00' / The observation median UTC
DATE-BEG= '2018-01-01T23:16:48.0' / The observation start local time
DATE-END= '2018-01-01T23:26:48.0' / The observation end local time
LMJM    = '83692756'           / Local Modified Julian Minute
EXPTIME =                  600 / [s] Exposure duration time
SNR     =                28.58 / Signal to noise ratio
LAMPLIST= 'lampsc_med.dat'     / Arc lamp emission line list
TTYPE1  = 'FLUX    '           /
TTYPE2  = 'IVAR    '           /
TTYPE3  = 'LOGLAM  '           /
TFORM1  = 'E       '           /
TFORM2  = 'E       '           /
TFORM3  = 'E       '           /
TFORM4  = 'I       '           /


XTENSION Keyword --- The value field shall contain a character string giving the name of the extension type. This keyword is mandatory for an extension header and must not appear in the primary header.

BITPIX Keyword --- The value field shall contain an integer, and it shall specify the number of bits that represent a data value. A value of -32 represents IEEE single precision floating point.

NAXIS Keyword --- The value field shall contain a non-negative integer no greater than 999, representing the number of axes in the associated data array. A value of zero signifies that no data follow the header in the HDU.

NAXIS1 and NAXIS2 Keywords --- The value field of these two indexed keywords shall contain a non-negative integer, representing the number of elements along axis n of a data array. The ‘NAXIS1’ keyword represents the number of wavelength array, i.e., the column number of the primary data array, and the ‘NAXIS2’ keyword indicates the row number of the primary data array.

PCOUNT Keyword --- The value field shall contain an integer that shall be used in any way appropriate to define the data structure. In IMAGE and TABLE extensions this keyword must have the value 0; in BINTABLE extensions, it is used to specify the number of bytes that follow the main data table in the supplemental data area called the heap.

GCOUNT Keyword --- The value field shall contain an integer that shall be used in any way appropriate to define the data structure. This keyword must have the value 1 in the IMAGE, TABLE and BINTABLE standard extensions.

TFIELDS Keyword --- The value field shall contain a non-negative integer representing the number of fields in each row. The maximum permissible value is 999.

EXTNAME Keyword --- This keyword contains a character string to be used to distinguish among different extensions of the same type in A FITS file. Within this context, the primary array should be considered as equivalent to an IMAGE extension.

DATE-OBS Keyword --- The value field shall contain a character string, which gives the median moment UTC of multiple exposures.

DATE-BEG Keyword --- The value field shall contain a character string giving the observation start Beijing Time.

DATE-END Keyword --- The value field shall contain a character string, which provide the observation end Beijing Time.

LMJM Keyword --- This keyword contains a character string to show the local modified Julian Minute at the start of exposure.

EXPTIME Keyword --- The value field for this keyword shall contain a real floating-point, which gives the exposure duration time.

SNR Keyword --- The value field for this keyword shall contain a real floating-point, which is the median of S/Ns of all pixels. The S/N of each pixel is calculated by the equation of flux * (inverse variance) ^ 0.5.

LAMPLIST Keyword --- The value field shall contain a character string giving the file name of arc lamp emission line list, which is used in the process of wavelength calibration.

TTYPE1-n Keywords --- The value field for this indexed keyword shall contain a character string giving the name of field n.

TFORM1-n Keywords --- The value field of this indexed keyword shall contain a character string describing the format in which field n is encoded.

### 2.5.2 Data Array

In this sub-section, we describe the data array of single exposure extensions, and it is shown in table 6. Like the data array of extension 1 and 2, they are flux, inverse variance, and logarithmic wavelength from the first to third row. The different is that the data array of single exposure only has four rows, and the fourth row is the ‘Pixmask’, which is a decimal integer determined by a six-bit binary number. As the ‘Andmask’ and ‘Ormask’, each bit of the ‘Pixmask’ represents each issues of each pixel listed in table 5, and it will be 1 if the problem happens.

Table 6: Data array

 Row Number Data Type 4 Pixmask float 3 WaveLength float 2 Inverse Variance float 1 Flux float

# Section 3. Catalog

In this section, we introduce four LAMOST MRS catalogs, which can be available from the website of http://dr7.lamost.org/v1.2/catalogue, and they are the LAMOST MRS General Catalog, the LAMOST MRS Parameter Catalog, the LAMOST MRS Observed Plate Information Catalog, and the LAMOST MRS Input Catalog, respectively.

LAMOST targets were cross-matched with Gaia DR2 catalog, and their Gaia source identifiers, i.e., the “source_id” fields, and Gaia G magnitudes, i.e., the "phot_g_mean_mag" fields, are included in three LAMOST MRS catalogs except the LAMOST MRS Observed Plate Information Catalog. The two Gaia fields are listed in the last two fields of the three LAMOST MRS catalogs, and they are marked as “gaia_source_id” and “gaia_g_mean_mag”.

The following table 7, 8, 9, and 10 separately show all fields of the above four catalogs, and provide clear comment for each field. Most fields in these tables are explained in detail in sub-section 2.3, and we only introduce the fields which are not introduced in previous sections.

## 3.1 LAMOST MRS General Catalog

In this sub-section, we present the LAMOST MRS General Catalog, which includes 56 parameters for 11, 410, 538 single exposure spectra and 2,964,755 coadded spectra in this table. All fields of this catalog are listed in table 7, and most majorities of them are explained in section 2.3 in detail. We only introduce fields not mentioned above.

In this table and the following LAMOST MRS Parameter catalog, there are two unique spectrum IDs, and they are ‘mobsid’ and ‘obsid’, respectively. The ‘mobsid’ field is the unique ID for each single exposure spectrum, and the ‘obsid’ field is the unique ID for each coadd spectrum.

We artificially add offsets to the equatorial coordinates of input catalog to prevent saturation for a fraction of luminous stars during observation. Thus, four fields were added in this and other two catalogs (the LAMOST MRS Parameter Catalog and LAMOST MRS Input Catalog), and they are ‘ra_obs’, ‘dec_obs’, ‘offsets’ and ‘offsets_v’ respectively. The ‘ra_obs’ and ‘dec_obs’ are fiber pointing right ascension and declination during observation, and the ‘ra’ and ‘dec’ are the equatorial coordinates from the input catalog. The ‘offsets’ represents whether there is a fiber offset during observation, and the ‘offsets_v’ gives the offset value of equatorial coordinator in the input catalog if the ‘offsets’ field is true. Note that, the fields of ‘offsets’ and ‘offsets_v’ also in other three MRS catalogs except the LAMOST MRS observed plate information catalog are the same as the fields of ‘offset’ and ‘offset_v’ of the primary extension in subsection 2.3.4, and the reason adding ‘s’ after ‘offset’ lie in ‘offset’ is the keyword of the database.

The catalog provides eight radial velocity measurements and their errors, which are also in the following LAMOST MRS Parameter catalog, and they are ‘rv_b0’, ‘rv_b1’, ‘rv_r0’, ‘rv_r1’, ‘rv_br0’, ‘rv_br1’, ‘rv_lasp0’, ‘rv_lasp1’, ‘rv_b0_err’, ‘rv_b1_err’, ‘rv_r0_err’, ‘rv_r1_err’, ‘rv_br0_err’, ‘rv_br1_err’, ‘rv_lasp0_err’, and ‘rv_lasp1_err’, respectively. The ‘rv_b0’, ‘rv_r0’, and ‘rv_br0’ velocities were determined by the cross-correlation method, which used 483 selected KURUCZ synthetic spectra as the templates, and their difference lies in different band of spectra were used. The ‘rv_b0’ and ‘rv_r0’ were estimated with the B and R band spectra, respectively, and the ‘rv_br0’ was determined with both B and R band spectra after continuum removal. The ‘rv_b1’, ‘rv_r1’, and ‘rv_br1’ velocities are calibrated velocities of ‘rv_b0’, ‘rv_r0’, and ‘rv_br0’, which were calibrated by the radial velocity standard stars provided in Huang, Y. et al (2018)[2]. It should be noted that ‘rv_b1’, ‘rv_r1’, and ‘rv_br1’ have only corrected the systematic errors between spectrographs, which do not include systematic errors between fibers and exposures, and the detailed correction method was introduced in Wang, R. et al (2019)[3]. The ‘rv_lasp0’ velocity was estimated by the LASP, and ‘rv_lasp1’ is the calibrated velocity of ‘rv_lasp0’.

The radial velocity uncertainty is affected mainly by two factors, i.e., the S/N and the best-matched chi-square. Using a sample of stars subtracting variable stars and having multiple observations, the radial velocity precision (RVP) for each observation and the relationship between the RVP and S/N were determined. Besides, the function relationship of the best-matched chi-square and S/N can also be obtained with another sample of stars. The uncertainties of ‘rv_b0’, ‘rv_r0’ and ‘rv_br0’ are ‘rv_b0_err’, ‘rv_r0_err’, and ‘rv_br0_err’, respectively, and they are estimated with the best-matched chi-square, S/N, and the above two relationships. The uncertainties of calibrated ‘rv_b1’, ‘rv_r1’, and ‘rv_br1’ velocities are ‘rv_b1_err’, ‘rv_r1_err’, and ‘rv_br1_err’, respectively, and they are determined by the error propagation method. In addition, ‘rv_lasp0_err’, and ‘rv_lasp1_err’ are uncertainties of ‘rv_lasp0’ and ‘rv_lasp1’, and they were estimated by the same method mentioned above.

There are three radial velocity flags in this table, and they are ‘rv_b_flag’, ‘rv_r_flag’, ‘rv_br_flag’, respectively, which represents possible problems of radial velocities. Each of the three flags has four values, and they ‘0’, ‘1’, ‘2’, and ‘3’, which represent no exceptions, too many bad pixels (there are more than a third of bad pixels in a spectrum), the absolute value of radial velocity larger than 450 km/s, and low similarity with the best-matched template, respectively.

On the website http://dr7.lamost.org/v1.2/catalogue, we provide two formats of the LAMOST MRS General Catalog, which include a FITS table and a CSV table, and the two files have the same contents.

Table 7: LAMOST MRS General Catalog

## 3.2 LAMOST MRS Parameter Catalog

In this sub-section, we present the LAMOST MRS Parameter Catalog. In this table, atmospheric parameters and their uncertainties estimated by the LASP were released. For stars with effective temperatures in the range of [4500 K, 8500 K] or with effective temperatures in the range of [4000 K, 4500 K] and surface gravities less than 3.5 dex, blue coadd spectra were used, and red coadd spectra were adopted for stars with effective temperatures in the range of [3300 K, 4000 K] or with effective temperatures in the range of [4000 K, 4500 K] and surface gravities larger than or equal to 3.5 dex. Note that, no matter blue or red band spectra were used here, their signal to noise ratios should be larger than 10. Thus, we published atmospheric parameters for 717,475 blue coadd spectra, and for 33,678 red coadd spectra, respectively. In addition, alpha element abundances, atmospheric parameters, and 12 individual element abundances were also estimated by the convolutional neural network (CNN) method for these spectra, and they were also published in this catalog.

Table 8 lists all fields of this catalog, and fields before the ‘teff_lasp’ have been introduced in subsection 3.1. The fields of ‘teff_lasp’, ‘logg_lasp’, ‘feh_lasp’, ‘vsini_lasp’, ‘teff_lasp_err’, ‘logg_lasp_err’, ‘feh_lasp_err’, and ‘vsini_lasp_err’ are effective temperature, surface gravity, metallicity, projected rotation velocity, and their uncertainties, and they were determined by the LASP with the B coadd spectra, which adopted the ELODIE spectra as templates. Note that, the uncertainty estimation methods of atmospheric parameters and projected rotation velocity given by the LASP are similar as the method of radial velocity uncertainties mentioned in subsection 3.1.

The fields of ‘rv_b0’, ‘rv_b1’, ‘rv_r0’, ‘rv_r1’, ‘rv_br0’, ‘rv_br1’, ‘rv_lasp0’, ‘rv_lasp1’, ‘rv_b0_err’, ‘rv_b1_err’, ‘rv_r0_err’, ‘rv_r1_err’, ‘rv_br0_err’, ‘rv_br1_err’, ‘rv_lasp0_err’, ‘rv_lasp1_err’, ‘rv_b_flag’, ‘rv_r_flag’, ‘rv_br_flag’, ‘coadd’, and ‘fibermask’ are also in the LAMOST MRS General Catalog of subsection 3.1, thus they are not introduced again here.

The fields of ‘alpha_m_cnn’, ‘teff_cnn’, ‘logg_cnn’, ‘feh_cnn’, ‘c_fe ’, ‘n_fe ’, ‘o_fe ’, ‘mg_fe ’, ‘al_fe ’, ‘si_fe ’, ‘s_fe ’, ‘ca_fe ’, ‘ti_fe ’, ‘cr_fe ’, ‘ni_fe ’, and ‘cu_fe ’ are alpha element abundances, effective temperature, surface gravity, metallicity, and 12 individual element abundances, which were estimated by the label-transfer method based on a convolutional neural network (CNN) with both B and R band spectra after continuum removal , and the labels of the training samples were employed from APOGEE. Note, the uncertainties of these fields were not published in this data release, and the results obtained by the CNN method are only statistically significant.

We provide two formats of the LAMOST MRS Parameter catalog, i.e., a FITS table and a CSV table, which are available from the website http://dr7.lamost.org/v1.2/catalogue.

Table 8: LAMOST MRS Parameter Catalog

## 3.3 LAMOST MRS Observed Plate Information Catalog

In this sub-section, we introduce the LAMOST MRS observed plate information catalog, which have the same table structure as the ‘Observed Plate Information Catalog’ table in the low-resolution data release. Except the ‘obsdate’ and ‘planid’ fields also in other catalogs, other seven basic information for 679 published plates were also included in this catalog as shown in table 9. The fields of ‘ra’ and ‘dec’ are the right ascension and declination of center star of each plate, and the field ‘mag’ is the magnitude of center star. The field ‘seeing’ is the dome seeing of the first exposure, and ‘exptime’ is the total exposure time of n time exposures. The field ‘lmjmlist’ is a string which provides the local modified Julian minute list for each plate, and it is separated by commas. For example, the ‘lmjmlist’ for a plate is ‘84108765,84108789,84108813’, which represents the plate has three exposures, and it provides the local modified Julian minute at the beginning time of each exposure for this plate. Last, the ‘pid’ is the unique ID of each plate.

We provide a format of this table to download, which is available from the website http://dr7.lamost.org/v1.2/catalogue.

Table 9: LAMOST MRS Observed Plate Information Catalog

 Field (unit) Type Comment pid integer Plate ID obsdate float Target Observation Date planid char Plan Name ra (degree) float Right Ascension of center star dec (degree) float Declination of center star mag (mag) float Magnitude of center star seeing float Seeing of the first exposure exptime (second) float The total exposure time of n time exposures lmjmlist Integer A string which provide the Local Modified Julian Minute list

## 3.4 LAMOST MRS Input Catalog

In this sub-section, we introduce the LAMOST MRS input catalog. This catalog includes 27 fields for 1,637,079 targets. There are three fields which are not included in above three tables, they are the ‘unitid’, ‘epoch’ and ‘tname’ fields respectively. The ‘unitid’ field is the ID of 4000 fiber units, and the ‘tname’ field provides unique ID of this catalog for each target. Besides, the value of the ‘epoch’ field is 'J2000'.

We provide a format of this table to download, which is available from the website http://dr7.lamost.org/v1.2/catalogue.

Table 10: LAMOST MRS Input Catalog

 Field (unit) Type Comment obsid long integer Unique Spectra ID obsdate float Target Observation Date planid char Plan Name spid integer Spectrograph ID fiberid integer Fiber ID unitid char ID of 4000 fiber unites ra_obs (degree) float Fiber Pointing Right Ascension dec_obs (degree) float Fiber Pointing Declination objtype varchar Object Type magtype varchar Target Magnitude Type mag1 (mag) float Associated Magnitude 1 mag2 (mag) float Associated Magnitude 2 mag3 (mag) float Associated Magnitude 3 mag4 (mag) float Associated Magnitude 4 mag5 (mag) float Associated Magnitude 5 mag6 (mag) float Associated Magnitude 6 mag7 (mag) float Associated Magnitude 7 tsource varchar Organization or person who submit input catalog fibertype varchar Fiber Type of target [Obj, Sky, F-std, Unused, PosErr, Dead] tfrom varchar Input catalog submitted by an organization or a person determined by the objsourc tcomment varchar Target ID from SDSS, UCAC4, PANSTAR and other catalogues offsets bool Whether there is a fiber offset during observation offsets_v (arcsec) float If the ‘offsets’ field is true, ‘offsets_v’ gives the offset distance from the target’s coordinator in input catalog ra (degree) float Right Ascension from input catalog dec (degree) float Declination from input catalog epoch char J2000 tname char Unique ID for each targets in this catalog gaia_source_id char The "source_id" field of Gaia DR2 catalog gaia_g_mean_mag float The "phot_g_mean_magnitude" field of Gaia DR2 catalog

# Bibliography

1.    Liu, C., Bai, Z.R., Chen, J.J., et al. LAMOST Medium-Resolution Spectroscopic Survey (LAMOST-MRS): Scientific goals and survey plan. In prepare.

2.    Huang, Y., Liu, X.W., Chen, B.Q., et al. A New Catalog of Radial Velocity Standard Stars from the APOGEE Data. AJ, 2018, 156, 90.

3.    Wang, R., Luo, A.L., Chen, J.J., et al. Properties of Radial Velocities measurement based on LAMOST-II Medium-Resolution Spectroscopic Observations. ApJS, 2019, 244, 27