Comment 2 for bug 1012797

Revision history for this message
Jack Ireland (jack-ireland) wrote : Re: [feature request] produce a list of SSWIDL and SunPy commands from Helioviewer requests that can be used to acquire the science data and meta-data

A Solarsoft/IDL script example

Let us say a user has created a movie of overlaid EIT, AIA and LASCO-C2 data, with a view something like this:

http://helioviewer.org/?date=2012-07-16T13:03:54.000Z&imageScale=2.4204409&centerX=1645.6577531368011&centerY=1054.3037030473342&imageLayers=%5BSDO,AIA,AIA,193,1,100%5D,%5BSOHO,EIT,EIT,304,1,50%5D,%5BSOHO,LASCO,C2,white-light,1,100%5D

over the time range 2012/07/16 12:03:54 to 2012/07/16 14:03:54 .

The user has specified a field of view with a partial view of AIA
data. This indicates that the AIA cutout service is the preferred
option. EIT and LASCO-C2 data can be accessed via the VSO. A
potential IDL script could have a filename like

solarsoft_helioviewer_data_script_AIA_EIT_LASCO-C2_20120716_120354__20120716_140354.pro .

The script uses the SDO cutout service. This service requires that the user
define the AIA cutout using a centroid, defined as the latitude and longitude
of the center of the cutout (ref_helio='[centroid coordinates]') and a width
(fovx=width_in_pixels) and height (fovy=height_in_pixels) defined in AIA
original-size pixels.

The full script might look something like this:

;
; Solarsoft data download script solarsoft_helioviewer_data_script_AIA_EIT_LASCO-C2_20120716_120354__20120716_140354.pro
;
; NOTE: this script may make use of the SDO cutout service called via
; a Solarsoft command. To use this command properly, you MUST edit
; the email keyword of the "ssw_cutout_service" command to provide the
; command with YOUR email address.
;
;
; (1) Helioviewer provenance information
; --------------------------------------
;
; Automatically generated by helioviewer.org on 2012/11/28 12:34:56 UT.
; This script uses the Virtual Solar Observatory (VSO) and SDO cutout
; service to access to the science data used to generate
; the helioviewer.org movie http://www.helioviewer.org/?movieid=ApdT15
;
;
; (2) The Solarsoft environment and commands used to find and acquire data
; ------------------------------------------------------------------------
;
; This script requires an up-to-date installation of Solarsoft with
; the ONTOLOGY package installed. Solarsoft requires that you have
; access to an installation of IDL.
;
; This script is provided AS-IS. NOTE: It may require editing for it to
; work on your local system. Also, many of the commands included here
; have more sophisticated options that can be used to optimize your ability
; to acquire the relevant data. Please consult the relevant documentation
; for further information.
;
; To find out more about acquiring solar data, please consult
; the following links are useful:
;
; Installing and upgrading Solarsoft
; http://www.lmsal.com/solarsoft/ssw_install_howto.html
;
; SDO data analysis, Solarsoft, VSO and AIA cutout service
; https://www.lmsal.com/sdodocs/doc/dcur/SDOD0060.zip/zip/entry/
;
; VSO
; http://docs.virtualsolar.org/wiki/VsoIDL/VsoSearch
;
; The commands
;
; IDL> doc_menu,<IDL program name>
;
; or
;
; IDL> xdoc
;
; can also be used to find out more about each command in the script below.
;
;
; (3) Executing the script
; ------------------------
;
; To run this script, place it in a directory that your IDL session is
; aware of and type
;
; IDL> .run solarsoft_helioviewer_data_script_AIA_EIT_LASCO-C2_20120716_120354__20120716_140354.pro
;
; or pre-prend the script with a path to the script, for example,
;
; IDL> .run path/to/script/solarsoft_helioviewer_data_script_AIA_EIT_LASCO-C2_20120716_120354__20120716_140354.pro
;
; Data will be downloaded to your current working directory.
;
;
; (4) Script
; ----------
;
; Search for data in the following date time range
;
tstart = '2012-07-16 12:03:54'
tend = '2012-07-16 14:03:54'

;
; EIT data - downloadable via the VSO
;
a_eit = vso_search(tstart, tend, inst = 'EIT', wave = '304')
b_eit = vso_get( a_eit )

;
; LASCO-C2 data - downloadable via the VSO
;
a_lascoc2 = vso_search(tstart, tend, instrument = 'LASCO', detector = 'C2')
b_lascoc2 = vso_get( a_lascoc2 )

;
; AIA data - downloadable via the SDO cutout service or the VSO.
;
; Helioviewer.org has detected that the movie you made contains a
; partial view of AIA or HMI data. The commands below spawn a request
; to the SDO data cutout service to download only those SDO data in
; the field of view of the movie you made. A script to download the
; full disk SDO data via the VSO is also included below.
;
; The cutout service will notify you by EMAIL when your request is ready.
; PLEASE EDIT THE COMMAND BELOW TO INCLUDE YOUR EMAIL ADDRESS.
;
; AIA data - using the SDO cutout service
;
ssw_cutout_service,tstart,tend,$
 ref_helio='[centroid coordinates]',$
 fovx=width_in_pixels,fovy=height_in_pixels,$
 waves=193,$
 instr='AIA',$
 <email address hidden>'

;
; AIA data - downloadable via the VSO
;
; Optional: download the full disk SDO via the VSO. Remove the comments
; to download full disk SDO data
;
; a_aia = vso_search(tstart, tend, instrument = 'AIA', wave = '193')
; b_aia = vso_get( a_aia )

;
; (5) Script ends
; ---------------
;
END