{ "info": { "author": "Zoltan Sylvester", "author_email": "zoltan.sylvester@beg.utexas.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "\n\n\n## Description\n\n'blockdiagram' is a Python module for creating block diagrams and other three-dimensional displays from stratigraphic models. It is designed to work with [meanderpy](https://github.com/zsylvester/meanderpy), but it should work with any model that consists of a stack of stratigraphic surfaces.\n\n## Requirements\n\nnumpy \nmatplotlib \nmayavi \nscipy \nPIL\n\n## Usage\n\nThe main function in 'blockdiagram' is 'create_exploded_view'. It can either be used to generate a normal block diagram or an exploded-view block diagram, in which the model is split into several smaller blocks so that more stratigraphic detail is visible. Fence diagrams can be created as well. Here is a typical set of input parameters:\n\n```python\nmlab.figure(bgcolor=(1,1,1)) \n# parameters\nve = 15.0 # vertical exaggeration\nscale = 0.1 # scaling of diagram (important for 3D printing)\nstrat_switch = 1 # equals 1 if you want stratigraphy displayed on the sides\nlayers_switch = 0 # equals 1 if you want stratigraphic boundaries displayed on the sides\ncontour_switch = 0 # equals 1 if you want contours displayed on the top surface\ndx = 10.0 # cell size for display\nbottom = np.min(chb_3d.strat) - 1.5 # elevation of bottom side of diagram\ncolor_mode = 'property' # determines how the stratigraphy will be colored; can be 'property', 'facies', or 'time'\ncolors = [[0.5,0.25,0],[0.9,0.9,0],[0.5,0.25,0]] # colors for 'facies' display\nline_thickness = 1.0 # thickness of lines if 'layers_switch' is 1\ngap = 20 # distance between exploded blocks (if any; in number of gridcells)\nh = 5.0 # channel depth (m)\nnx = 1 # number of blocks in x direction\nny = 1 # number of blocks in y direction\n\nbd.create_exploded_view(chb_3d.strat,chb_3d.facies,chb_3d.topo,h,nx,ny,gap,dx,ve,scale,strat_switch,\n layers_switch,contour_switch,color_mode,colors,line_thickness,bottom)\n```\nIf the command above is run with nx=1 and ny=1 (the number of blocks in the x and y directions), a simple block diagram is displayed:\n\n\nChanging nx and ny to 3 results in something like this:\n\n\nBoth of the models above have been colored using the 'property' setting for the 'color_mode' parameter, so that the change from yellow to brown in the point bars reflects the change in grain size (and porosity/permeability). This setting can also be set to 'facies' (when each facies, e.g., point bar vs. overbank, gets its own color) or to 'time', when layers are colored according to their relative age - see example below.\n\n\nAnother functionality is to create a 'random' section from the model. In order to do that, the location of the section has to be selected on a map of the top surface, using the 'select_random_section' function:\n\n```python\nxcoords, ycoords = bd.select_random_section(chb_3d.strat) # define x and y coordinates for random section\nmlab.figure(bgcolor=(1,1,1))\ncolor_mode = 'property'\nbd.create_random_section_n_points(chb_3d.strat,chb_3d.facies,chb_3d.topo,h,scale,ve,color_mode,colors,\n xcoords[:-1],xcoords[1:],ycoords[:-1],ycoords[1:],dx,bottom)\n```\n\n\n\nYou can also cut a \"cookie\" from the model, using the 'create_random_cookie' option:\n\n```python\nxcoords, ycoords = bd.select_random_section(chb_3d.strat) # define x and y coordinates for random section\nmlab.figure(bgcolor=(1,1,1))\nbd.create_random_cookie(chb_3d.strat,chb_3d.facies,chb_3d.topo,h,scale,ve,color_mode,colors,xcoords[:-1],xcoords[1:],\n ycoords[:-1],ycoords[1:],dx,bottom)\n```\n\n\n\nA more traditional way to look at 3D data or models is a fence diagram:\n\n```python\nmlab.figure(bgcolor=(1,1,1))\nbd.create_fence_diagram(chb_3d.strat,chb_3d.facies,chb_3d.topo,h,6,2,gap,dx,ve,scale,layers_switch,color_mode,colors,line_thickness,bottom,export)\n```\n\n\n## License\n\n'blockdiagram' is licensed under the Apache License 2.0\n\nCopyright 2019 Zoltan Sylvester\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zsylvester/blockdiagram", "keywords": "geomorphology,stratigraphy,3D visualization", "license": "", "maintainer": "", "maintainer_email": "", "name": "blockdiagram", "package_url": "https://pypi.org/project/blockdiagram/", "platform": "", "project_url": "https://pypi.org/project/blockdiagram/", "project_urls": { "Homepage": "https://github.com/zsylvester/blockdiagram" }, "release_url": "https://pypi.org/project/blockdiagram/0.1.0/", "requires_dist": [ "numpy", "matplotlib", "mayavi", "scipy", "pillow" ], "requires_python": "", "summary": "Module for creating block diagrams and other three-dimensional displays from stratigraphic models", "version": "0.1.0" }, "last_serial": 5421101, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8ee7a43230d664a29f85fa1e8e96d119", "sha256": "709417201d6ac8ee083e31ab495fa54b4ca8df12ca109a95209b9d7b893f891b" }, "downloads": -1, "filename": "blockdiagram-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8ee7a43230d664a29f85fa1e8e96d119", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18374, "upload_time": "2019-06-19T16:03:39", "url": "https://files.pythonhosted.org/packages/08/68/9b063fc5a550f0e4b29c40cea9a5e7a8180ab62837e3b3aa2e15c0e298ff/blockdiagram-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "399ff1c89c39736a579fd98d965eec4e", "sha256": "f15f9e48753393a84c83eff47d0bd374d70e048d4c5db7fcfcd232a505892033" }, "downloads": -1, "filename": "blockdiagram-0.1.0.tar.gz", "has_sig": false, "md5_digest": "399ff1c89c39736a579fd98d965eec4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9861, "upload_time": "2019-06-19T16:03:41", "url": "https://files.pythonhosted.org/packages/70/49/093e97eafad41d62694cf89e62b45ab350c342498ecb086089b4d6acfcc9/blockdiagram-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ee7a43230d664a29f85fa1e8e96d119", "sha256": "709417201d6ac8ee083e31ab495fa54b4ca8df12ca109a95209b9d7b893f891b" }, "downloads": -1, "filename": "blockdiagram-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8ee7a43230d664a29f85fa1e8e96d119", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18374, "upload_time": "2019-06-19T16:03:39", "url": "https://files.pythonhosted.org/packages/08/68/9b063fc5a550f0e4b29c40cea9a5e7a8180ab62837e3b3aa2e15c0e298ff/blockdiagram-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "399ff1c89c39736a579fd98d965eec4e", "sha256": "f15f9e48753393a84c83eff47d0bd374d70e048d4c5db7fcfcd232a505892033" }, "downloads": -1, "filename": "blockdiagram-0.1.0.tar.gz", "has_sig": false, "md5_digest": "399ff1c89c39736a579fd98d965eec4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9861, "upload_time": "2019-06-19T16:03:41", "url": "https://files.pythonhosted.org/packages/70/49/093e97eafad41d62694cf89e62b45ab350c342498ecb086089b4d6acfcc9/blockdiagram-0.1.0.tar.gz" } ] }