{"action":"created","comment":{"url":"https://api.github.com/repos/linetools/linetools/pulls/comments/53075543","id":53075543,"diff_hunk":"@@ -84,92 +75,205 @@ def from_file(self, ifile, **kwargs):\n           Filename\n         \"\"\"\n         # put import here to avoid circular import with io.py\n-        from .io import readspec\n-        slf = readspec(ifile, **kwargs)\n+        #from .io import readspec\n+        from linetools.spectra import io as tio\n+        reload(tio)\n+        slf = tio.readspec(ifile, **kwargs)\n         return slf\n \n     @classmethod\n     def from_spec1d(cls, spec1d):\n         \"\"\" Input Spectrum1D\n-        \"\"\"\n-        # Giddy up\n-        slf = cls(flux=spec1d.flux, wcs=spec1d.wcs, unit=spec1d.unit,\n-                  uncertainty=spec1d.uncertainty, mask=spec1d.mask,\n-                  meta=spec1d.meta.copy())\n-        slf.co = (spec1d.co if hasattr(spec1d, 'co') else None)\n \n+        Avoids error array for now\n+        \"\"\"\n+        slf = cls.from_tuple((spec1d.dispersion, spec1d.flux))\n+        #slf = cls(flux=spec1d.flux, wcs=spec1d.wcs, unit=spec1d.unit,\n+        #          uncertainty=spec1d.uncertainty, mask=spec1d.mask,\n+        #          meta=spec1d.meta.copy())\n         return slf\n \n     @classmethod\n     def from_tuple(cls, ituple, sort=True, **kwargs):\n-        \"\"\"Make an XSpectrum1D from a tuple of arrays.\n+        \"\"\"Make an XSpectrum1D from a tuple of numpy arrays or Quantity arrays\n \n         Parameters\n         ----------\n         ituple : (wave,flux), (wave,flux,sig) or (wave,flux,sig,cont)\n+          ndarray or Quantity array\n           If wave is unitless, Angstroms are assumed\n+          If flux is unitless, it is made dimensionless","path":"linetools/spectra/xspectrum1d.py","position":117,"original_position":117,"commit_id":"b50a43a4920f959db3e70e777aaa67015867330c","original_commit_id":"b50a43a4920f959db3e70e777aaa67015867330c","user":{"login":"ntejos","id":2862340,"avatar_url":"https://avatars.githubusercontent.com/u/2862340?v=3","gravatar_id":"","url":"https://api.github.com/users/ntejos","html_url":"https://github.com/ntejos","followers_url":"https://api.github.com/users/ntejos/followers","following_url":"https://api.github.com/users/ntejos/following{/other_user}","gists_url":"https://api.github.com/users/ntejos/gists{/gist_id}","starred_url":"https://api.github.com/users/ntejos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntejos/subscriptions","organizations_url":"https://api.github.com/users/ntejos/orgs","repos_url":"https://api.github.com/users/ntejos/repos","events_url":"https://api.github.com/users/ntejos/events{/privacy}","received_events_url":"https://api.github.com/users/ntejos/received_events","type":"User","site_admin":false},"body":"Mention that the units (if any) of sig and cont are assumed to be those of flux (?)","created_at":"2016-02-16T20:46:27Z","updated_at":"2016-02-16T20:46:27Z","html_url":"https://github.com/linetools/linetools/pull/191#discussion_r53075543","pull_request_url":"https://api.github.com/repos/linetools/linetools/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/linetools/linetools/pulls/comments/53075543"},"html":{"href":"https://github.com/linetools/linetools/pull/191#discussion_r53075543"},"pull_request":{"href":"https://api.github.com/repos/linetools/linetools/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/linetools/linetools/pulls/191","id":58548593,"html_url":"https://github.com/linetools/linetools/pull/191","diff_url":"https://github.com/linetools/linetools/pull/191.diff","patch_url":"https://github.com/linetools/linetools/pull/191.patch","issue_url":"https://api.github.com/repos/linetools/linetools/issues/191","number":191,"state":"open","locked":false,"title":"Refactor XSpectrum1D","user":{"login":"profxj","id":3998093,"avatar_url":"https://avatars.githubusercontent.com/u/3998093?v=3","gravatar_id":"","url":"https://api.github.com/users/profxj","html_url":"https://github.com/profxj","followers_url":"https://api.github.com/users/profxj/followers","following_url":"https://api.github.com/users/profxj/following{/other_user}","gists_url":"https://api.github.com/users/profxj/gists{/gist_id}","starred_url":"https://api.github.com/users/profxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profxj/subscriptions","organizations_url":"https://api.github.com/users/profxj/orgs","repos_url":"https://api.github.com/users/profxj/repos","events_url":"https://api.github.com/users/profxj/events{/privacy}","received_events_url":"https://api.github.com/users/profxj/received_events","type":"User","site_admin":false},"body":"Lots and lots\nStill needs docs\nand a bug in FITS I/O makes read/write problematic right now","created_at":"2016-02-07T15:20:20Z","updated_at":"2016-02-16T20:46:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bf487e5f9a5cceb28892ae49e9a54ecf1bd1ccf","assignee":{"login":"nhmc","id":174640,"avatar_url":"https://avatars.githubusercontent.com/u/174640?v=3","gravatar_id":"","url":"https://api.github.com/users/nhmc","html_url":"https://github.com/nhmc","followers_url":"https://api.github.com/users/nhmc/followers","following_url":"https://api.github.com/users/nhmc/following{/other_user}","gists_url":"https://api.github.com/users/nhmc/gists{/gist_id}","starred_url":"https://api.github.com/users/nhmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhmc/subscriptions","organizations_url":"https://api.github.com/users/nhmc/orgs","repos_url":"https://api.github.com/users/nhmc/repos","events_url":"https://api.github.com/users/nhmc/events{/privacy}","received_events_url":"https://api.github.com/users/nhmc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/linetools/linetools/pulls/191/commits","review_comments_url":"https://api.github.com/repos/linetools/linetools/pulls/191/comments","review_comment_url":"https://api.github.com/repos/linetools/linetools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linetools/linetools/issues/191/comments","statuses_url":"https://api.github.com/repos/linetools/linetools/statuses/b50a43a4920f959db3e70e777aaa67015867330c","head":{"label":"linetools:xspec","ref":"xspec","sha":"b50a43a4920f959db3e70e777aaa67015867330c","user":{"login":"linetools","id":12589255,"avatar_url":"https://avatars.githubusercontent.com/u/12589255?v=3","gravatar_id":"","url":"https://api.github.com/users/linetools","html_url":"https://github.com/linetools","followers_url":"https://api.github.com/users/linetools/followers","following_url":"https://api.github.com/users/linetools/following{/other_user}","gists_url":"https://api.github.com/users/linetools/gists{/gist_id}","starred_url":"https://api.github.com/users/linetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linetools/subscriptions","organizations_url":"https://api.github.com/users/linetools/orgs","repos_url":"https://api.github.com/users/linetools/repos","events_url":"https://api.github.com/users/linetools/events{/privacy}","received_events_url":"https://api.github.com/users/linetools/received_events","type":"Organization","site_admin":false},"repo":{"id":36200517,"name":"linetools","full_name":"linetools/linetools","owner":{"login":"linetools","id":12589255,"avatar_url":"https://avatars.githubusercontent.com/u/12589255?v=3","gravatar_id":"","url":"https://api.github.com/users/linetools","html_url":"https://github.com/linetools","followers_url":"https://api.github.com/users/linetools/followers","following_url":"https://api.github.com/users/linetools/following{/other_user}","gists_url":"https://api.github.com/users/linetools/gists{/gist_id}","starred_url":"https://api.github.com/users/linetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linetools/subscriptions","organizations_url":"https://api.github.com/users/linetools/orgs","repos_url":"https://api.github.com/users/linetools/repos","events_url":"https://api.github.com/users/linetools/events{/privacy}","received_events_url":"https://api.github.com/users/linetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linetools/linetools","description":"A package for the analysis of 1d astronomical spectra, especially quasar and galaxy spectra.","fork":false,"url":"https://api.github.com/repos/linetools/linetools","forks_url":"https://api.github.com/repos/linetools/linetools/forks","keys_url":"https://api.github.com/repos/linetools/linetools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linetools/linetools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linetools/linetools/teams","hooks_url":"https://api.github.com/repos/linetools/linetools/hooks","issue_events_url":"https://api.github.com/repos/linetools/linetools/issues/events{/number}","events_url":"https://api.github.com/repos/linetools/linetools/events","assignees_url":"https://api.github.com/repos/linetools/linetools/assignees{/user}","branches_url":"https://api.github.com/repos/linetools/linetools/branches{/branch}","tags_url":"https://api.github.com/repos/linetools/linetools/tags","blobs_url":"https://api.github.com/repos/linetools/linetools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linetools/linetools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linetools/linetools/git/refs{/sha}","trees_url":"https://api.github.com/repos/linetools/linetools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linetools/linetools/statuses/{sha}","languages_url":"https://api.github.com/repos/linetools/linetools/languages","stargazers_url":"https://api.github.com/repos/linetools/linetools/stargazers","contributors_url":"https://api.github.com/repos/linetools/linetools/contributors","subscribers_url":"https://api.github.com/repos/linetools/linetools/subscribers","subscription_url":"https://api.github.com/repos/linetools/linetools/subscription","commits_url":"https://api.github.com/repos/linetools/linetools/commits{/sha}","git_commits_url":"https://api.github.com/repos/linetools/linetools/git/commits{/sha}","comments_url":"https://api.github.com/repos/linetools/linetools/comments{/number}","issue_comment_url":"https://api.github.com/repos/linetools/linetools/issues/comments{/number}","contents_url":"https://api.github.com/repos/linetools/linetools/contents/{+path}","compare_url":"https://api.github.com/repos/linetools/linetools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linetools/linetools/merges","archive_url":"https://api.github.com/repos/linetools/linetools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linetools/linetools/downloads","issues_url":"https://api.github.com/repos/linetools/linetools/issues{/number}","pulls_url":"https://api.github.com/repos/linetools/linetools/pulls{/number}","milestones_url":"https://api.github.com/repos/linetools/linetools/milestones{/number}","notifications_url":"https://api.github.com/repos/linetools/linetools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linetools/linetools/labels{/name}","releases_url":"https://api.github.com/repos/linetools/linetools/releases{/id}","deployments_url":"https://api.github.com/repos/linetools/linetools/deployments","created_at":"2015-05-25T00:15:17Z","updated_at":"2016-02-12T19:03:23Z","pushed_at":"2016-02-12T19:16:22Z","git_url":"git://github.com/linetools/linetools.git","ssh_url":"git@github.com:linetools/linetools.git","clone_url":"https://github.com/linetools/linetools.git","svn_url":"https://github.com/linetools/linetools","homepage":"","size":8444,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":11,"forks":6,"open_issues":11,"watchers":6,"default_branch":"master"}},"base":{"label":"linetools:master","ref":"master","sha":"7e0ea8a4d4cf4b809495dfcd3c5f487344558855","user":{"login":"linetools","id":12589255,"avatar_url":"https://avatars.githubusercontent.com/u/12589255?v=3","gravatar_id":"","url":"https://api.github.com/users/linetools","html_url":"https://github.com/linetools","followers_url":"https://api.github.com/users/linetools/followers","following_url":"https://api.github.com/users/linetools/following{/other_user}","gists_url":"https://api.github.com/users/linetools/gists{/gist_id}","starred_url":"https://api.github.com/users/linetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linetools/subscriptions","organizations_url":"https://api.github.com/users/linetools/orgs","repos_url":"https://api.github.com/users/linetools/repos","events_url":"https://api.github.com/users/linetools/events{/privacy}","received_events_url":"https://api.github.com/users/linetools/received_events","type":"Organization","site_admin":false},"repo":{"id":36200517,"name":"linetools","full_name":"linetools/linetools","owner":{"login":"linetools","id":12589255,"avatar_url":"https://avatars.githubusercontent.com/u/12589255?v=3","gravatar_id":"","url":"https://api.github.com/users/linetools","html_url":"https://github.com/linetools","followers_url":"https://api.github.com/users/linetools/followers","following_url":"https://api.github.com/users/linetools/following{/other_user}","gists_url":"https://api.github.com/users/linetools/gists{/gist_id}","starred_url":"https://api.github.com/users/linetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linetools/subscriptions","organizations_url":"https://api.github.com/users/linetools/orgs","repos_url":"https://api.github.com/users/linetools/repos","events_url":"https://api.github.com/users/linetools/events{/privacy}","received_events_url":"https://api.github.com/users/linetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linetools/linetools","description":"A package for the analysis of 1d astronomical spectra, especially quasar and galaxy spectra.","fork":false,"url":"https://api.github.com/repos/linetools/linetools","forks_url":"https://api.github.com/repos/linetools/linetools/forks","keys_url":"https://api.github.com/repos/linetools/linetools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linetools/linetools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linetools/linetools/teams","hooks_url":"https://api.github.com/repos/linetools/linetools/hooks","issue_events_url":"https://api.github.com/repos/linetools/linetools/issues/events{/number}","events_url":"https://api.github.com/repos/linetools/linetools/events","assignees_url":"https://api.github.com/repos/linetools/linetools/assignees{/user}","branches_url":"https://api.github.com/repos/linetools/linetools/branches{/branch}","tags_url":"https://api.github.com/repos/linetools/linetools/tags","blobs_url":"https://api.github.com/repos/linetools/linetools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linetools/linetools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linetools/linetools/git/refs{/sha}","trees_url":"https://api.github.com/repos/linetools/linetools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linetools/linetools/statuses/{sha}","languages_url":"https://api.github.com/repos/linetools/linetools/languages","stargazers_url":"https://api.github.com/repos/linetools/linetools/stargazers","contributors_url":"https://api.github.com/repos/linetools/linetools/contributors","subscribers_url":"https://api.github.com/repos/linetools/linetools/subscribers","subscription_url":"https://api.github.com/repos/linetools/linetools/subscription","commits_url":"https://api.github.com/repos/linetools/linetools/commits{/sha}","git_commits_url":"https://api.github.com/repos/linetools/linetools/git/commits{/sha}","comments_url":"https://api.github.com/repos/linetools/linetools/comments{/number}","issue_comment_url":"https://api.github.com/repos/linetools/linetools/issues/comments{/number}","contents_url":"https://api.github.com/repos/linetools/linetools/contents/{+path}","compare_url":"https://api.github.com/repos/linetools/linetools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linetools/linetools/merges","archive_url":"https://api.github.com/repos/linetools/linetools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linetools/linetools/downloads","issues_url":"https://api.github.com/repos/linetools/linetools/issues{/number}","pulls_url":"https://api.github.com/repos/linetools/linetools/pulls{/number}","milestones_url":"https://api.github.com/repos/linetools/linetools/milestones{/number}","notifications_url":"https://api.github.com/repos/linetools/linetools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linetools/linetools/labels{/name}","releases_url":"https://api.github.com/repos/linetools/linetools/releases{/id}","deployments_url":"https://api.github.com/repos/linetools/linetools/deployments","created_at":"2015-05-25T00:15:17Z","updated_at":"2016-02-12T19:03:23Z","pushed_at":"2016-02-12T19:16:22Z","git_url":"git://github.com/linetools/linetools.git","ssh_url":"git@github.com:linetools/linetools.git","clone_url":"https://github.com/linetools/linetools.git","svn_url":"https://github.com/linetools/linetools","homepage":"","size":8444,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":11,"forks":6,"open_issues":11,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linetools/linetools/pulls/191"},"html":{"href":"https://github.com/linetools/linetools/pull/191"},"issue":{"href":"https://api.github.com/repos/linetools/linetools/issues/191"},"comments":{"href":"https://api.github.com/repos/linetools/linetools/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/linetools/linetools/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/linetools/linetools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linetools/linetools/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/linetools/linetools/statuses/b50a43a4920f959db3e70e777aaa67015867330c"}}}}