;+
;Project    :SolarB EIS
;
;Name       :eis_get_science_entry
;
;Purpose    Extract science record and place in eis_science_component
;           structure (given ID)
;
;Category   :EIS timeline planning
;
;Written    :Chunkey Lepine, RAL, d.r.lepine@rl.ac.uk, 0044-1235-44-6515
;
;Version    :V0 February 2005
;           :STUDY_ID keyword added September 2005
;-
;************************************************************************
FUNCTION eis_get_science_entry, seq_id, STUDY_ID = STUDY_ID

   seq_id_value = seq_id
   status = eis_open_db(/SCIENCE)
   if not keyword_set(INDEX) then begin
        constraint = 'ID =' + string(seq_id)
        entry = dbfind(constraint , /SILENT , count = count)


        if (count eq 0) then begin
            dbclose
            message, /continue, 'No entry for ID = ' + string(seq_id)
            sc = {eis_science_component}
            sc.sequence_id = seq_id

            return, sc
        endif
        seq_id_value = entry[0]
    endif


    return, eis_get_science_details(seq_id_value, STUDY_ID=STUDY_ID)
end
