{ "info": { "author": "Keming Zhang", "author_email": "kemingz@berkeley.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: POSIX", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet", "Topic :: Scientific/Engineering :: Astronomy" ], "description": "[![Build Status](https://travis-ci.com/profjsb/deepCR.svg?token=baKtC9yCzzwzzqM9ihAX&branch=master)](https://travis-ci.com/profjsb/deepCR) [![codecov](https://codecov.io/gh/profjsb/deepCR/branch/master/graph/badge.svg?token=SIwJFmKJqr)](https://codecov.io/gh/profjsb/deepCR)\n[![Documentation Status](https://readthedocs.org/projects/deepcr/badge/?version=latest)](https://deepcr.readthedocs.io/en/latest/?badge=latest)\n\n## deepCR: Deep Learning Based Cosmic Ray Removal for Astronomical Images\n\nIdentify and remove cosmic rays from astronomical images using trained convolutional neural networks.\n\nDocumentation and tutorials: https://deepcr.readthedocs.io/\n\nThis is the installable package which implements the methods described in the paper: Zhang & Bloom (2019), submitted.\n\nCode to reproduce benchmarking results in the paper is at: https://github.com/kmzzhang/deepCR-paper\n\nIf you use this package, please cite Zhang & Bloom (2019): https://arxiv.org/abs/1907.09500 and consider including a\nlink to this repository.\n\nNote: the current release includes only model for HST ACS/WFC.\n\n\n\n### Installation\n\n```bash\npip install deepCR\n```\n\nOr you can install from source:\n\n```bash\ngit clone https://github.com/profjsb/deepCR.git\ncd deepCR/\npython setup.py install\n```\n\n### Quick Start\n\nQuick download of a HST ACS/WFC image\n\n```bash\nwget -O jdba2sooq_flc.fits https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/jdba2sooq_flc.fits\n```\n\nWith Python >=3.5:\n\nFor smaller sized images\n```python\nfrom deepCR import deepCR\nfrom astropy.io import fits\nimage = fits.getdata(\"jdba2sooq_flc.fits\")[:512,:512]\n\n# create an instance of deepCR with specified model configuration\nmdl = deepCR(mask=\"ACS-WFC-F606W-2-32\",\n\t inpaint=\"ACS-WFC-F606W-2-32\",\n device=\"CPU\")\n\n# apply to input image\nmask, cleaned_image = mdl.clean(image, threshold = 0.5)\n# best threshold is highest value that generate mask covering full extent of CR\n# choose threshold by visualizing outputs.\n# note that deepCR-inpaint would overestimate if mask does not fully cover CR.\n\n# if you only need CR mask you may skip image inpainting for shorter runtime\nmask = mdl.clean(image, threshold = 0.5, inpaint=False)\n\n# if you want probabilistic cosmic ray mask instead of binary mask\nprob_mask = mdl.clean(image, binary=False)\n```\n\nFor WFC full size images (4k * 2k), you should specify **segment = True** to tell deepCR to segment the input image into 256*256 patches, and process one patch at a time.\nOtherwise this would take up > 10gb memory. We recommended you use segment = True for images larger than 1k * 1k on CPU. GPU memory limits may be more strict.\n```python\nimage = fits.getdata(\"jdba2sooq_flc.fits\")\nmask, cleaned_image = mdl.clean(image, threshold = 0.5, segment = True)\n```\n\n(CPU only) In place of **segment = True**, you can also specify **parallel = True** and invoke the multi-threaded version of segment mode. This will speed things up. You don't have to specify segment = True again.\n```python\nimage = fits.getdata(\"jdba2sooq_flc.fits\")\nmask, cleaned_image = mdl.clean(image, threshold = 0.5, parallel = True, n_jobs=-1)\n```\n**n_jobs=-1** makes use of all your CPU cores.\n\nNote that this won't speed things up if you're using GPU!\n\n### Currently available models\n\nmask:\n\n ACS-WFC-F606W-2-4\n\n ACS-WFC-F606W-2-32(*)\n\ninpaint:\n\n ACS-WFC-F606W-2-32(*)\n\n ACS-WFC-F606W-3-32\n\nRecommended models are marked in (*). Larger number indicate larger capacity.\n\nInput images should come from *_flc.fits* files which are in units of electrons.\n\n### Limitations and Caveats\n\nThe currently included models are trained and benchmarked on HST ACS/WFC images in the F606W filter.\n\nVisual inspection shows that these models also work well on filters from F435W to F814W. However, users should use a higher threshold (e.g. 0.9) for short wavelength filters to minimize false detections, if any.\n\n### Contributing\n\nWe are very interested in getting bug fixes, new functionality, and new trained models from the community (especially for ground-based imaging and spectroscopy). Please fork this repo and issue a PR with your changes. It will be especially helpful if you add some tests for your changes.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/deepCR/", "keywords": "", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "deepCR", "package_url": "https://pypi.org/project/deepCR/", "platform": "", "project_url": "https://pypi.org/project/deepCR/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/deepCR/" }, "release_url": "https://pypi.org/project/deepCR/0.1.5/", "requires_dist": null, "requires_python": ">=3.5", "summary": "", "version": "0.1.5" }, "last_serial": 5921050, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "463687d858525729d2714c7930d95758", "sha256": "4cf7ef2d469171c3def6c788fd4ee3e37e1da7595e93ea34c7d39a8b05af7bd8" }, "downloads": -1, "filename": "deepCR-0.1.0.tar.gz", "has_sig": false, "md5_digest": "463687d858525729d2714c7930d95758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2536488, "upload_time": "2019-07-21T23:27:38", "url": "https://files.pythonhosted.org/packages/67/7f/a978fdca46db7946f550957d0c456ec2c1de50b68e62f82e22b786c6f1c1/deepCR-0.1.0.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c47493be493ed66ea5c013875056fb82", "sha256": "dff5d564db3f11cde093d07c14695d00161400ddc9aca2a3691f11e6810596bd" }, "downloads": -1, "filename": "deepCR-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c47493be493ed66ea5c013875056fb82", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3137321, "upload_time": "2019-07-23T06:20:33", "url": "https://files.pythonhosted.org/packages/3f/08/cc69b6e54f120241d205e622dcb868972596004050217fb7b0b6dffdf703/deepCR-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "6f723bd5ee18f8f734be07c07027eefd", "sha256": "1a555dac75667492851118f325fb97739c916917d7a5de39120622ac3b5bbd63" }, "downloads": -1, "filename": "deepCR-0.1.4.tar.gz", "has_sig": false, "md5_digest": "6f723bd5ee18f8f734be07c07027eefd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3137935, "upload_time": "2019-07-23T22:21:49", "url": "https://files.pythonhosted.org/packages/79/02/90c4b9a5ef2836940d4800802179e888ab9c24c87a63225e8d4a06d6a859/deepCR-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "34992efc63f6155e17aab1eeabc2b26c", "sha256": "34d427f9491ae274d12946611f49ba2c32f1ec171fd7a236ee2a7d6b97af351f" }, "downloads": -1, "filename": "deepCR-0.1.5.tar.gz", "has_sig": false, "md5_digest": "34992efc63f6155e17aab1eeabc2b26c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3145177, "upload_time": "2019-08-14T13:47:20", "url": "https://files.pythonhosted.org/packages/cd/4d/7a6d39004de588a8edc4dfc3ca7b7ca7ee6fae344303c9c6cb45c8426016/deepCR-0.1.5.tar.gz" } ], "0.2.1rc0": [ { "comment_text": "", "digests": { "md5": "62602466476e0b0fc8826575e17083e3", "sha256": "838e3b4d47083f193436627ba2592c3430703cb28b84c60fc3e0c2292b882756" }, "downloads": -1, "filename": "deepCR-0.2.1rc0.tar.gz", "has_sig": false, "md5_digest": "62602466476e0b0fc8826575e17083e3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4684366, "upload_time": "2019-10-02T23:38:06", "url": "https://files.pythonhosted.org/packages/6d/f7/ec4865516b66682d5e35d13d7a7ecf03d73b6ad0892258b76a96e8ccb779/deepCR-0.2.1rc0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "34992efc63f6155e17aab1eeabc2b26c", "sha256": "34d427f9491ae274d12946611f49ba2c32f1ec171fd7a236ee2a7d6b97af351f" }, "downloads": -1, "filename": "deepCR-0.1.5.tar.gz", "has_sig": false, "md5_digest": "34992efc63f6155e17aab1eeabc2b26c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3145177, "upload_time": "2019-08-14T13:47:20", "url": "https://files.pythonhosted.org/packages/cd/4d/7a6d39004de588a8edc4dfc3ca7b7ca7ee6fae344303c9c6cb45c8426016/deepCR-0.1.5.tar.gz" } ] }