{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/specutils/pulls/comments/197512426","pull_request_review_id":131277004,"id":197512426,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzUxMjQyNg==","diff_hunk":"@@ -9,6 +9,39 @@ Specutils leverages the astropy io registry to provide an interface for convenie\n loading data from files. To create a custom loader, the user must define it in\n a separate python file and place the file in their ``~/.specutils`` directory.\n \n+Loading from a FITS File\n+------------------------\n+A spectra with a *Linear Wavelength Solution* can be read using the `Spectrum1D.read`\n+function to parse the file name and format\n+\n+\n+.. code-block:: python\n+\n+  import os\n+  from specutils import Spectrum1D\n+\n+  file_path = os.path.join('path/to/folder', 'file_with_1d_wcs.fits')\n+\n+  spec = Spectrum1D.read(file_path, format='wcs1d-fits')\n+\n+\n+This will create a `Spectrum1D` object that you can manipulate later.\n+\n+For instance, you could plot the spectrum.\n+\n+.. code-block:: python\n+\n+  import matplotlib.pyplot as plt\n+\n+  plt.title('FITS file with 1D WCS')","path":"docs/custom_loading.rst","position":28,"original_position":28,"commit_id":"a47142d800a8175dafdef629a98f772773d389b8","original_commit_id":"a47142d800a8175dafdef629a98f772773d389b8","user":{"login":"bsipocz","id":6788290,"node_id":"MDQ6VXNlcjY3ODgyOTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6788290?v=4","gravatar_id":"","url":"https://api.github.com/users/bsipocz","html_url":"https://github.com/bsipocz","followers_url":"https://api.github.com/users/bsipocz/followers","following_url":"https://api.github.com/users/bsipocz/following{/other_user}","gists_url":"https://api.github.com/users/bsipocz/gists{/gist_id}","starred_url":"https://api.github.com/users/bsipocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsipocz/subscriptions","organizations_url":"https://api.github.com/users/bsipocz/orgs","repos_url":"https://api.github.com/users/bsipocz/repos","events_url":"https://api.github.com/users/bsipocz/events{/privacy}","received_events_url":"https://api.github.com/users/bsipocz/received_events","type":"User","site_admin":false},"body":"for end-to-end plotting examples, you can use the `.. plot::` directive rather than hard code an image file, example is e.g. here in the astropy docs: https://github.com/astropy/astropy/blob/master/docs/visualization/lupton_rgb.rst\r\n\r\nFull docs: https://matplotlib.org/devel/plot_directive.html","created_at":"2018-06-22T17:18:09Z","updated_at":"2018-06-22T17:18:09Z","html_url":"https://github.com/astropy/specutils/pull/232#discussion_r197512426","pull_request_url":"https://api.github.com/repos/astropy/specutils/pulls/232","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/astropy/specutils/pulls/comments/197512426"},"html":{"href":"https://github.com/astropy/specutils/pull/232#discussion_r197512426"},"pull_request":{"href":"https://api.github.com/repos/astropy/specutils/pulls/232"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/specutils/pulls/232","id":196787293,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2Nzg3Mjkz","html_url":"https://github.com/astropy/specutils/pull/232","diff_url":"https://github.com/astropy/specutils/pull/232.diff","patch_url":"https://github.com/astropy/specutils/pull/232.patch","issue_url":"https://api.github.com/repos/astropy/specutils/issues/232","number":232,"state":"open","locked":false,"title":"Docs additions","user":{"login":"simontorres","id":3878895,"node_id":"MDQ6VXNlcjM4Nzg4OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3878895?v=4","gravatar_id":"","url":"https://api.github.com/users/simontorres","html_url":"https://github.com/simontorres","followers_url":"https://api.github.com/users/simontorres/followers","following_url":"https://api.github.com/users/simontorres/following{/other_user}","gists_url":"https://api.github.com/users/simontorres/gists{/gist_id}","starred_url":"https://api.github.com/users/simontorres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simontorres/subscriptions","organizations_url":"https://api.github.com/users/simontorres/orgs","repos_url":"https://api.github.com/users/simontorres/repos","events_url":"https://api.github.com/users/simontorres/events{/privacy}","received_events_url":"https://api.github.com/users/simontorres/received_events","type":"User","site_admin":false},"body":"Added section that describe how to read a fits file without having to define a custom loader.\r\nThis PR replaces #188 since that one was a bit faulty. It takes into consideration @crawfordsm  suggestions as well, so #188 can be closed.","created_at":"2018-06-22T16:32:20Z","updated_at":"2018-06-22T17:18:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77dcf9888980368138b6326dccf03300715bd282","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/astropy/specutils/pulls/232/commits","review_comments_url":"https://api.github.com/repos/astropy/specutils/pulls/232/comments","review_comment_url":"https://api.github.com/repos/astropy/specutils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/specutils/issues/232/comments","statuses_url":"https://api.github.com/repos/astropy/specutils/statuses/a47142d800a8175dafdef629a98f772773d389b8","head":{"label":"simontorres:docs_additions","ref":"docs_additions","sha":"a47142d800a8175dafdef629a98f772773d389b8","user":{"login":"simontorres","id":3878895,"node_id":"MDQ6VXNlcjM4Nzg4OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3878895?v=4","gravatar_id":"","url":"https://api.github.com/users/simontorres","html_url":"https://github.com/simontorres","followers_url":"https://api.github.com/users/simontorres/followers","following_url":"https://api.github.com/users/simontorres/following{/other_user}","gists_url":"https://api.github.com/users/simontorres/gists{/gist_id}","starred_url":"https://api.github.com/users/simontorres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simontorres/subscriptions","organizations_url":"https://api.github.com/users/simontorres/orgs","repos_url":"https://api.github.com/users/simontorres/repos","events_url":"https://api.github.com/users/simontorres/events{/privacy}","received_events_url":"https://api.github.com/users/simontorres/received_events","type":"User","site_admin":false},"repo":{"id":89006348,"node_id":"MDEwOlJlcG9zaXRvcnk4OTAwNjM0OA==","name":"specutils","full_name":"simontorres/specutils","owner":{"login":"simontorres","id":3878895,"node_id":"MDQ6VXNlcjM4Nzg4OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3878895?v=4","gravatar_id":"","url":"https://api.github.com/users/simontorres","html_url":"https://github.com/simontorres","followers_url":"https://api.github.com/users/simontorres/followers","following_url":"https://api.github.com/users/simontorres/following{/other_user}","gists_url":"https://api.github.com/users/simontorres/gists{/gist_id}","starred_url":"https://api.github.com/users/simontorres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simontorres/subscriptions","organizations_url":"https://api.github.com/users/simontorres/orgs","repos_url":"https://api.github.com/users/simontorres/repos","events_url":"https://api.github.com/users/simontorres/events{/privacy}","received_events_url":"https://api.github.com/users/simontorres/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simontorres/specutils","description":"Affiliated package for 1D spectral operations. Maintainer: @wkerzendorf @nhmc","fork":true,"url":"https://api.github.com/repos/simontorres/specutils","forks_url":"https://api.github.com/repos/simontorres/specutils/forks","keys_url":"https://api.github.com/repos/simontorres/specutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simontorres/specutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simontorres/specutils/teams","hooks_url":"https://api.github.com/repos/simontorres/specutils/hooks","issue_events_url":"https://api.github.com/repos/simontorres/specutils/issues/events{/number}","events_url":"https://api.github.com/repos/simontorres/specutils/events","assignees_url":"https://api.github.com/repos/simontorres/specutils/assignees{/user}","branches_url":"https://api.github.com/repos/simontorres/specutils/branches{/branch}","tags_url":"https://api.github.com/repos/simontorres/specutils/tags","blobs_url":"https://api.github.com/repos/simontorres/specutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simontorres/specutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simontorres/specutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/simontorres/specutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simontorres/specutils/statuses/{sha}","languages_url":"https://api.github.com/repos/simontorres/specutils/languages","stargazers_url":"https://api.github.com/repos/simontorres/specutils/stargazers","contributors_url":"https://api.github.com/repos/simontorres/specutils/contributors","subscribers_url":"https://api.github.com/repos/simontorres/specutils/subscribers","subscription_url":"https://api.github.com/repos/simontorres/specutils/subscription","commits_url":"https://api.github.com/repos/simontorres/specutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/simontorres/specutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/simontorres/specutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/simontorres/specutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/simontorres/specutils/contents/{+path}","compare_url":"https://api.github.com/repos/simontorres/specutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simontorres/specutils/merges","archive_url":"https://api.github.com/repos/simontorres/specutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simontorres/specutils/downloads","issues_url":"https://api.github.com/repos/simontorres/specutils/issues{/number}","pulls_url":"https://api.github.com/repos/simontorres/specutils/pulls{/number}","milestones_url":"https://api.github.com/repos/simontorres/specutils/milestones{/number}","notifications_url":"https://api.github.com/repos/simontorres/specutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simontorres/specutils/labels{/name}","releases_url":"https://api.github.com/repos/simontorres/specutils/releases{/id}","deployments_url":"https://api.github.com/repos/simontorres/specutils/deployments","created_at":"2017-04-21T17:04:20Z","updated_at":"2018-06-22T16:27:49Z","pushed_at":"2018-06-22T16:27:31Z","git_url":"git://github.com/simontorres/specutils.git","ssh_url":"git@github.com:simontorres/specutils.git","clone_url":"https://github.com/simontorres/specutils.git","svn_url":"https://github.com/simontorres/specutils","homepage":"","size":4740,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"6a5445e161fb30244a901059ef9807cc18e729e5","user":{"login":"astropy","id":847984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0Nzk4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2577269,"node_id":"MDEwOlJlcG9zaXRvcnkyNTc3MjY5","name":"specutils","full_name":"astropy/specutils","owner":{"login":"astropy","id":847984,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0Nzk4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/specutils","description":"Affiliated package for 1D spectral operations. Maintainers: @nmearl @crawfordsm @keflavich @eteq","fork":false,"url":"https://api.github.com/repos/astropy/specutils","forks_url":"https://api.github.com/repos/astropy/specutils/forks","keys_url":"https://api.github.com/repos/astropy/specutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/specutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/specutils/teams","hooks_url":"https://api.github.com/repos/astropy/specutils/hooks","issue_events_url":"https://api.github.com/repos/astropy/specutils/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/specutils/events","assignees_url":"https://api.github.com/repos/astropy/specutils/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/specutils/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/specutils/tags","blobs_url":"https://api.github.com/repos/astropy/specutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/specutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/specutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/specutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/specutils/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/specutils/languages","stargazers_url":"https://api.github.com/repos/astropy/specutils/stargazers","contributors_url":"https://api.github.com/repos/astropy/specutils/contributors","subscribers_url":"https://api.github.com/repos/astropy/specutils/subscribers","subscription_url":"https://api.github.com/repos/astropy/specutils/subscription","commits_url":"https://api.github.com/repos/astropy/specutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/specutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/specutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/specutils/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/specutils/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/specutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/specutils/merges","archive_url":"https://api.github.com/repos/astropy/specutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/specutils/downloads","issues_url":"https://api.github.com/repos/astropy/specutils/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/specutils/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/specutils/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/specutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/specutils/labels{/name}","releases_url":"https://api.github.com/repos/astropy/specutils/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/specutils/deployments","created_at":"2011-10-14T16:11:38Z","updated_at":"2018-06-12T21:40:03Z","pushed_at":"2018-06-22T16:32:21Z","git_url":"git://github.com/astropy/specutils.git","ssh_url":"git@github.com:astropy/specutils.git","clone_url":"https://github.com/astropy/specutils.git","svn_url":"https://github.com/astropy/specutils","homepage":"http://specutils.readthedocs.io/en/latest/","size":4708,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":62,"open_issues":35,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/specutils/pulls/232"},"html":{"href":"https://github.com/astropy/specutils/pull/232"},"issue":{"href":"https://api.github.com/repos/astropy/specutils/issues/232"},"comments":{"href":"https://api.github.com/repos/astropy/specutils/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/specutils/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/specutils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/specutils/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/specutils/statuses/a47142d800a8175dafdef629a98f772773d389b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bsipocz"}}