{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/comments/30862536","id":30862536,"diff_hunk":"@@ -60,70 +60,94 @@ class ObservationMetaData(object):\n \n     \"\"\"\n     def __init__(self, boundType=None, boundLength=None,\n-                 mjd=None, unrefractedRA=None, unrefractedDec=None, rotSkyPos=0.0,\n-                 bandpassName='r', phoSimMetadata=None, site=None, m5=None, skyBrightness=None):\n+                 mjd=None, unrefractedRA=None, unrefractedDec=None, rotSkyPos=None,\n+                 bandpassName=None, phoSimMetaData=None, site=Site(), m5=None, skyBrightness=None):\n \n-        self.bounds = None\n-        self.boundType = boundType\n-        self.mjd = mjd\n-        self.bandpass = bandpassName\n-        self.skyBrightness = skyBrightness\n+        self._bounds = None\n+        self._boundType = boundType\n+        self._mjd = mjd\n+        self._bandpass = bandpassName\n+        self._skyBrightness = skyBrightness\n+        self._site = site\n \n         if rotSkyPos is not None:\n-            self.rotSkyPos = numpy.radians(rotSkyPos)\n+            self._rotSkyPos = numpy.radians(rotSkyPos)\n         else:\n-            self.rotSkyPos = None\n+            self._rotSkyPos = None\n \n         if unrefractedRA is not None:\n-            self.unrefractedRA = numpy.radians(unrefractedRA)\n+            self._unrefractedRA = numpy.radians(unrefractedRA)\n         else:\n-            self.unrefractedRA = None\n+            self._unrefractedRA = None\n \n         if unrefractedDec is not None:\n-            self.unrefractedDec = numpy.radians(unrefractedDec)\n+            self._unrefractedDec = numpy.radians(unrefractedDec)\n         else:\n-            self.unrefractedDec = None\n+            self._unrefractedDec = None","path":"python/lsst/sims/catalogs/generation/db/ObservationMetaData.py","position":49,"original_position":49,"commit_id":"18b29c6b00ca28a0f57005e5033d756f9d5e3715","original_commit_id":"18b29c6b00ca28a0f57005e5033d756f9d5e3715","user":{"login":"rbiswas4","id":2281358,"avatar_url":"https://avatars.githubusercontent.com/u/2281358?v=3","gravatar_id":"","url":"https://api.github.com/users/rbiswas4","html_url":"https://github.com/rbiswas4","followers_url":"https://api.github.com/users/rbiswas4/followers","following_url":"https://api.github.com/users/rbiswas4/following{/other_user}","gists_url":"https://api.github.com/users/rbiswas4/gists{/gist_id}","starred_url":"https://api.github.com/users/rbiswas4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbiswas4/subscriptions","organizations_url":"https://api.github.com/users/rbiswas4/orgs","repos_url":"https://api.github.com/users/rbiswas4/repos","events_url":"https://api.github.com/users/rbiswas4/events{/privacy}","received_events_url":"https://api.github.com/users/rbiswas4/received_events","type":"User","site_admin":false},"body":"Is it possible to do these more easily by property and setter decorators?","created_at":"2015-05-22T00:51:06Z","updated_at":"2015-05-22T00:51:06Z","html_url":"https://github.com/lsst/sims_catalogs_generation/pull/2#discussion_r30862536","pull_request_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/comments/30862536"},"html":{"href":"https://github.com/lsst/sims_catalogs_generation/pull/2#discussion_r30862536"},"pull_request":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2","id":35656985,"html_url":"https://github.com/lsst/sims_catalogs_generation/pull/2","diff_url":"https://github.com/lsst/sims_catalogs_generation/pull/2.diff","patch_url":"https://github.com/lsst/sims_catalogs_generation/pull/2.patch","issue_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/2","number":2,"state":"open","locked":false,"title":"Feature/sim 1103/rewrite obs metadata","user":{"login":"danielsf","id":1682854,"avatar_url":"https://avatars.githubusercontent.com/u/1682854?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsf","html_url":"https://github.com/danielsf","followers_url":"https://api.github.com/users/danielsf/followers","following_url":"https://api.github.com/users/danielsf/following{/other_user}","gists_url":"https://api.github.com/users/danielsf/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsf/subscriptions","organizations_url":"https://api.github.com/users/danielsf/orgs","repos_url":"https://api.github.com/users/danielsf/repos","events_url":"https://api.github.com/users/danielsf/events{/privacy}","received_events_url":"https://api.github.com/users/danielsf/received_events","type":"User","site_admin":false},"body":"This branch rewrites ObservationMetaData to use getters and setters so that, if users try to change parameters on the fly, the spatial bounds of the field of view remain self-consistent.  Note: if users try to set parameters that were originally set by a phoSimMetaData dict on the fly, ObservationMetaData will raise an exception, since phoSimMetaData contains information specific to phoSim and it is unlikely that the user's changes will leave everything self-consistent.","created_at":"2015-05-18T17:48:37Z","updated_at":"2015-05-22T00:51:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d2d79ea9e3ef75a0a0b0b0b603860359264156f","assignee":{"login":"rbiswas4","id":2281358,"avatar_url":"https://avatars.githubusercontent.com/u/2281358?v=3","gravatar_id":"","url":"https://api.github.com/users/rbiswas4","html_url":"https://github.com/rbiswas4","followers_url":"https://api.github.com/users/rbiswas4/followers","following_url":"https://api.github.com/users/rbiswas4/following{/other_user}","gists_url":"https://api.github.com/users/rbiswas4/gists{/gist_id}","starred_url":"https://api.github.com/users/rbiswas4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbiswas4/subscriptions","organizations_url":"https://api.github.com/users/rbiswas4/orgs","repos_url":"https://api.github.com/users/rbiswas4/repos","events_url":"https://api.github.com/users/rbiswas4/events{/privacy}","received_events_url":"https://api.github.com/users/rbiswas4/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2/commits","review_comments_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2/comments","review_comment_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/2/comments","statuses_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/statuses/18b29c6b00ca28a0f57005e5033d756f9d5e3715","head":{"label":"lsst:feature/SIM-1103/rewrite_obs_metadata","ref":"feature/SIM-1103/rewrite_obs_metadata","sha":"18b29c6b00ca28a0f57005e5033d756f9d5e3715","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":34681675,"name":"sims_catalogs_generation","full_name":"lsst/sims_catalogs_generation","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/sims_catalogs_generation","description":"LSST Simulations package for generating object catalogs","fork":false,"url":"https://api.github.com/repos/lsst/sims_catalogs_generation","forks_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/forks","keys_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/teams","hooks_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/hooks","issue_events_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/events","assignees_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/tags","blobs_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/languages","stargazers_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/stargazers","contributors_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/contributors","subscribers_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/subscribers","subscription_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/subscription","commits_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/merges","archive_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/downloads","issues_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/labels{/name}","releases_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/releases{/id}","created_at":"2015-04-27T17:49:11Z","updated_at":"2015-04-27T21:07:02Z","pushed_at":"2015-05-19T17:11:04Z","git_url":"git://github.com/lsst/sims_catalogs_generation.git","ssh_url":"git@github.com:lsst/sims_catalogs_generation.git","clone_url":"https://github.com/lsst/sims_catalogs_generation.git","svn_url":"https://github.com/lsst/sims_catalogs_generation","homepage":null,"size":9284,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"68b78a5151795a2cbfb05f6238d1ed3ecaf9c70b","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":34681675,"name":"sims_catalogs_generation","full_name":"lsst/sims_catalogs_generation","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/sims_catalogs_generation","description":"LSST Simulations package for generating object catalogs","fork":false,"url":"https://api.github.com/repos/lsst/sims_catalogs_generation","forks_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/forks","keys_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/teams","hooks_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/hooks","issue_events_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/events","assignees_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/tags","blobs_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/languages","stargazers_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/stargazers","contributors_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/contributors","subscribers_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/subscribers","subscription_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/subscription","commits_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/merges","archive_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/downloads","issues_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/labels{/name}","releases_url":"https://api.github.com/repos/lsst/sims_catalogs_generation/releases{/id}","created_at":"2015-04-27T17:49:11Z","updated_at":"2015-04-27T21:07:02Z","pushed_at":"2015-05-19T17:11:04Z","git_url":"git://github.com/lsst/sims_catalogs_generation.git","ssh_url":"git@github.com:lsst/sims_catalogs_generation.git","clone_url":"https://github.com/lsst/sims_catalogs_generation.git","svn_url":"https://github.com/lsst/sims_catalogs_generation","homepage":null,"size":9284,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2"},"html":{"href":"https://github.com/lsst/sims_catalogs_generation/pull/2"},"issue":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/2"},"comments":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/sims_catalogs_generation/statuses/18b29c6b00ca28a0f57005e5033d756f9d5e3715"}}}}