Downloading and Reading SOT-SP Level 2 and Level 2.1 Data

TECHNICAL NOTE: The examples in this section may rely on the user having a valid SSWIDL installation (as shown in this section) with the most recent SOT software tree installed (as shown in this section).

Each SOT-SP Level 2 dataset is categorized by the same ScanID that is used for the corresponding calibrated Level 1 data, and which takes the form of a string representing the date and time of the beginning of the scan. Once the ScanID of a SOT-SP scan is known, the sotsp_getdata.pro routine can be used to download the Level 2 data file containing the set of inverted physical quantities for the scan. Additionally, if the dataset has been disambiguated, sotsp_getdata.pro will automatically retrieve the Level 2.1 data file as well. The source code for sotsp_getdata.pro can be found at this link.

Once the Level 2 data have been downloaded, they are read into SSW-style index/data arrays using read_sotsp.pro. The source code for read_sotsp.pro can be found at this link.

Single-Scan Example

As an example, after first defining the ScanID in a variable

scanid='20140316_002851'  ;  164"x123" fast map of AR12002

the SSWIDL commands in the following code block show how to download and read in a scan of AR12002:

sotsp_getdata,scanid,level=2  ;  downloads both level 2 and 2.1 data files
flist=file_search(scanid+'/'+scanid+'.fits')  ;  gets name of level 2 fits file
read_sotsp,flist(0),index,data,scan_info=scan_info,/xycoord
tv,bytscl(data(*,*,0),min=0,max=2e3)

SOT Level 2 scan of AR12002
(field strength)

For this particular ScanID, sotsp_getdata.pro will create a 20140316_002851 directory into which two files named 20140316_002851.fits (the Level 2 data file) and 20140316_002851_L2.1.fits (the Level 2.1 data file) will be downloaded. The read_sotsp.pro routine will then read these files and, on output, return the header information and data in the index and data variables, respectively.

The index variable will be a 42-element array of structures containing the keyword-value pairs for most of the physical quantities from the Level 2 and Level 2.1 processing. The data variable will be a 506×384×42-element array, where each of the 42 planes in the array corresponds to one of the physical quantities of interest. These physical quantities are identified by name in the ftype tag in the index structure array. The final command in the code block above plots an image of the magnetic field strength scaled to 2,000 G, as shown in the image above. Additional images of the physical quantities for this particular ScanID for can be viewed here.

Repeating-Scan Example

Some SOT-SP scans are the result of programs that repeatedly scan a particular area. For these repeating-scan cases, the Level 2 data are in the form of "film strips", i.e., the data will be in a flattened, two-dimensional format. After defining the ScanID in a variable

scanid='20131018_100537'  ;  15.4"x82" repeating maps of quiet Sun

an example of this effect is seen in the following scan of a quiet-Sun region:

sotsp_getdata,scanid,level=2
flist=file_search(scanid+'/'+scanid+'.fits')  ;  gets name of level 2 fits file
read_sotsp,flist(0),index,data,scan_info=scan_info,/xycoord
tv,bytscl(data(*,*,33),min=-1,max=1)

SOT Level 2 scan of quiet
Sun (Stokes V)

The code above will download and read in a repeating scan of a quiet-Sun region, and display an image of Stokes \(V\) (seen at right), where it is evident that the area is scanned multiple times. There are seven full scans, and the beginnings of an eighth scan that was interrupted when the instrument was commanded to stop. Creating a three-dimensional array of physical quantities from the flattened two-dimensional array is one of the functions of the sotsp_rasterize.pro routine, which is discussed in this section. Additional images of the physical quantities for this particular ScanID for can be viewed here.

General Notes about read_sotsp.pro

  • Generally, the index and data arrays will contain as many quantities as are available in the Level 2 and 2.1 data files, assuming the input ScanID is valid. Typically, scans that have not been disambiguated will contain information for 38 physical quantities from the Level 2 processing (as seen in the table found here); otherwise the four additional quantities (as seen in the table found here) will be included as well.

  • If a variable is provided via the scan_info keyword in the call to read_sotsp.pro, on output the resulting structure will contain three tags. The slitpos and times tags will contain the slit position number and observation time for each slit position. The scattpro tag contains the scattered light profile used during the processing.

  • If the /xycoord switch is not set in the call to read_sotsp.pro, then the output index and data variables will not include the \(x\) and \(y\) coordinate arrays.