FUNCTION read_array_from_drms, series, seg nan_val = 0. print," " print,"WARNINGS" print," " print," 1) Setting NaN values to ",nan_val print," - this may not be the best choice for the data you are looking at" print," - to change this, edit the nan_val parameter on Line 3" print," 2) This may not work properly with aia_test.syoptic2 series" print," - check the show_info command for your request gives back a unique response" print," 3) This works on linux x86_64 architecture" print," - it uses the fitsio_read_image.pro and fitsio.so from GDC-SDO website" print," " ; series: DRMS series name including time stamp ; seg : segment name which is the name of the FITS file without the ".FITS" ending ; HMI EXAMPLES ; IDL> a = read_array_from_drms('hmi.v_45s[2010.08.08_16:30:00_TAI]','dopplergram') ; IDL> a = read_array_from_drms('hmi.m_45s[2010.08.08_16:30:00_TAI]','magnetogram') ; IDL> a = read_array_from_drms('hmi.ic_45s[2010.08.08_16:30:00_TAI]','continuum') ; AIA Level 1 EXAMPLES ; - recall there are 3 images available for each time ; 1) image_lev1.fits : the main AIA Level 1 observation ; 2) bad_pixel.fits : bad pixel error information discovered during calibration ; 3) spikes.fits : spike error information discovered during the calibration ; ; The following 3 examples will get image_lev1, bad_pixels, spikes respectively ; IDL> a = read_array_from_drms('aia.lev1[2011-06-16T13:48:02.09Z]','image_lev1') ; IDL> a = read_array_from_drms('aia.lev1[2011-06-16T13:48:02.09Z]','bad_pixel') ; IDL> a = read_array_from_drms('aia.lev1[2011-06-16T13:48:02.09Z]','spikes') ;;;;;;;;;;; MAIN CODE (SPAWNS DRMS show_info commands) ;;;;;;;;;;;;;;;;;;;;; spawn,'show_info ' + series + ' -qP seg= ' + seg , filename filename=filename[0] ; read in fits file array=fitsio_read_image(filename) ; set NaN values to to hard coded nan val if (total(~finite(array)) gt 0) then array(where(~finite(array)))=nan_val return, array END