PRO ssc_mreadfits, files, info, data, noscale=noscale, $ strtemplate=strtemplate, nodata=nodata, header=header, quiet=quiet, $ outsize=outsize, maxx=maxx, maxy=maxy, add_standard=add_standard, $ comsep=comsep, hissep=hissep, comments=comments, history=history, $ ccnts=ccnts, hcnts=hcnts, nocomments=nocomments, nohistory=nohistory, $ all_keywords=all_keywords, nofill=nofill, silent=silent, wcs=wcs, $ _extra=_extra, ss_sort=ss_sort ;+ ; Name: SSC_MREADFITS ; ; Purpose: Sort and read Yohkoh_Legacy/SXT/SSC multiple FITs into data cube, ; header-> IDL structure array. ; A simple wrapper to MREADFITS.PRO to avoid upset of time ordering ; in reading files with different prefix(e.g. sx2c_ and sx3c_ ). ; ; Input Parameters: ; files - fits files to read ; ; Keyword Parameters: ; strtemplate - template structure for read (reccommended, not required) ; nodata - switch, if set, dont read the data (return only structures) ; header (output) - last fits header as string array ; outsize - 1 or 2 element array ([nx,ny]) specifying the output size ; of data array - default is [max(NAXIS1),max(NAXIS2)] ; add_standard - if set and NO template supplied, add some standard tags ; comments (output) - concatentation of all COMMENT ; ccnts (output) - counts (pointers) to map files -> COMMENT ; history (output) - concatentation of all HISTORY ; hcnts (output) - counts (pointers) to map files -> HISTORY ; all_keywords (input) - if set, then go through all input file and get ; the full list of unique keywords to build the template ; structure (rather than from the first file) ; silent/quiet(synonyms) - less verbose ; ; Also takes any keywords accepted by FITSHEAD2WCS. ; ; Calling Sequence: ; ssc_mreadfits, filelist, index [,data , strtemplate=structure, $ ; outsize=xy, /nodata] ; ; History: ; 22-Jun-2007 Aki Takeda(MSU) -- prepared as a wrapper to mreadfits.pro ;- filename=file_break(files) ss_sort=indgen(n_elements(files)) if n_elements(files) gt 1 then begin dat_tim=strmid(filename,strpos(filename(0),'.fts')-19,15) ss_sort=sort(dat_tim) files2=files(ss_sort) print,'*** files have been sorted with respect to obs-time. ***' endif else files2=files ; mreadfits, files2, info, data, noscale=noscale, $ strtemplate=strtemplate, nodata=nodata, header=header, quiet=quiet, $ outsize=outsize, maxx=maxx, maxy=maxy, add_standard=add_standard, $ comsep=comsep, hissep=hissep, comments=comments, history=history, $ ccnts=ccnts, hcnts=hcnts, nocomments=nocomments, nohistory=nohistory, $ all_keywords=all_keywords, nofill=nofill, silent=silent, wcs=wcs, $ _extra=_extra ; end