{ "info": { "author": "Michele Cappellari", "author_email": "michele.cappellari@physics.ox.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "The VorBin package\n==================\n\n**Adaptive Voronoi Binning of Two Dimensional Data**\n\n.. image:: https://img.shields.io/pypi/v/vorbin.svg\n :target: https://pypi.org/project/vorbin/\n.. image:: https://img.shields.io/badge/arXiv-astroph:0302262-orange.svg\n :target: https://arxiv.org/abs/astro-ph/0302262\n.. image:: https://img.shields.io/badge/DOI-10.1046/...-green.svg\n :target: https://doi.org/10.1046/j.1365-8711.2003.06541.x\n\nThis VorBin package is a Python implementation of the two-dimensional adaptive\nspatial binning method of `Cappellari & Copin (2003)\n`_. It uses Voronoi\ntessellations to bin data to a given minimum signal-to-noise ratio.\n\n.. contents::\n\nAttribution\n-----------\n\nIf you use this software for your research, please cite\n`Cappellari & Copin (2003) `_.\nThe BibTeX entry for the paper is::\n\n @ARTICLE{Cappellari2003,\n author = {{Cappellari}, M. and {Copin}, Y.},\n title = \"{Adaptive spatial binning of integral-field spectroscopic\n data using Voronoi tessellations}\",\n journal = {MNRAS},\n eprint = {astro-ph/0302262},\n year = 2003,\n volume = 342,\n pages = {345-354},\n doi = {10.1046/j.1365-8711.2003.06541.x}\n }\n\nInstallation\n------------\n\ninstall with::\n\n pip install vorbin\n\nWithout writing access to the global ``site-packages`` directory, use::\n\n pip install --user vorbin\n\nDocumentation\n-------------\n\nA usage example is provided by the procedure ``voronoi_2d_binning_example.py``.\n\nPerform the following simple steps to bin you own 2D data with minimal Python interaction:\n\n1. Write your data vectors [X, Y, Signal, Noise] in the text file\n ``voronoi_2d_binning_example.txt``, following the example provided;\n\n2. Change the line ``targetSN = 50.0`` in the procedure ``voronoi_2d_binning_example.py``,\n to specify the desired target S/N of your final bins;\n\n3. Run the program ``voronoi_2d_binning_example`` and wait for the final plot to appear.\n The output is saved in the text file ``voronoi_2d_binning_output.txt``. The\n last column BIN_NUM in the file is *all* that is needed to actually bin the data;\n\n4. Read the documentation at the beginning of the file ``voronoi_2d_binning.py`` to\n fully understand the meaning of the various optional output parameters.\n\nWhen some pixels have no signal\n-------------------------------\n\nBinning should not be used blindly when some pixels contain significant noise\nbut virtually no signal. This situation may happen e.g. when extracting the gas\nkinematics from observed galaxy spectra. One way of using voronoi_2d_binning\nconsists of first selecting the pixels with S/N above a minimum threshold and\nthen binning each set of connected pixels *separately*. Alternatively one may\noptimally weight the pixels before binning. For details, see Sec. 2.1 of\n`Cappellari & Copin (2003) `_.\n\nBinning X-ray data\n------------------\n\nFor X-ray data, or other data coming from photon-counting devices the noise is\ngenerally accurately Poissonian. In the Poissonian case, the S/N in a bin can\nnever decrease by adding a pixel (see Sec.2.1 of\n`Cappellari & Copin 2003 `_),\nand it is preferable to bin the data *without* first removing the observed pixels\nwith no signal.\n\nBinning very big images\n-----------------------\n\nComputation time in voronoi_2d_binning scales nearly as npixels^1.5, so it may\nbecome a problem for large images (e.g. at the time of writing npixels > 1000x1000).\nLet's assume that we really need to bin the image as a whole and that the S/N in\na significant number of pixels is well above our target S/N. As for many other\ncomputational problems, a way to radically decrease the computation time consists\nof proceeding in a hierarchical manner. Suppose for example we have a 4000x4000\npixels image, we can do the following:\n\n1. Rebin the image regularly (e.g. in groups of 8x8 pixels) to a manageable\n size of 500x500 pixels;\n2. Apply the standard Voronoi 2D-binning procedure to the 500x500 image;\n3. Transform all unbinned pixels (which already have enough S/N) of the\n 500x500 Voronoi 2D-binned image back into their original individual\n full-resolution pixels;\n4. Now apply Voronoi 2D-binning only to the connected regions of\n full-resolution pixels;\n5. Merge the set of lower resolution bins with the higher resolution ones.\n\nLicense\n-------\n\nCopyright (c) 2001-2018 Michele Cappellari\n\nThis software is provided as is without any warranty whatsoever.\nPermission to use, for non-commercial purposes is granted.\nPermission to modify for personal or internal use is granted,\nprovided this copyright and disclaimer are included in all\ncopies of the software. All other rights are reserved.\nIn particular, redistribution of the code is not allowed.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://purl.org/cappellari/software", "keywords": "", "license": "Other/Proprietary License", "maintainer": "", "maintainer_email": "", "name": "vorbin", "package_url": "https://pypi.org/project/vorbin/", "platform": "", "project_url": "https://pypi.org/project/vorbin/", "project_urls": { "Homepage": "http://purl.org/cappellari/software" }, "release_url": "https://pypi.org/project/vorbin/3.1.3/", "requires_dist": null, "requires_python": "", "summary": "VorBin: Voronoi Binning of Two Dimensional Data", "version": "3.1.3" }, "last_serial": 3883009, "releases": { "3.1.3": [ { "comment_text": "", "digests": { "md5": "bb95393c70360ad3ee6c100e1fc8be06", "sha256": "b5cfbda9432c3cede89a05e93a405af408bee6401c3c22032b0e6f9e01bea2dd" }, "downloads": -1, "filename": "vorbin-3.1.3.tar.gz", "has_sig": false, "md5_digest": "bb95393c70360ad3ee6c100e1fc8be06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 83625, "upload_time": "2018-05-21T11:07:17", "url": "https://files.pythonhosted.org/packages/57/62/28a014b314c785700642b29ddf3df50b1785a3bc7caadf93f877893c5952/vorbin-3.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb95393c70360ad3ee6c100e1fc8be06", "sha256": "b5cfbda9432c3cede89a05e93a405af408bee6401c3c22032b0e6f9e01bea2dd" }, "downloads": -1, "filename": "vorbin-3.1.3.tar.gz", "has_sig": false, "md5_digest": "bb95393c70360ad3ee6c100e1fc8be06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 83625, "upload_time": "2018-05-21T11:07:17", "url": "https://files.pythonhosted.org/packages/57/62/28a014b314c785700642b29ddf3df50b1785a3bc7caadf93f877893c5952/vorbin-3.1.3.tar.gz" } ] }