{"action":"created","comment":{"url":"https://api.github.com/repos/linetools/linetools/pulls/comments/73804870","id":73804870,"diff_hunk":"@@ -252,6 +270,37 @@ def test_repr_alis():\n         s = abscomp.repr_alis(fix_strs=('1','2','3','4','5'))\n \n \n+def test_repr_joevp():\n+    # test with b=0, should be replaced by b_default\n+    abscomp, HIlines = mk_comp('HI', b=0*u.km/u.s, use_rand=False)\n+    s = abscomp.repr_joevp('test.fits', b_default=3.3*u.km/u.s)\n+    assert s == 'test.fits|1215.67|2.92939|13.3|3.3|0.|1|1|1|-300.0|300.0|4772.06378216|4781.6240839|HI\\n' \\\n+    'test.fits|1025.7222|2.92939|13.3|3.3|0.|1|1|1|-300.0|300.0|4026.43131868|4034.49782829|HI\\n'\n+    # test with b != 0\n+    abscomp, HIlines = mk_comp('HI', b=15*u.km/u.s, use_rand=False)\n+    s = abscomp.repr_joevp('test.fits', b_default=3.3*u.km/u.s)\n+    assert s == 'test.fits|1215.67|2.92939|13.3|15.0|0.|1|1|1|-300.0|300.0|4772.06378216|4781.6240839|HI\\n' \\\n+    'test.fits|1025.7222|2.92939|13.3|15.0|0.|1|1|1|-300.0|300.0|4026.43131868|4034.49782829|HI\\n'\n+    # test with comment\n+    abscomp.comment = 'Something'\n+    s = abscomp.repr_joevp('test.fits')\n+    assert s == 'test.fits|1215.67|2.92939|13.3|15.0|0.|1|1|1|-300.0|300.0|4772.06378216|4781.6240839|HI# Something\\n' \\\n+    'test.fits|1025.7222|2.92939|13.3|15.0|0.|1|1|1|-300.0|300.0|4026.43131868|4034.49782829|HI# Something\\n'\n+\n+\n+def test_complist_to_joevp():\n+    # will write a file in directory ./files/\n+    abscomp, HIlines = mk_comp('HI', b=15*u.km/u.s, use_rand=False)\n+    comp_list = [abscomp, abscomp]\n+    ltiu.complist_to_joevp(comp_list, 'test.fits', data_path('test_joevp_repr.joevp'))\n+    # now read the output and compare to reference\n+    compare_two_files(data_path('test_joevp_repr.joevp'), data_path('test_joevp_repr_reference.joevp'))\n+    # now add attribute to comp and compare again\n+    abscomp.attrib['b'] = 15*u.km/u.s\n+    ltiu.complist_to_joevp(comp_list, 'test.fits', data_path('test_joevp_repr.joevp'))\n+    compare_two_files(data_path('test_joevp_repr.joevp'), data_path('test_joevp_repr_reference.joevp'))\n+\n+\n def test_get_wvobs_chunks():\n     abscomp, HIlines = mk_comp('HI', zcomp=0., vlim=[0,10]*u.km/u.s)\n     wvobs_chunks = ltiu.get_wvobs_chunks(abscomp)","path":"linetools/isgm/tests/test_use_abscomp.py","position":87,"original_position":87,"commit_id":"1762967b069eeda968485ce508366ff773c557c9","original_commit_id":"1762967b069eeda968485ce508366ff773c557c9","user":{"login":"jnburchett","id":13800698,"avatar_url":"https://avatars.githubusercontent.com/u/13800698?v=3","gravatar_id":"","url":"https://api.github.com/users/jnburchett","html_url":"https://github.com/jnburchett","followers_url":"https://api.github.com/users/jnburchett/followers","following_url":"https://api.github.com/users/jnburchett/following{/other_user}","gists_url":"https://api.github.com/users/jnburchett/gists{/gist_id}","starred_url":"https://api.github.com/users/jnburchett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnburchett/subscriptions","organizations_url":"https://api.github.com/users/jnburchett/orgs","repos_url":"https://api.github.com/users/jnburchett/repos","events_url":"https://api.github.com/users/jnburchett/events{/privacy}","received_events_url":"https://api.github.com/users/jnburchett/received_events","type":"User","site_admin":false},"body":"FYI, joebvp only tries to fit the lines covered in the spectrum, so the extra lines in the input files do not cause any problems from the code's perspective.","created_at":"2016-08-07T16:24:56Z","updated_at":"2016-08-07T16:24:56Z","html_url":"https://github.com/linetools/linetools/pull/278#discussion_r73804870","pull_request_url":"https://api.github.com/repos/linetools/linetools/pulls/278","_links":{"self":{"href":"https://api.github.com/repos/linetools/linetools/pulls/comments/73804870"},"html":{"href":"https://github.com/linetools/linetools/pull/278#discussion_r73804870"},"pull_request":{"href":"https://api.github.com/repos/linetools/linetools/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/linetools/linetools/pulls/278","id":80312704,"html_url":"https://github.com/linetools/linetools/pull/278","diff_url":"https://github.com/linetools/linetools/pull/278.diff","patch_url":"https://github.com/linetools/linetools/pull/278.patch","issue_url":"https://api.github.com/repos/linetools/linetools/issues/278","number":278,"state":"open","locked":false,"title":"Joevp repr","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":"Adding convenient functions for passing from components to JOEVP input file.\r\n\r\n- I also added `AbsComponent.attrib` as dict() that could be potentially filled out. Happy to reconsider other options. ","created_at":"2016-08-05T21:55:04Z","updated_at":"2016-08-07T16:24:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a99faac5d7c3de0fa03926d06b1e82157c3749e7","assignee":{"login":"jnburchett","id":13800698,"avatar_url":"https://avatars.githubusercontent.com/u/13800698?v=3","gravatar_id":"","url":"https://api.github.com/users/jnburchett","html_url":"https://github.com/jnburchett","followers_url":"https://api.github.com/users/jnburchett/followers","following_url":"https://api.github.com/users/jnburchett/following{/other_user}","gists_url":"https://api.github.com/users/jnburchett/gists{/gist_id}","starred_url":"https://api.github.com/users/jnburchett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnburchett/subscriptions","organizations_url":"https://api.github.com/users/jnburchett/orgs","repos_url":"https://api.github.com/users/jnburchett/repos","events_url":"https://api.github.com/users/jnburchett/events{/privacy}","received_events_url":"https://api.github.com/users/jnburchett/received_events","type":"User","site_admin":false},"assignees":[{"login":"jnburchett","id":13800698,"avatar_url":"https://avatars.githubusercontent.com/u/13800698?v=3","gravatar_id":"","url":"https://api.github.com/users/jnburchett","html_url":"https://github.com/jnburchett","followers_url":"https://api.github.com/users/jnburchett/followers","following_url":"https://api.github.com/users/jnburchett/following{/other_user}","gists_url":"https://api.github.com/users/jnburchett/gists{/gist_id}","starred_url":"https://api.github.com/users/jnburchett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnburchett/subscriptions","organizations_url":"https://api.github.com/users/jnburchett/orgs","repos_url":"https://api.github.com/users/jnburchett/repos","events_url":"https://api.github.com/users/jnburchett/events{/privacy}","received_events_url":"https://api.github.com/users/jnburchett/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/linetools/linetools/pulls/278/commits","review_comments_url":"https://api.github.com/repos/linetools/linetools/pulls/278/comments","review_comment_url":"https://api.github.com/repos/linetools/linetools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linetools/linetools/issues/278/comments","statuses_url":"https://api.github.com/repos/linetools/linetools/statuses/1762967b069eeda968485ce508366ff773c557c9","head":{"label":"linetools:joevp_repr","ref":"joevp_repr","sha":"1762967b069eeda968485ce508366ff773c557c9","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-07-11T15:56:13Z","pushed_at":"2016-08-06T12:25:50Z","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":29123,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":12,"forks":10,"open_issues":12,"watchers":6,"default_branch":"master"}},"base":{"label":"linetools:master","ref":"master","sha":"e9ca2569ec6028600b327e1ad3d192dc21b7425c","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-07-11T15:56:13Z","pushed_at":"2016-08-06T12:25:50Z","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":29123,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":12,"forks":10,"open_issues":12,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linetools/linetools/pulls/278"},"html":{"href":"https://github.com/linetools/linetools/pull/278"},"issue":{"href":"https://api.github.com/repos/linetools/linetools/issues/278"},"comments":{"href":"https://api.github.com/repos/linetools/linetools/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/linetools/linetools/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/linetools/linetools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linetools/linetools/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/linetools/linetools/statuses/1762967b069eeda968485ce508366ff773c557c9"}}}}
{"actor":{"display_login":"jnburchett"}}