function ok_specline, ln, mol, iso, v_upper, v_lower, min_nu0, max_nu0, min_s ;+ ; NAME: ; ok_specline ; PURPOSE: (one line) ; Return true if a spectral line matches criteria ; DESCRIPTION: ; CATEGORY: ; Spectra ; CALLING SEQUENCE: ; ok_specline, ln, mol, iso, v_upper, v_lower, min_nu0, max_nu0, min_s ; INPUTS: ; ln - the spectral line structure to be tested ; mol - index of molecule (or 0 for any) ; iso - index of isotope (or 0 for any) ; v_upper - upper vibrational quantum number, or 0 for any ; v_lower - lower vibrational quantum number, or 0 for any ; min_nu0 - minimum wavenumber of the transition, or 0 for any ; max_nu0 - maximum wavenumber of the transition, or 0 for any ; min_s- minimum strength of the transition, or 0 for any ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; true for match, false for no match ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; MODIFICATION HISTORY: ; Written 2000 October, by Leslie Young, SwRI ; 2013 Aug 08 - ass 2012 case ;- true = (1 eq 1) false = (1 eq 0) case !spectralib.version of 'HITRAN96': v_def = 0 'HITRAN2004': v_def = ' ' 'HITRAN2008': v_def = ' ' 'HITRAN2012': v_def = ' ' else: endcase if (mol gt 0) and (ln.mol ne mol) then return, false if (iso gt 0) and (ln.iso ne iso) then return, false case !spectralib.version of 'HITRAN96': begin if (v_upper ne v_def) and (ln.v_upper ne v_upper) then return, false if (v_lower ne v_def) and (ln.v_lower ne v_lower) then return, false end 'HITRAN2004': begin if (v_upper ne v_def) and not strmatch(ln.v_upper, v_upper) then return, false if (v_lower ne v_def) and not strmatch(ln.v_lower, v_lower) then return, false end 'HITRAN2008': begin if (v_upper ne v_def) and not strmatch(ln.v_upper, v_upper) then return, false if (v_lower ne v_def) and not strmatch(ln.v_lower, v_lower) then return, false end 'HITRAN2012': begin if (v_upper ne v_def) and not strmatch(ln.v_upper, v_upper) then return, false if (v_lower ne v_def) and not strmatch(ln.v_lower, v_lower) then return, false end else: begin if (v_upper ne v_def) and (ln.v_upper ne v_upper) then return, false if (v_lower ne v_def) and (ln.v_lower ne v_lower) then return, false end endcase if (min_nu0 gt 0) and (ln.nu0 lt min_nu0) then return, false if (max_nu0 gt 0) and (ln.nu0 gt max_nu0) then return, false if (min_s gt 0) and (ln.s lt min_s) then return, false return, true end