{"action":"created","issue":{"url":"https://api.github.com/repos/sunpy/sunpy/issues/1097","labels_url":"https://api.github.com/repos/sunpy/sunpy/issues/1097/labels{/name}","comments_url":"https://api.github.com/repos/sunpy/sunpy/issues/1097/comments","events_url":"https://api.github.com/repos/sunpy/sunpy/issues/1097/events","html_url":"https://github.com/sunpy/sunpy/pull/1097","id":37913376,"number":1097,"title":"Added tools for Fermi/GBM data, and added GBM as a lightcurve source","user":{"login":"aringlis","id":1757836,"avatar_url":"https://avatars.githubusercontent.com/u/1757836?v=3","gravatar_id":"","url":"https://api.github.com/users/aringlis","html_url":"https://github.com/aringlis","followers_url":"https://api.github.com/users/aringlis/followers","following_url":"https://api.github.com/users/aringlis/following{/other_user}","gists_url":"https://api.github.com/users/aringlis/gists{/gist_id}","starred_url":"https://api.github.com/users/aringlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aringlis/subscriptions","organizations_url":"https://api.github.com/users/aringlis/orgs","repos_url":"https://api.github.com/users/aringlis/repos","events_url":"https://api.github.com/users/aringlis/events{/privacy}","received_events_url":"https://api.github.com/users/aringlis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sunpy/sunpy/labels/[Review]","name":"[Review]","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"aringlis","id":1757836,"avatar_url":"https://avatars.githubusercontent.com/u/1757836?v=3","gravatar_id":"","url":"https://api.github.com/users/aringlis","html_url":"https://github.com/aringlis","followers_url":"https://api.github.com/users/aringlis/followers","following_url":"https://api.github.com/users/aringlis/following{/other_user}","gists_url":"https://api.github.com/users/aringlis/gists{/gist_id}","starred_url":"https://api.github.com/users/aringlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aringlis/subscriptions","organizations_url":"https://api.github.com/users/aringlis/orgs","repos_url":"https://api.github.com/users/aringlis/repos","events_url":"https://api.github.com/users/aringlis/events{/privacy}","received_events_url":"https://api.github.com/users/aringlis/received_events","type":"User","site_admin":false},"milestone":null,"comments":19,"created_at":"2014-07-15T18:44:36Z","updated_at":"2015-02-04T14:10:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/1097","html_url":"https://github.com/sunpy/sunpy/pull/1097","diff_url":"https://github.com/sunpy/sunpy/pull/1097.diff","patch_url":"https://github.com/sunpy/sunpy/pull/1097.patch"},"body":"Added basic support for Fermi/GBM as a lightcurve source, and some additional tools in sunpy/instr for Fermi. In summary:\r\n\r\n  - Added support for downloading Fermi/GBM quicklook (for now binning is fixed into ~7 channels) data for NaI detectors. BGO is not included yet.\r\n  - Added tools to calculate NaI detector angles vs Sun at any time or for a timerange. This info is useful for choosing which detector to download data for.\r\n\r\nThis is still work in progress. Todo:\r\n  ~~- more cleanup~~\r\n  ~~- add tests~~\r\n  ~~- deal with long timeranges in detector angle queries.~~\r\n\r\nIt would be possible to add support for arbitrary binning of the GBM data here (the native binning is in 128 channels), but this is a grey area between LC and Spectrum, so it's not clear to me how to proceed there. I'll raise this as a separate issue.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sunpy/sunpy/issues/comments/72859756","html_url":"https://github.com/sunpy/sunpy/pull/1097#issuecomment-72859756","issue_url":"https://api.github.com/repos/sunpy/sunpy/issues/1097","id":72859756,"user":{"login":"ehsteve","id":739053,"avatar_url":"https://avatars.githubusercontent.com/u/739053?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsteve","html_url":"https://github.com/ehsteve","followers_url":"https://api.github.com/users/ehsteve/followers","following_url":"https://api.github.com/users/ehsteve/following{/other_user}","gists_url":"https://api.github.com/users/ehsteve/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsteve/subscriptions","organizations_url":"https://api.github.com/users/ehsteve/orgs","repos_url":"https://api.github.com/users/ehsteve/repos","events_url":"https://api.github.com/users/ehsteve/events{/privacy}","received_events_url":"https://api.github.com/users/ehsteve/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T14:10:17Z","updated_at":"2015-02-04T14:10:17Z","body":"@aringlis not sure why you need the html5 library. I tested the following code which should do what you want I think\r\n\r\n```python\r\n>>> from bs4 import BeautifulSoup\r\n>>> import urllib2\r\n>>> base_url = 'http://fermi.gsfc.nasa.gov/ssc/observations/timeline/ft2/files/'\r\n>>> resp=urllib2.urlopen(base_url)\r\n>>> html_string=resp.read().decode('utf-8')\r\n>>> soup = BeautifulSoup(html_string)\r\n>>> [tag['href'] for tag in soup.select('a[href]')]\r\n['?C=N;O=D',\r\n '?C=M;O=A',\r\n '?C=S;O=A',\r\n '?C=D;O=A',\r\n '/ssc/observations/timeline/ft2/',\r\n 'FERMI_POINTING_FINAL_023_2008311_2008318_00.fits',\r\n 'FERMI_POINTING_FINAL_024_2008318_2008325_00.fits',\r\n 'FERMI_POINTING_FINAL_025_2008325_2008332_00.fits',\r\n 'FERMI_POINTING_FINAL_026_2008332_2008339_00.fits',\r\n...\r\n 'FERMI_POINTING_FINAL_197_2012068_2012075_01.fits',\r\n 'FERMI_POINTING_FINAL_197_2012068_2012075_02.fits',\r\n 'FERMI_POINTING_FINAL_198_2012075_2012082_00.fits',\r\n 'FERMI_POINTING_FINAL_199_2012082_2012089_00.fits']\r\n```\r\n"}}