;+ ; NAME: EXPOSE ; ; PURPOSE: ; To return, from a list of image files passed to it, the files ; that have been produced from a specified exposure time. ; ; CATEGORY: ; ; CALLING SEQUENCE: ; EXPOSE,FILES,TIME ; ; INPUTS: ; FILES: A STRING ARRAY of file (including the path) names. ; ; TIME: An INTEGER, specifying the exposure time of the images ; of interest. If no time is chosen, then by default TIME ; will be set to 60. ; ; KEYWORD PARAMETERS: ; None. ; ; OUTPUTS: ; SIXTY: A STRING ARRAY of image files with exposure times given by the ; variable TIME. ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; None. ; ; RESTRICTIONS: ; This procedure assumes that any three integers before a file extention ; identifies an exposure time of an image file. Consequently, files that ; have names with three integers before the extention, can be considered ; valid files by this program even though they may not be image files at ; all. Therefore, care must be exercised when using this procedure , if ; meaniful results are to be produced. ; ; PROCEDURE: ; The file names (including path) are passed to the function EXPOSURE. EXPOSURE ; returns a STRING ARRAY containing the exposure time of the files. These exposure ; times are then checked against the time specified by TIME. Any files that have ; exposure times that match TIME are returned in the STRING ARRAY SIXTY. If, no ; time is specified, then by defalt TIME=60 will be chosen. ; ; MODIFICATION HISTORY: ; Written May 1994, by T A Oliynyk. ;- FUNCTION expose,files,time in=exposure(files) result=N_PARAMS() t='060' IF result EQ 2 THEN t=STRING(time,FORMAT='(I3.3)') index=WHERE(in EQ t,count) IF count NE 0 THEN BEGIN sixty=files(index) RETURN, sixty ENDIF ELSE BEGIN seconds=STRMID(t,1,2) MESSAGE, 'No '+seconds+ ' second image files found ',/INFORMATIONAL RETURN, -1 ENDELSE END