;------------------------------------------------------------------------------ function ppxf_determine_goodPixels, logLam, lamRangeTemp, vel ; ; PPXF_DETERMINE_GOODPIXELS: Example routine to generate the vector of goodPixels ; to be used as input keyword for the routine PPXF. This is useful to mask ; gas emission lines. It can be trivially adapted to the presence of ; different gas emission lines to mask. ; ; INPUT PARAMETERS: ; - LOGLAM: Natural logarithm ALOG(wave) of the wavelength in Angstrom ; of each pixel of the log rebinned *galaxy* spectrum. ; - LAMRANGETEMP: Two elements vectors [lamMin2,lamMax2] with the minimum and ; maximum wavelength in Angstrom in the stellar *template* used in PPXF. ; - VEL: Estimate of the galaxy velocity in km/s. ; ; V1.0: Michele Cappellari, Leiden, 9 September 2005 ; V1.01: Made a separate routine and included additional common emission lines. ; MC, Oxford 12 January 2012 ; [OII] Hgamma Hbeta [OIII] [OI] [NII] [SII] ;lines = [3727, 4341, 4861.3d, 4958.9d, 5006.9d, 6300, 6363, 6548, 6583, 6716, 6731] ;lines = [3203.15,3345.81,3425.81,3726.03,3728.73,3868.69,3889.05,3967.40,3970.07,4101.73,4340.46,4363.15,4685.74,4711.30,4740.10,4861.32,4958.83,5006.77,5197.90,5200.39,5577.00,5875.60,5890.00,5896.00,6300.00,6300.20,6363.00,6363.67,6547.96,6562.80,6583.34,6716.31,6730.68,7135.67] ; HeII [NeV] [NeV] [OII] [OII] [NeIII] H5 [NeIII] He Hd lines = [3203.15 ,3345.81 ,3425.81 ,3726.03 ,3728.73 ,3868.69 ,3889.05 ,3967.40 ,3970.07 ,4101.73 , $ ; Hg [OIII] HeII [ArIV] [ArIV] Hb [OIII] [OIII] ;[NI] [NI] sky HeI NaI NaI 4340.46, 4363.15 ,4685.74 ,4711.30 ,4740.10 ,4861.32 ,4958.83 ,5006.77 ,5197.90 ,5200.39 , 5577.0, 5875.60, 5890.0, 5896.0, $ ; sky [OI] sky [OI] [NII] Ha [NII] [SII] [SII] [ArIII] 6300.0, 6300.20, 6363.0, 6363.67 ,6547.96 ,6562.80 ,6583.34 ,6716.31 ,6730.68, 7135.67, $ ; from Appenzeller and Östreicher 1988 (AJ 95, 45) ; [OII] [OII] [FeXI] 7319.9, 7330.2, 7891.9, $ ; from Osterbrock (Table 3.12) ; [SIII] [SIII] [SIII] 8829.9, 9068.9, 9531.0] dv = lines*0+800d ; width/2 of masked gas emission region in km/s c = 299792.458d ; speed of light in km/s flag = bytarr(n_elements(logLam)) for j=0,n_elements(lines)-1 do $ flag or= logLam gt alog(lines[j]) + (vel - dv[j])/c $ and logLam lt alog(lines[j]) + (vel + dv[j])/c flag or= logLam lt alog(lamRangeTemp[0]) + (vel + 900d)/c ; Mask edges of flag or= logLam gt alog(lamRangeTemp[1]) + (vel - 900d)/c ; stellar library return, where(flag eq 0) end ;------------------------------------------------------------------------------