GitHub PullRequestReviewCommentEvent at 2014-01-29 21:48:45
Repository: gammapy
Actor: cdeil
Payload: {"comment":{"url":"https://api.github.com/repos/gammapy/gammapy/pulls/comments/9286183","id":9286183,"diff_hunk":"@@ -6,9 +6,184 @@\n \"\"\"\n from __future__ import print_function, division\n import logging\n-import json\n+logging.basicConfig(format='%(levelname)s:  %(message)s', level=logging.DEBUG)\n+\n+import numpy as np\n+from astropy.io import fits\n+\n+from ...utils.const import fwhm_to_sigma\n+\n+\n+__all__ = ['GaussCatalog', 'make_test_model', 'read_json', 'MorphModelImageCreator']\n+\n+\n+class MorphModelImageCreator(object):\n+    \"\"\"\n+    Class to create model images from a HGPS pipeline source config file.\n+\n+    Uses astropy to evaluate the source model, with oversampling or integrating\n+    over pixels.\n+\n+    Parameters\n+    ----------\n+    cfg_file : str\n+        Config file with all the sources listed.\n+    exposure : str\n+        Fits image file with the exposure.\n+    psf_file : str (optional)\n+        Json file with PSF information.\n+    background : str (optional)\n+        Fits image file with the background.\n+    apply_psf : bool (default True)\n+        Whether the psf should be applied.\n+    compute_excess : bool (default True)\n+        Whether to compute an excess image.\n+    flux_factor : float (default 1E-12)\n+        Flux conversion factor.\n+\n+    Example\n+    -------\n+    Here is an example how to use `ModelImageCreator`:\n+\n+        >>> model_image_creator = MorphModelImageCreator('input_sherpa.cfg',","path":"gammapy/morphology/model.py","position":44,"original_position":44,"commit_id":"528a4c354a353e0a092135cb2703e5dc75b7ba6e","original_commit_id":"528a4c354a353e0a092135cb2703e5dc75b7ba6e","user":{"login":"cdeil","id":852409,"avatar_url":"https://gravatar.com/avatar/898a54809b35f7b68226f821ac54bfae?d=https%3A%2F%2Fidenticons.github.com%2F0b112481ac1e4f29ab74df7305b4f626.png&r=x","gravatar_id":"898a54809b35f7b68226f821ac54bfae","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"body":"No need to indent here.","created_at":"2014-01-29T21:48:45Z","updated_at":"2014-01-29T21:48:45Z","html_url":"https://github.com/gammapy/gammapy/pull/65#discussion_r9286183","pull_request_url":"https://api.github.com/repos/gammapy/gammapy/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/gammapy/gammapy/pulls/comments/9286183"},"html":{"href":"https://github.com/gammapy/gammapy/pull/65#discussion_r9286183"},"pull_request":{"href":"https://api.github.com/repos/gammapy/gammapy/pulls/65"}}}}