{ "info": { "author": "Alois Dirnaichner", "author_email": "alo.dir@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "colorview2d Readme\n==================\n\nUse colorview2d to visualize and analize 2d data with (linear) axes.\n\nFeatures:\n---------\n\n- Interactive colorbar adjustment.\n- Wide range of adjustable filters (mods) using routines from numpy, scipy and scikit.images:\n \n - interpolation,\n - Gaussian and median filters,\n - scale, rotate, flip, crop\n - thresholding to extract features,\n - absolute value, natural logarithm, derivation\n - something missing? Add a mod easily.\n \n- Plot to pdf or just use the matplotlib figure.\n- Annoyed of matplotlib.pyplots 2d colorplot interface? Simple and\n convenient plot configuration.\n\n - Adjust axis labels, their size and font as well as the plot size.\n - Easily adapt the colorbar to your needs.\n \n- Mass extract linetraces (to depict feature evolution).\n- Save cv2d config files and restore any modifications easily.\n- Save and load data to and from plain text files (gnplot format).\n\nInstallation\n------------\n\nYou can use the python package index via pip\n\n::\n\n sudo pip2.7 install --upgrade colorview2d\n\n*Note*: If you receive a 'Could not find a version that satisfies...' error, try to\nupgrade pip, ``pip install --upgrade pip``\n\nIf you are considering writing your own mods then installation into the\nuserspace is preferable (access to colorview2d/mods to place the mod\nfile).\n\n::\n\n pip2.7 install --user --upgrade colorview2\n\nUsage\n-----\n\nI stronlgy recommend to use ipython interactive shell for this tutorial.\nWe initialize some random data with x and y ranges:\n\n::\n\n import numpy as np\n data = np.random.random((100, 100))\n xrange = (0., np.random.random())\n yrange = (0., np.random.random())\n\nObtain a :class:`colorview2d.Data` instance to initialize the :class:`colorview2d.View`\nobject:\n\n::\n\n import colorview2d\n data = colorview2d.Data(data, (yrange, xrange))\n view = colorview2d.View(data)\n\nNote that the order of the ranges (y range first) is not a typo. It is\nreminiscent of the rows-first order of the 2d array.\n\nWhat is the data about? We add some labels:\n\n::\n\n view.config['Xlabel'] = 'foo (f)'\n view.config['Ylabel'] = 'bar (b)'\n view.config['Cblabel'] = 'nicyness (n)'\n\nLet us have a look.\n\n::\n\n view.show_plt_fig()\n\nYou should see two figures opening, one containing the plot, the\nother two simple matplotlib slider widgets to control the colorbar\ninteractively.\n\nWe do not like the font and the ticks labels are too small\n\n::\n\n view.config.update({'Font': 'Ubuntu', 'Fontsize': 16})\n\nAlso, the colormap, being default matplotlib's jet, is not\ngreyscale-compatible, so we change to 'Blues' (have a look at the\nmatplotlib documentation to get a list of colormaps).\n\n::\n\n view.config['Colormap'] = 'Blues'\n\nIts time to plot a pdf and save the config\n\n::\n\n view.plot_pdf('Nice_unmodified.pdf')\n view.save_config('Nice_unmodified.cv2d')\n\n*Note*: Have a look at the plain text ``Nice_unmodified.cv2d``. The\nconfig is just read as a dict. If you modify this file, changes get\napplied accordingly upon calling ``load_config`` if you do not misspell\nparameter names or options.\n\nIf you want to reuse the config next time, just use it upon\ninitialization of the ``view``:\n\n::\n\n view = cv2d.View(original_data, cfgfile='Nice_unmodified.cv2d')\n\nWe realize that there is some (unphysical :) noise in the data. Nicyness\ndoes not fluctuate so much along foo or bar and our cheap\nnice-intstrument produced some additional fluctuations.\n\n::\n\n view.add_Smooth(1, 1)\n\nThis call is a shortcut to ``view.add_mod('Smooth', (1, 1))``.\nNote that all mods found in the ``colorview2d/mods`` folder can be called\nby ``add_(arg1, arg2, ...)``.\nNow we are interested more in the change of our nice landscape and not\nin its absolute values so we derive along the bar axis\n\n::\n\n view.add_Derive()\n\nHave a look at the ``mods/`` folder for other mods and documentation on\nthe arguments. It is also straightforward to create your own mod there.\nJust have a look at the other mods in the folder.\n\nWe are interested especially in the nicyness between 0.0 and 0.1.\n\n::\n\n view.config.update({'Cbmin':0.0, 'Cbmax':0.1})\n\nAlternatively, just use the slider in the second matplotlib figure to control the colorbar\nlimits.\n\nTo re-use this data later (without having to invoke colorview2d again),\nwe can store the data to a gnuplot-style plain text file.\n\n::\n\n colorview2d.fileloaders.save_gpfile('Nice_smooth_and_derived.dat', view.data)\n\nExtending colorview2d\n---------------------\n\nfileloaders\n~~~~~~~~~~~\n\nHave a look at the :class:`colorview2d.Data` definition in the :module:`colorview2d.data`\nmodule. To create ``Data`` we have to provide the 2d array and the\nbounds of the y and x ranges.\n\n::\n\n data = colorview2d.Data(\n array,\n ((bottom_on_y_axis, top_on_y_axis),\n (left_on_x_axis, right_on_x_axis)))\n\nTo save data, just use the ``Data`` attributes, e.g.\n\n::\n\n my_array = my_view.data.zdata # 2d numpy.array\n my_x_range = my_view.data.x_range # 1d numpy.array (left-to-right)\n my_y_range = my_view.data.y_range # 1d numpy.array (bottom-to-top)\n\nmods\n~~~~\n\nIf you want to apply your own modifications to the ``data``, just put a\nmodule inside the ``colorview2d/mods`` directory (or package, if you\nwish). The module should contain a class\n(with the class name becoming the name of the mod)\nwhich inherits from\n:class:`colorview2d.IMod` and implements the method\n``do_apply(self, data, modargs)``.\n\nThis method is also the right place to document your mods usage, i.e., the\nrequired arguments. The docstring of ``.do_apply``, where ```` is the class's name,\nis displayed when you call\n\n::\n\n help(view.add_())\n\nIn ``do_apply(self, data, modargs)`` you can modifiy the datafile freely,\nthere is no error-checking done on\nthe consistency of the data (axes bounds, dimensions). Have a look at\nthe ``mods/Derive.py`` module for a *minimal* example.\n\nTo see if your mod is added successfully, have a look at\n``my_view.modlist``.\n\n6.10.2015, A. Dirnaichner\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Loisel/colorview2d/tarball/v0.6.5", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Loisel/colorview2d", "keywords": "plotting,colorplot,scientific,numpy,matplotlib", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "colorview2d", "package_url": "https://pypi.org/project/colorview2d/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/colorview2d/", "project_urls": { "Download": "https://github.com/Loisel/colorview2d/tarball/v0.6.5", "Homepage": "https://github.com/Loisel/colorview2d" }, "release_url": "https://pypi.org/project/colorview2d/0.6.5/", "requires_dist": null, "requires_python": null, "summary": "2d color plotting tool", "version": "0.6.5" }, "last_serial": 2390286, "releases": { "0.6": [], "0.6.1": [ { "comment_text": "", "digests": { "md5": "a02486f8468d021c899e651f8e278607", "sha256": "02ab8bcddbf0971688d82681e0cd498ec20e1f545b3ce5d021813cc3a86fc3ce" }, "downloads": -1, "filename": "colorview2d-0.6.1.tar.gz", "has_sig": false, "md5_digest": "a02486f8468d021c899e651f8e278607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22337, "upload_time": "2016-09-29T07:22:41", "url": "https://files.pythonhosted.org/packages/97/27/59a937064cb321cc09f6cda6d4a9880822d1e2436ea27b289bb71f93055e/colorview2d-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "f018acf48411ec62b685fb339f9aec09", "sha256": "80b60bf45f965c77cf7a1f9684068d00426c5a4c7be408adf45a85c0dcd5c339" }, "downloads": -1, "filename": "colorview2d-0.6.2.tar.gz", "has_sig": false, "md5_digest": "f018acf48411ec62b685fb339f9aec09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23336, "upload_time": "2016-09-30T09:51:26", "url": "https://files.pythonhosted.org/packages/58/3e/af724507b093d4f84bad8f7fd167588014fce3253534f5483aa4e88b3971/colorview2d-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "897df099c013008b74a36c5e904ba2a9", "sha256": "f7efc41a8ae2fc3b74dfec1c1a8b9d5285d06e947ddf920ef9bb4ae780c37061" }, "downloads": -1, "filename": "colorview2d-0.6.3.tar.gz", "has_sig": false, "md5_digest": "897df099c013008b74a36c5e904ba2a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23704, "upload_time": "2016-10-04T08:10:38", "url": "https://files.pythonhosted.org/packages/9a/b7/fa8cf9b611a4934f59b88a15071d290246ac67a30e33f452373c8639f2c6/colorview2d-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "0b5d34299bd6b3cf827f986dbf2b1459", "sha256": "b8bff7d0b2b8ae07c5b6bbdc304f5f4125722e659883fa4e71698f87a983ffd0" }, "downloads": -1, "filename": "colorview2d-0.6.4.tar.gz", "has_sig": false, "md5_digest": "0b5d34299bd6b3cf827f986dbf2b1459", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25317, "upload_time": "2016-10-06T08:04:39", "url": "https://files.pythonhosted.org/packages/d3/37/ef90462fae1dddbdcae363c447b641c36a7ea03b9fc11518dc7fa4afb9dd/colorview2d-0.6.4.tar.gz" } ], "0.6.5": [ { "comment_text": "", "digests": { "md5": "b35efe7c1452d4befed6a9ff257dde70", "sha256": "6e3b467354e26e369b8fc8833ad4fb69dc7b824b7c7175efab9a102755fd927b" }, "downloads": -1, "filename": "colorview2d-0.6.5.tar.gz", "has_sig": false, "md5_digest": "b35efe7c1452d4befed6a9ff257dde70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25786, "upload_time": "2016-10-10T08:04:33", "url": "https://files.pythonhosted.org/packages/ae/66/5c08cb6bc1af37aeb9bc738b8a53e78056affcd1fb425cd6b91bd6610f97/colorview2d-0.6.5.tar.gz" } ], "0.6.post4": [ { "comment_text": "", "digests": { "md5": "50dba2f86884eb4a559f7f8bbe3847fd", "sha256": "91c8fadf61489259817584a856520051c9e67c79ea0daa6d230929c5679be7c1" }, "downloads": -1, "filename": "colorview2d-0.6.post4.tar.gz", "has_sig": false, "md5_digest": "50dba2f86884eb4a559f7f8bbe3847fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20138, "upload_time": "2016-09-27T23:09:25", "url": "https://files.pythonhosted.org/packages/ef/ec/f7dd448421594cc976de7a994c8f29ad4e83ef5763c4eb8aae3d2ee64436/colorview2d-0.6.post4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b35efe7c1452d4befed6a9ff257dde70", "sha256": "6e3b467354e26e369b8fc8833ad4fb69dc7b824b7c7175efab9a102755fd927b" }, "downloads": -1, "filename": "colorview2d-0.6.5.tar.gz", "has_sig": false, "md5_digest": "b35efe7c1452d4befed6a9ff257dde70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25786, "upload_time": "2016-10-10T08:04:33", "url": "https://files.pythonhosted.org/packages/ae/66/5c08cb6bc1af37aeb9bc738b8a53e78056affcd1fb425cd6b91bd6610f97/colorview2d-0.6.5.tar.gz" } ] }