Produce a list of SSWIDL and SunPy commands from Helioviewer requests that can be used to acquire the science data and meta-data

Bug #1012797 reported by Jack Ireland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Helioviewer.org
Triaged
Medium
Jeff Stys

Bug Description

Users create movies and screenshots of solar data that correspond to science data and meta-data. It would be great if we could take the information entered by the user that describe the movie/screenshot and convert that into either the corresponding SSWIDL or SunPy commands that can be used to download the science data (and meta-data).

summary: - [feature request] produce a list of commands to acquire data and meta-
- data from Helioviewer requests
+ [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
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

The following link is useful for getting AIA-cutout data via SSWIDL

https://www.lmsal.com/sdodocs/doc/dcur/SDOD0060.zip/zip/entry/sdoguidese5.html#x10-390005.4

Revision history for this message
Jack Ireland (jack-ireland) wrote :
Download full text (4.9 KiB)

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 sess...

Read more...

summary: - [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
+ Produce a list of SSWIDL and SunPy commands from Helioviewer requests
+ that can be used to acquire the science data and meta-data
Revision history for this message
Jack Ireland (jack-ireland) wrote :

The SDO cutout service requires the center of the field of view of the cutout be defined in Stoneyhurst-heliographic co-ordinates. Sunpy wcs module can convert the helioprojective Cartesian co-ordinates used in Helioviewer to Stoneyhurst-heliographic co-ordinates (use convert_hcc_hg).

Changed in helioviewer.org:
milestone: none → 2.4.1
no longer affects: helioviewer.org/2.3
Changed in helioviewer.org:
assignee: nobody → Jack Ireland (jack-ireland)
assignee: Jack Ireland (jack-ireland) → Jeff Stys (jstys-z)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jack Ireland (jack-ireland) wrote :
Download full text (3.1 KiB)

A skeleton sunpy download script.

I've split the data acquisition script down to a very atomic level, basically trying to reproduce how people select features and events in helioviewer.org. This might get tedious if there are a lot of choices.

#
# SunPy data download script
# helioviewer_data_script_AIA_EIT_LASCO-C2_20120716_120354__20120716_140354.py
#
#
# (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; www.virtualsolar.org)
# and the Heliophysics Event Knowledgebase (HEK; www.lmsal.com/hek)
# service to access to the science data used to generate
# the helioviewer.org movie http://www.helioviewer.org/?movieid=ApdT15
#
#
# (2) The SunPy environment and commands used to find and acquire data
# ------------------------------------------------------------------------
#
# This script requires an up-to-date installation of SunPy. To install
# SunPy, please follow the instructions at www.sunpy.org.
#
# 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.
#
# IMPORTANT NOTE
# These scripts query the VSO for the records they have access to. Data
# relevant to your request may be available elsewhere. Likewise, the HEK
# provides only the feature and event information they have access to.
# Other features and events relevant to your request may be available
# elsewhere.

from sunpy.net import vso
from sunpy.net import hek

vso_client = vso.VSOClient()
hek_client = hek.HEKClient()

# Query 1: AIA 171 data (full disk only)
vso_result1 = vso_client.query(vso.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), vso.attrs.Instrument('aia'), vso.attrs.Wave(171,171))

# Query 2: AIA 304 data (full disk only)
vso_result2 = vso_client.query(vso.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), vso.attrs.Instrument('aia'), vso.attrs.Wave(304,304))

# Query 3: LASCO C2
vso_result3 = vso_client.query(vso.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), vso.attrs.Instrument('lasco-c2') )

# Download 1: AIA data (full disk only). WARNING - this may be a lot of data
vso_data1 = vso_client.get(vso_result1 , path='/Users/myname/data/')

# Download 2: AIA data (full disk only). WARNING - this may be a lot of data
vso_data2 = vso_client.get(vso_result2, path='/Users/myname/data/')

# Download 3: LASCO C2
vso_data3 = vso_client.get(vso_result3, path='/Users/myname/data/')

# Download 4: HEK results
hek_data1 = hek_client.query(hek.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), hek.attrs.FL, hek.attrs.FRM.Name == 'SSW Latest Events')

# Download 5: HEK results
hek_data2 = hek_client.query(hek.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), hek.attrs.CM)

# Download 6: HEK results
hek_data3 = hek_client.query(hek.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), hek.attrs.AR, hek.attrs.FRM.Name == 'S...

Read more...

Revision history for this message
Jack Ireland (jack-ireland) wrote :

The lasco command should be amended:

vso_result3 = vso_client.query(vso.attrs.Time('2012/07/16 12:03:54', '2012/07/16 14:03:54'), vso.attrs.Instrument('lasco-'), vso.attrs.Detector('C2'))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.