Working with 3D data always merits some thought. Some general guidelines, hints and options are reviewed here. The actual approach taken is sensitive to local system resource contraints (memory) as well as the actual application and acceptable tradeoffs between spatial resolution, time resolution/cadence, time range etcetera. Some of the information presented here is repeated in the SSW concepts document. Although the examples may refer to a specific instrument such as TRACE, the concepts are generally applicable to any 3D collection of large images within the SolarSoft IDL environment.
As discussed in the SSW concepts document, most of the read routines accept a vector of file names with an arbitrary number of elements. For files which are internally 3D, there may be an additional SS (SubScripts) parameter. The bottom line is that a user can always specify a 3D data read which will overload the local system. On a more positive note, the read routines (and FITS conversion routines) are designed to permit reading of an extremely large number of headers into an index vector without reading any data. This index vector can be used to sub select (pre filter) the images of actual interest and the used to perform the actual data read. The following 3 element dummy sequence is fundamental:.
IDL> read_trace, tracef, -1, tindex ; Read all the image headers in 'tracef' -> tindex
IDL> ss=trace_sswhere(tindex) ; subselect desired instrument parameters from the WIDGET
IDL> read_trace, tracef, ss, tindex, tdata ; read the filtered subset of data
For example, assuming the ss vector implies too many images after image parameter filtering and a time resolution of 30 minutes is sufficient for this applicataion - then:
IDL>
sss=grid_data(index(ss),min=30))
; subselect one every 30 minutes
IDL>
read_trace,files,ss(sss),index,data
; match parameters and reduced cadence
NOTE that the new (sss=reduced cadence) subscripts are derived
relative to the original prefiltered subscripts ss so the
read_trace call uses ss(sss) for image numbers
Assume index0 represents high cadence image times from instrument xxx and index1 are the records from a lower cadence instrument yyy (and assuming some time overlap between the two index vectors). Then the subscripts for instrument xxx closest to yyy images are derived via:
IDL>
sss=tim2dset(index0(ss), index1, delta=seconds)
; match index (time) vectors
IDL>
read_xxx, files, ss(sss), indexx, datax
; now read the xxx images closest in time to images yyy
NOTE: that the new subscripts sss are relative to
some previous filtered subset ss so the read_xxx
call uses ss(sss) nomenclature.
IDL> read_trace,files,ss(0:9),index,data ; read first 10 'prefiltered' images
IDL> read_trace,files,last_nelem(ss,10),index,data ; read last 10 'filtered' images
IDL>
ss=sel_timrange(index,'1-jun-1998 00:10','1-jun-1998 00:15')
; define ss within time range
IDL>
read_trace,files,ss,index,data
; now read associated index,data
IDL> read_trace, files, SS, index, data ,outsize=386 ; read the data; rebin on the fly -> 386x386xNIMAGES
IDL> mreadfits_fixup, index, data ; fix INDEX parameters to match rebinned data
IDL> trace_prep,index,data,oindex,odata ; prep the data (L0->L1)
IDL> sdata=bytscl(alog10(odata>1)) ; scale the data
IDL> xstepper, sdata, get_infox(oindex,'date_obs,wave_len') ; display the data (3D cube reviewer)