{"action":"opened","number":88,"pull_request":{"url":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88","id":231713575,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzEzNTc1","html_url":"https://github.com/jjhelmus/nmrglue/pull/88","diff_url":"https://github.com/jjhelmus/nmrglue/pull/88.diff","patch_url":"https://github.com/jjhelmus/nmrglue/pull/88.patch","issue_url":"https://api.github.com/repos/jjhelmus/nmrglue/issues/88","number":88,"state":"open","locked":false,"title":"Writing processed data back into Bruker format","user":{"login":"kaustubhmote","id":7735086,"node_id":"MDQ6VXNlcjc3MzUwODY=","avatar_url":"https://avatars1.githubusercontent.com/u/7735086?v=4","gravatar_id":"","url":"https://api.github.com/users/kaustubhmote","html_url":"https://github.com/kaustubhmote","followers_url":"https://api.github.com/users/kaustubhmote/followers","following_url":"https://api.github.com/users/kaustubhmote/following{/other_user}","gists_url":"https://api.github.com/users/kaustubhmote/gists{/gist_id}","starred_url":"https://api.github.com/users/kaustubhmote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaustubhmote/subscriptions","organizations_url":"https://api.github.com/users/kaustubhmote/orgs","repos_url":"https://api.github.com/users/kaustubhmote/repos","events_url":"https://api.github.com/users/kaustubhmote/events{/privacy}","received_events_url":"https://api.github.com/users/kaustubhmote/received_events","type":"User","site_admin":false},"body":"This PR adds a `write_pdata` function to the `fileio/bruker.py` module that can write externally processed data from a `numpy.ndarray` into Bruker processed-data format. The real part of the dataset is written by default, but imaginary datasets can be written out by manually specifying the binary filename (eg '1i', '2ii', etc) and selecting out the appropriate data structure. Writing 2D slices of a 3D data and 1D slices of 2D datasets are also supported. \r\n\r\nIf a Bruker dictionary is supplied (eg 'procs', 'proc2s', etc ), data can be written in a format that can be automatically read by Topspin. This includes things like making appropriate folders inside the standard `pdata` folder.\r\n\r\nTwo examples in the `examples/bruker_write_pdata` folder show how this can be achieved for 1D and 2D datasets. Data with higher dimensions can be written in a smilar manner.\r\n\r\nA major caveat:\r\n1. The `procNs` files no longer reflect the actual parameters that has gone into the processing the data. Since the main use case of function is likely to be reading back the data into Topspin, writing of `procNs` files is unavoidable (but still set to `False` by default). If this is desired, appropriate parameters should be manually put into the `procNs` files. The only place where this is done currently is when writing out slices of a higher dimensional dataset, where the value of the `PPARMOD` parameter in the `procNs` directories is updated to reflect the dimension of the data being written out.    \r\n\r\nA minor caveat:\r\n1. 1D and 2D data processed using nmrglue has a 1-point shift in the scale, probably due to the convenstions for shifting the zero-frequency to the centre (See #54). An option to move the spectrum by 1-point is provided in the `write_pdata` function, but is set to `False` by default.  ","created_at":"2018-11-17T07:45:42Z","updated_at":"2018-11-17T07:45:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88/commits","review_comments_url":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88/comments","review_comment_url":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jjhelmus/nmrglue/issues/88/comments","statuses_url":"https://api.github.com/repos/jjhelmus/nmrglue/statuses/21c5f809f809cf4a369bcbcaa8de2068458dc646","head":{"label":"kaustubhmote:master","ref":"master","sha":"21c5f809f809cf4a369bcbcaa8de2068458dc646","user":{"login":"kaustubhmote","id":7735086,"node_id":"MDQ6VXNlcjc3MzUwODY=","avatar_url":"https://avatars1.githubusercontent.com/u/7735086?v=4","gravatar_id":"","url":"https://api.github.com/users/kaustubhmote","html_url":"https://github.com/kaustubhmote","followers_url":"https://api.github.com/users/kaustubhmote/followers","following_url":"https://api.github.com/users/kaustubhmote/following{/other_user}","gists_url":"https://api.github.com/users/kaustubhmote/gists{/gist_id}","starred_url":"https://api.github.com/users/kaustubhmote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaustubhmote/subscriptions","organizations_url":"https://api.github.com/users/kaustubhmote/orgs","repos_url":"https://api.github.com/users/kaustubhmote/repos","events_url":"https://api.github.com/users/kaustubhmote/events{/privacy}","received_events_url":"https://api.github.com/users/kaustubhmote/received_events","type":"User","site_admin":false},"repo":{"id":41792492,"node_id":"MDEwOlJlcG9zaXRvcnk0MTc5MjQ5Mg==","name":"nmrglue","full_name":"kaustubhmote/nmrglue","private":false,"owner":{"login":"kaustubhmote","id":7735086,"node_id":"MDQ6VXNlcjc3MzUwODY=","avatar_url":"https://avatars1.githubusercontent.com/u/7735086?v=4","gravatar_id":"","url":"https://api.github.com/users/kaustubhmote","html_url":"https://github.com/kaustubhmote","followers_url":"https://api.github.com/users/kaustubhmote/followers","following_url":"https://api.github.com/users/kaustubhmote/following{/other_user}","gists_url":"https://api.github.com/users/kaustubhmote/gists{/gist_id}","starred_url":"https://api.github.com/users/kaustubhmote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaustubhmote/subscriptions","organizations_url":"https://api.github.com/users/kaustubhmote/orgs","repos_url":"https://api.github.com/users/kaustubhmote/repos","events_url":"https://api.github.com/users/kaustubhmote/events{/privacy}","received_events_url":"https://api.github.com/users/kaustubhmote/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kaustubhmote/nmrglue","description":"A module for working with NMR data in Python","fork":true,"url":"https://api.github.com/repos/kaustubhmote/nmrglue","forks_url":"https://api.github.com/repos/kaustubhmote/nmrglue/forks","keys_url":"https://api.github.com/repos/kaustubhmote/nmrglue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaustubhmote/nmrglue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaustubhmote/nmrglue/teams","hooks_url":"https://api.github.com/repos/kaustubhmote/nmrglue/hooks","issue_events_url":"https://api.github.com/repos/kaustubhmote/nmrglue/issues/events{/number}","events_url":"https://api.github.com/repos/kaustubhmote/nmrglue/events","assignees_url":"https://api.github.com/repos/kaustubhmote/nmrglue/assignees{/user}","branches_url":"https://api.github.com/repos/kaustubhmote/nmrglue/branches{/branch}","tags_url":"https://api.github.com/repos/kaustubhmote/nmrglue/tags","blobs_url":"https://api.github.com/repos/kaustubhmote/nmrglue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaustubhmote/nmrglue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaustubhmote/nmrglue/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaustubhmote/nmrglue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaustubhmote/nmrglue/statuses/{sha}","languages_url":"https://api.github.com/repos/kaustubhmote/nmrglue/languages","stargazers_url":"https://api.github.com/repos/kaustubhmote/nmrglue/stargazers","contributors_url":"https://api.github.com/repos/kaustubhmote/nmrglue/contributors","subscribers_url":"https://api.github.com/repos/kaustubhmote/nmrglue/subscribers","subscription_url":"https://api.github.com/repos/kaustubhmote/nmrglue/subscription","commits_url":"https://api.github.com/repos/kaustubhmote/nmrglue/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaustubhmote/nmrglue/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaustubhmote/nmrglue/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaustubhmote/nmrglue/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaustubhmote/nmrglue/contents/{+path}","compare_url":"https://api.github.com/repos/kaustubhmote/nmrglue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaustubhmote/nmrglue/merges","archive_url":"https://api.github.com/repos/kaustubhmote/nmrglue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaustubhmote/nmrglue/downloads","issues_url":"https://api.github.com/repos/kaustubhmote/nmrglue/issues{/number}","pulls_url":"https://api.github.com/repos/kaustubhmote/nmrglue/pulls{/number}","milestones_url":"https://api.github.com/repos/kaustubhmote/nmrglue/milestones{/number}","notifications_url":"https://api.github.com/repos/kaustubhmote/nmrglue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaustubhmote/nmrglue/labels{/name}","releases_url":"https://api.github.com/repos/kaustubhmote/nmrglue/releases{/id}","deployments_url":"https://api.github.com/repos/kaustubhmote/nmrglue/deployments","created_at":"2015-09-02T09:30:10Z","updated_at":"2018-11-17T07:07:24Z","pushed_at":"2018-11-17T07:07:22Z","git_url":"git://github.com/kaustubhmote/nmrglue.git","ssh_url":"git@github.com:kaustubhmote/nmrglue.git","clone_url":"https://github.com/kaustubhmote/nmrglue.git","svn_url":"https://github.com/kaustubhmote/nmrglue","homepage":"","size":19413,"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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jjhelmus:master","ref":"master","sha":"6bf17c7cd85edd65c78210d7abbf0b493b867fb5","user":{"login":"jjhelmus","id":1050278,"node_id":"MDQ6VXNlcjEwNTAyNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1050278?v=4","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"repo":{"id":3732632,"node_id":"MDEwOlJlcG9zaXRvcnkzNzMyNjMy","name":"nmrglue","full_name":"jjhelmus/nmrglue","private":false,"owner":{"login":"jjhelmus","id":1050278,"node_id":"MDQ6VXNlcjEwNTAyNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1050278?v=4","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jjhelmus/nmrglue","description":"A module for working with NMR data in Python","fork":false,"url":"https://api.github.com/repos/jjhelmus/nmrglue","forks_url":"https://api.github.com/repos/jjhelmus/nmrglue/forks","keys_url":"https://api.github.com/repos/jjhelmus/nmrglue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjhelmus/nmrglue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjhelmus/nmrglue/teams","hooks_url":"https://api.github.com/repos/jjhelmus/nmrglue/hooks","issue_events_url":"https://api.github.com/repos/jjhelmus/nmrglue/issues/events{/number}","events_url":"https://api.github.com/repos/jjhelmus/nmrglue/events","assignees_url":"https://api.github.com/repos/jjhelmus/nmrglue/assignees{/user}","branches_url":"https://api.github.com/repos/jjhelmus/nmrglue/branches{/branch}","tags_url":"https://api.github.com/repos/jjhelmus/nmrglue/tags","blobs_url":"https://api.github.com/repos/jjhelmus/nmrglue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjhelmus/nmrglue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjhelmus/nmrglue/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjhelmus/nmrglue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjhelmus/nmrglue/statuses/{sha}","languages_url":"https://api.github.com/repos/jjhelmus/nmrglue/languages","stargazers_url":"https://api.github.com/repos/jjhelmus/nmrglue/stargazers","contributors_url":"https://api.github.com/repos/jjhelmus/nmrglue/contributors","subscribers_url":"https://api.github.com/repos/jjhelmus/nmrglue/subscribers","subscription_url":"https://api.github.com/repos/jjhelmus/nmrglue/subscription","commits_url":"https://api.github.com/repos/jjhelmus/nmrglue/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjhelmus/nmrglue/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjhelmus/nmrglue/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjhelmus/nmrglue/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjhelmus/nmrglue/contents/{+path}","compare_url":"https://api.github.com/repos/jjhelmus/nmrglue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjhelmus/nmrglue/merges","archive_url":"https://api.github.com/repos/jjhelmus/nmrglue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjhelmus/nmrglue/downloads","issues_url":"https://api.github.com/repos/jjhelmus/nmrglue/issues{/number}","pulls_url":"https://api.github.com/repos/jjhelmus/nmrglue/pulls{/number}","milestones_url":"https://api.github.com/repos/jjhelmus/nmrglue/milestones{/number}","notifications_url":"https://api.github.com/repos/jjhelmus/nmrglue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjhelmus/nmrglue/labels{/name}","releases_url":"https://api.github.com/repos/jjhelmus/nmrglue/releases{/id}","deployments_url":"https://api.github.com/repos/jjhelmus/nmrglue/deployments","created_at":"2012-03-15T20:39:00Z","updated_at":"2018-10-12T15:48:49Z","pushed_at":"2018-10-12T15:48:46Z","git_url":"git://github.com/jjhelmus/nmrglue.git","ssh_url":"git@github.com:jjhelmus/nmrglue.git","clone_url":"https://github.com/jjhelmus/nmrglue.git","svn_url":"https://github.com/jjhelmus/nmrglue","homepage":"","size":19098,"stargazers_count":70,"watchers_count":70,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":48,"open_issues":11,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88"},"html":{"href":"https://github.com/jjhelmus/nmrglue/pull/88"},"issue":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/issues/88"},"comments":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/jjhelmus/nmrglue/statuses/21c5f809f809cf4a369bcbcaa8de2068458dc646"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":26,"additions":439,"deletions":21,"changed_files":7}}
{"actor":{"display_login":"kaustubhmote"}}