Basic reduction has to be done for all kind of data, imaging, specroscopy and to all images, also calibration frames like calibration lamp etc.
If there is overscan area on your images and note X and Y value, where the image should be cut. Go to noao/imred/ccdred.
1. Create Master Bias
combine [input images] [output images] combine=median lsigma=3.0 hsigma=3.0 reject=avsigclip plfile=badpix
2. Bias extraction:
images = [bias.fits] List of CCD images to correct
(output = [masterbias.fit] ) List of output CCD images
(ccdtype= ) CCD image type to correct
(max_cac= 0) Maximum image caching memory (in Mbytes)
(noproc = no) List processing steps only?
(fixpix = yes ) Fix bad CCD lines and columns? if you have the file with badpixels, look at you bias and check f there are any, if so make a badpix.txt file and list in it a column of their x,y values
(oversca= yes ) Apply overscan strip correction? if you have the overscan area, look at bias and science image
(trim = yes ) Trim the image?
(zerocor= yes ) Apply zero level correction?
(darkcor= no ) Apply dark count correction? rearly you need DARK correction
(flatcor= no ) Apply flat field correction?
(illumco= no ) Apply illumination correction?
(fringec= no ) Apply fringe correction?
(readcor= no ) Convert zero level image to readout correction?
(scancor= no ) Convert flat field image to scan correction?
(readaxi= line) Read out axis (column|line)
(fixfile= badpix.txt ) File describing the bad lines and columns
(biassec= [1:300,1300] ) Overscan strip image section
(trimsec= [1:300,1300] ) Trim data section
(zero = masterbias.fits ) Zero level calibration image
(dark = ) Dark count calibration image
(flat = ) Flat field images
(illum = ) Illumination correction images
(fringe = ) Fringe correction images
(minrepl= 1.) Minimum flat field value
(scantyp= shortscan) Scan type (shortscan|longscan)
(nscan = 1) Number of short scan lines
(interac= no) Fit overscan interactively?
(functio= legendre) Fitting function
(order = 1) Number of polynomial terms or spline pieces
(sample = *) Sample points to fit
(naverag= 1) Number of sample points to combine
(niterat= 1) Number of rejection iterations
(low_rej= 3.) Low sigma rejection factor
(high_re= 3.) High sigma rejection factor
(grow = 0.) Rejection growing radius
(mode = ql)
Or shortly: (but be carefull with details)
ccdproc [all_the_images] zerocor=yes zero= masterbias.fits
3. Master Flat
remember ro divid each flat by bias using the command: ccdproc [all_the_images] zerocor=yes zero= masterbias.fits and then:
flatcombine all_flats ccdtype=none
4. Science frame
Use ccdproc to subrtract masterflat from science frame
ccdproc [science_images] flatcor=yes flat=masterflat.fits