Function Repository Resource:

SolarImage (1.2.0) current version: 1.4.1 »

Source Notebook

Retrieve images of the Sun from many NASA/ESA scientific instruments

Contributed by: Jeff Bryant

ResourceFunction["SolarImage"][]

returns the most recent HMI intensitygram of the Sun.

ResourceFunction["SolarImage"][date]

returns the HMI intensitygram nearest to the specified date.

ResourceFunction["SolarImage"][{date1,date2,}]

returns an event series of the HMI intensitygrams nearest to the specified dates.

ResourceFunction["SolarImage"][instcode]

returns a most recent solar image from the instrument specified by instcode.

ResourceFunction["SolarImage"][date,instcode]

returns a solar image for the specified instcode nearest to date.

ResourceFunction["SolarImage"][{date1,date2,},instcode]

returns an event series for the specified instcode nearest to the specified dates.

ResourceFunction["SolarImage"][date,instcode,"Image"]

returns a solar image for the specified instcode nearest to date.

ResourceFunction["SolarImage"][date,instcode,"Date"]

returns the observation date for the specified instcode nearest to date.

ResourceFunction["SolarImage"][{date1,date2,},instcode,"EventSeries"]

returns an event series for the specified instcode nearest to the specified dates.

ResourceFunction["SolarImage"]["InstrumentAssociation"]

returns an association of the instrument codes and their descriptions.

Details and Options

If a date isn't specified, the result is for the most recent image available.
If an "EventSeries" is requested, but a list of dates isn't specified, then the results are for the past week with "Day" granularity.
HMI is the Helioseismic and Magnetic Imager on the Solar Dynamics Observatory (SDO).
Solar images come from a variety of NASA/ESA instruments in different wavelengths.
SolarImage takes the following options:
"BlendColors"Automaticcolors to blend together to colorize the resulting image
"Colorize"Automaticwhether to colorize black and white images
ImageSizeMediumimage size of the resulting image
"BlendColors" must either be Automatic or a list of three colors.
Data availability varies depending on the instrument.
The instrument code, instcode, can be any of the following integer values corresponding to known instruments (date range estimates are given where available):
0SOHO EIT 171 (1996/01/05–2013/08/07)
1SOHO EIT 195 (1996/01/05–2013/08/07)
2SOHO EIT 284 (1996/01/05–2013/08/07)
3SOHO EIT 304 (1996/01/05–2013/08/07)
4SOHO LASCO C2 (1996/04/01–present)
5SOHO LASCO C3 (1996/04/14–present)
6SOHO MDI Mag (1996/05/19–2011/01/11)
7SOHO MDI Int (1996/05/19–2011/01/11)
8SDO AIA 94 (2010/06/02–present)
9SDO AIA 131 (2010/06/02–present)
10SDO AIA 171 (2010/06/02–present)
11SDO AIA 193 (2010/06/02–present)
12SDO AIA 211 (2010/06/02–present)
13SDO AIA 304 (2010/06/02–present)
14SDO AIA 335 (2010/06/02–present)
15SDO AIA 1600 (2010/06/02–present)
16SDO AIA 1700 (2010/06/02–present)
17SDO AIA 4500 (2010/06/02–present)
18SDO HMI Int (2010/12/06–present)
19SDO HMI Mag (2010/12/06–present)
20STEREO EUVI-A 171
21STEREO EUVI-A 195
22STEREO EUVI-A 284
23STEREO EUVI-A 304
24STEREO EUVI-B 171
25STEREO EUVI-B 195
26STEREO EUVI-B 284
27STEREO EUVI-B 304
28STEREO COR1-A
29STEREO COR2-A
30STEREO COR1-B
31STEREO COR2-B
32SWAP 174
33SXT AlMgMn
34SXT thin-Al
35SXT white-light
39Hinode XRT Al_med/Al_thick
40Hinode XRT Al_med/Be_thick
42Hinode XRT Al_med/Open
43Hinode XRT Al_med/Ti_poly
44Hinode XRT Al_poly/Al_mesh
45Hinode XRT Al_poly/Al_thick
46Hinode XRT Al_poly/Be_thick
48Hinode XRT Al_poly/Open
49Hinode XRT Al_poly/Ti_poly
54Hinode XRT Be_med/Open
62Hinode XRT C_poly/Al_mesh
63Hinode XRT C_poly/Al_thick
66Hinode XRT C_poly/Open
67Hinode XRT C_poly/Ti_poly
69Hinode XRT Open/Al_mesh
70Hinode XRT Open/Al_thick
71Hinode XRT Open/Be_thick
74Hinode XRT Open/Ti_poly
75TRACE 171
76TRACE 195
77TRACE 284
78TRACE 1216
79TRACE 1550
80TRACE 1600
81TRACE 1700
82TRACE white-light
83COSMO KCor
2000SUVI 94
2001SUVI 131
2002SUVI 171
2003SUVI 195
2004SUVI 284
2005SUVI 304
10001Hinode XRT Any/Any
10002Hinode XRT Any/Al_mesh
10003Hinode XRT Any/Al_thick
10004Hinode XRT Any/Be_thick
10005Hinode XRT Any/Gband
10006Hinode XRT Any/Open
10007Hinode XRT Any/Ti_poly
10008Hinode XRT Al_med/Any
10009Hinode XRT Al_poly/Any
10010Hinode XRT Be_med/Any
10011Hinode XRT Be_thin/Any XRT Be_thin/Open
10012Hinode XRT C_poly/Any
10013Hinode XRT Open/Any

Examples

Basic Examples (6) 

Get the most recent available image of the Sun from the Helioseismic and Magnetic Imager (HMI) on the Solar Dynamics Observatory (SDO):

In[1]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][]
Out[1]=

Get the most recent available image of the Sun from the Atmospheric Imaging Assembly (AIA) at 94 angstroms on SDO:

In[2]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][8]
Out[2]=

Get an image of the sun from the SunSDO HMI Int nearest to a specific date:

In[3]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][DateObject[{2014, 10, 24}], 18]
Out[3]=

Create an event series of solar images for a specified range of dates:

In[4]:=
With[{date = Now},
 ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][DateRange[date - Quantity[1, "Week"], date]]]
Out[4]=

Get an association of instrument codes and their descriptions:

In[5]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["InstrumentAssociation"]
Out[5]=

Return the observation date of the nearest image to the specified date:

In[6]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][
 DateObject[{2001, 3, 29}, TimeZone -> 0], 7, "Date"]
Out[6]=

Scope (5) 

Dates (4) 

Get older images of the Sun from the SOHO mission:

In[7]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][DateObject[{2001, 3, 29}, TimeZone -> 0], 7]
Out[7]=

Get an event series of images for a list of dates:

In[8]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{DateObject[{2023, 7, 1, 12, 0, 0}, TimeZone -> 0], DateObject[{2023, 7, 1, 10, 0, 0}, TimeZone -> 0], DateObject[{2023, 7, 21, 12, 0, 0}, TimeZone -> 0]}]
Out[8]=

Get an event series of images for a range of dates:

In[9]:=
es = With[{date = DateObject[{2001, 3, 29}, TimeZone -> 0]},
  ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][DateRange[date - Quantity[1, "Weeks"], date],
    7]]
Out[9]=
In[10]:=
ListAnimate[es]
Out[10]=

Get the nearest observation times for a range of dates:

In[11]:=
With[{date = Now},
 ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][DateRange[date - Quantity[1, "Week"], date], "Date"]]
Out[11]=

Get an event series of images of the Sun over the past week:

In[12]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["EventSeries"]
Out[12]=

Get an event series of images of the Sun over the past week for a specific instrument:

In[13]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][13, "EventSeries"]
Out[13]=

Instruments (1) 

Choose images from many different instruments:

In[14]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][1]
Out[14]=
In[15]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][2]
Out[15]=
In[16]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][4]
Out[16]=
In[17]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][5]
Out[17]=
In[18]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][6]
Out[18]=
In[19]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][7]
Out[19]=
In[20]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][8]
Out[20]=
In[21]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][9]
Out[21]=
In[22]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][10]
Out[22]=
In[23]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][11]
Out[23]=
In[24]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][12]
Out[24]=
In[25]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][13]
Out[25]=
In[26]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][14]
Out[26]=
In[27]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][15]
Out[27]=
In[28]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][18]
Out[28]=
In[29]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][19]
Out[29]=
In[30]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][20]
Out[30]=
In[31]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][21]
Out[31]=
In[32]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][22]
Out[32]=
In[33]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][23]
Out[33]=
In[34]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][24]
Out[34]=
In[35]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][25]
Out[35]=
In[36]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][26]
Out[36]=
In[37]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][27]
Out[37]=
In[38]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][29]
Out[38]=
In[39]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][32]
Out[39]=
In[40]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][35]
Out[40]=
In[41]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][49]
Out[41]=
In[42]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][75]
Out[42]=
In[43]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][83]
Out[43]=
In[44]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][2003]
Out[44]=
In[45]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][10007]
Out[45]=

Options (2) 

Colorize (1) 

For some instrument codes, "Colorize" can be used to colorize black and white images automatically:

In[46]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][8, "Colorize" -> True]
Out[46]=
In[47]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][10, "Colorize" -> True]
Out[47]=
In[48]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][11, "Colorize" -> True]
Out[48]=
In[49]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][12, "Colorize" -> True]
Out[49]=
In[50]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][13, "Colorize" -> True]
Out[50]=
In[51]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][15, "Colorize" -> True]
Out[51]=
In[52]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][16, "Colorize" -> True]
Out[52]=
In[53]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][18, "Colorize" -> True]
Out[53]=

BlendColors (1) 

"BlendColors" can be used to specify or override the colors used by "Colorize":

In[54]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][18, "Colorize" -> True, "BlendColors" -> {Black, Orange, Yellow}]
Out[54]=

Neat Examples (2) 

The AIA 94 Angström instrument can show images of solar flares:

In[55]:=
ResourceFunction["SolarImage", ResourceVersion->"1.2.0", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][
 DateObject[{2023, 5, 16, 16, 43}, TimeZone -> "GMT"], 9, "Colorize" -> True]
Out[55]=

SpaceWeatherData can also view solar flares by plotting the X-ray emission and observing sudden spikes:

In[56]:=
DateListLogPlot[
 ResourceFunction["SpaceWeatherData"][
  Interval[{DateObject[{2023, 5, 16}, "Day"], DateObject[{2023, 5, 17}, "Day"]}], {"ShortSolarXRayFlux", "LongSolarXRayFlux"}], FrameLabel -> Automatic]
Out[56]=

Version History

  • 1.4.1 – 31 May 2024
  • 1.4.0 – 17 January 2024
  • 1.3.1 – 28 July 2023
  • 1.3.0 – 26 July 2023
  • 1.2.0 – 24 July 2023
  • 1.1.0 – 19 July 2023
  • 1.0.0 – 12 July 2023

Source Metadata

Related Resources

License Information