def find_detrend_keyword(header, type):
    """Search through header and find
    the elixir formated string(s) that match the the
    input 'type'.

    header is a FITS HDU.
    Elixir formated strings are crunid.type.filter/exptime.chipid.version.
    """
    import re, string
    value='NULL'
    #print type
    for h in header:
        g = str(h)
        if ( string.find(g,'.'+type+'.')!= -1 ):
            result=re.search('[^\s]*\.'+type+'\.[^\s]*\.\d\d\.\d\d',g)
            if result:
                return result.group(0)
def find_detrend_keyword ( header , type ) : import re , string value = 'NULL' for h in header : g = str ( h ) if ( string . find ( g , '.' + type + '.' ) != - 1 ) : result = re . search ( '[^\s]*\.' + type + '\.[^\s]*\.\d\d\.\d\d' , g ) if result : return result . group ( 0 )
Search through header and find
    the elixir formated string(s) that match the the
    input 'type'.

    header is a FITS HDU.
    Elixir formated strings are crunid.type.filter/exptime.chipid.version.