{"action":"created","issue":{"url":"https://api.github.com/repos/dstndstn/tractor/issues/65","labels_url":"https://api.github.com/repos/dstndstn/tractor/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/dstndstn/tractor/issues/65/comments","events_url":"https://api.github.com/repos/dstndstn/tractor/issues/65/events","html_url":"https://github.com/dstndstn/tractor/pull/65","id":91929463,"number":65,"title":"pixscale and decals-dir are now optional inputs","user":{"login":"moustakas","id":1431820,"avatar_url":"https://avatars.githubusercontent.com/u/1431820?v=3","gravatar_id":"","url":"https://api.github.com/users/moustakas","html_url":"https://github.com/moustakas","followers_url":"https://api.github.com/users/moustakas/followers","following_url":"https://api.github.com/users/moustakas/following{/other_user}","gists_url":"https://api.github.com/users/moustakas/gists{/gist_id}","starred_url":"https://api.github.com/users/moustakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moustakas/subscriptions","organizations_url":"https://api.github.com/users/moustakas/orgs","repos_url":"https://api.github.com/users/moustakas/repos","events_url":"https://api.github.com/users/moustakas/events{/privacy}","received_events_url":"https://api.github.com/users/moustakas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-29T22:50:02Z","updated_at":"2015-06-30T02:13:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dstndstn/tractor/pulls/65","html_url":"https://github.com/dstndstn/tractor/pull/65","diff_url":"https://github.com/dstndstn/tractor/pull/65.diff","patch_url":"https://github.com/dstndstn/tractor/pull/65.patch"},"body":"The title speaks for itself.  I tested the code a few different ways and wasn't able to break it, so hopefully this is mostly right.  decals_dir and the affiliated calibration directories are no longer global variables in common.py, but by initializing the Decals() class in DecamImage() class and passing forward decals_dir and the calibration directories everything seems to work OK.\r\n\r\nThe one thing I wasn't sure about in runbrick.py was the difference between initargs.update() and kwargs.update(), but I ended up using the former.\r\n\r\nI'm also not sure how the code will die in Decals() if $DECALS_DIR *and* the optional input decals_dir are both not passed.  Right now there's a printed error message and not much more.\r\n"},"comment":{"url":"https://api.github.com/repos/dstndstn/tractor/issues/comments/116913650","html_url":"https://github.com/dstndstn/tractor/pull/65#issuecomment-116913650","issue_url":"https://api.github.com/repos/dstndstn/tractor/issues/65","id":116913650,"user":{"login":"moustakas","id":1431820,"avatar_url":"https://avatars.githubusercontent.com/u/1431820?v=3","gravatar_id":"","url":"https://api.github.com/users/moustakas","html_url":"https://github.com/moustakas","followers_url":"https://api.github.com/users/moustakas/followers","following_url":"https://api.github.com/users/moustakas/following{/other_user}","gists_url":"https://api.github.com/users/moustakas/gists{/gist_id}","starred_url":"https://api.github.com/users/moustakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moustakas/subscriptions","organizations_url":"https://api.github.com/users/moustakas/orgs","repos_url":"https://api.github.com/users/moustakas/repos","events_url":"https://api.github.com/users/moustakas/events{/privacy}","received_events_url":"https://api.github.com/users/moustakas/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T02:13:54Z","updated_at":"2015-06-30T02:13:54Z","body":"Actually it looks like this doesn't work as advertised because the Decals() class is initialized (without the command-line argument!) every time DecamImage() is instantiated.  Thinking about a fix..."}}