No results after querying the HEK for CMEs

14 views
Skip to first unread message

Kamen Kozarev

unread,
May 12, 2015, 3:27:11 AM5/12/15
to su...@googlegroups.com
Hi guys,

I am just entering the world of SunPy, and it's great so far - congratulations for the great work!
One question I have is about querying the HEK from SunPy. I did the following to get all CMEs detected between mid-2010 and several days ago:

from sunpy.net import hek
client = hek.HEKClient()
tstart = '2011/06/09 07:23:56'
tend = '2015/05/09 12:40:29'
event_type = 'CE'
result = client.query(hek.attrs.Time(tstart,tend),hek.attrs.EventType(event_type))

I got no error messages, but also no results:

In [35]: len(result)

Out[35]: 0

Any ideas what I'm doing wrong?

Thanks,

Kamen

DVD PS

unread,
May 12, 2015, 6:00:56 AM5/12/15
to sunpy
Hi Kamen,

 
I am just entering the world of SunPy, and it's great so far - congratulations for the great work!

Great! one more on board :)
 
One question I have is about querying the HEK from SunPy. I did the following to get all CMEs detected between mid-2010 and several days ago:

from sunpy.net import hek
client = hek.HEKClient()
tstart = '2011/06/09 07:23:56'
tend = '2015/05/09 12:40:29'
event_type = 'CE'
result = client.query(hek.attrs.Time(tstart,tend),hek.attrs.EventType(event_type))

I got no error messages, but also no results:

In [35]: len(result)

Out[35]: 0

Any ideas what I'm doing wrong?

I can confirm the same on my end... but I think I've found the reason. If I go to HEK and I do the query:

http://www.lmsal.com/hek/her?cosec=2&cmd=search&type=column&event_type=CE&event_starttime=2015-05-01T00:00:00&event_endtime=2015-05-07T00:00:00

I get no results, however, if I add the limits:

&event_coordsys=helioprojective&x1=-10000&x2=10000&y1=-10000&y2=10000

I do get them.. and so in SunPy.  so you need to add to the query these ranges in the following way:
result = client.query(hek.attrs.Time(tstart,tend),hek.attrs.EventType(event_type), hek.attrs.SpatialRegion(x1=-10000,x2=10000,y1=-10000,y2=10000))

I would say that if that it's not input HEK should provide the whole range... but it seems it's not the case. 
Anyone from HEK on the list that could give us a better insight??

Cheers,
David



Jack Ireland

unread,
May 12, 2015, 10:00:02 AM5/12/15
to su...@googlegroups.com
The SSWIDL HEK client adds in a default spatial region that is much bigger than the region SunPy defines.

Currently SunPy adds this default spatial region
whereas the SSWIDL HEK client sets x1=-5000&x2=5000&y1=-5000&y2=5000.  This might be the reason why the SunPy client does not catch any CMEs by default.

The default extent of the SunPy HEK spatial region attribute should be extended to whatever default size is required to encompass all the CME detections.

jack


--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at http://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.

Kamen Kozarev

unread,
May 12, 2015, 10:47:05 AM5/12/15
to su...@googlegroups.com
Thanks David and Jack,

I see what the problem is...
Now it works fine. I'm glad I helped potentially improve SunPy :)

Kamen

Jack Ireland

unread,
May 12, 2015, 10:48:32 AM5/12/15
to su...@googlegroups.com
I manually specified the spatial extent of a SSWIDL HEK query for CMEs using the SunPy default, and retrieved no matches.  This behavior is consistent with the explanation given for the lack of results from SunP's HEK client.

Thanks Kamen for reporting this.

Jack Ireland

unread,
May 12, 2015, 10:55:09 AM5/12/15
to su...@googlegroups.com
I've reported this as an issue, along with the suggested fix.

Kamen Kozarev

unread,
May 12, 2015, 11:31:10 AM5/12/15
to su...@googlegroups.com
One more strange thing that may be useful to know:
I ran the query 
result = client.query(hek.attrs.Time(tstart,tend),hek.attrs.EventType(event_type), hek.attrs.SpatialRegion(x1=-10000,x2=10000,y1=-10000,y2=10000))
and got

In [37]: len(result)

Out[37]: 900

Then I changed the X and Y range to twice as small, and reran:

result = client.query(hek.attrs.Time(tstart,tend),hek.attrs.EventType(event_type),hek.attrs.SpatialRegion(x1=-5000,x2=5000,y1=-5000,y2=5000))

I got

In [40]: len(result)

Out[40]: 5438

So six times more results! That is indeed strange behavior...

Reply all
Reply to author
Forward
0 new messages