{ "info": { "author": "NGeorgescu", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "\n\n# XMIMSIM\n\n\nXMIMSIM (the python package) is a front-end to XMI-MSIM, XRF open-source simulation software, for running in python.\n\n\n## Installation\n\n### MacOS\nOn mac, acquire XMIMSIM through [homebrew](http://brew.sh). To install do **not** use the brewsci/science tap\n\n brew tap tschoonj/tap\n brew cask install tschoonj/tap/xmi-msim\n\n### Linux/Windows\nFollow the instructions [here](https://github.com/tschoonj/xmimsim/wiki/Installation-instructions).\n\n\n### Python\n\nInstall the python utility with\n\n pip install xmimsim\n\n## Getting started\n\nThe examples folder contains the following example: \n\n import xmimsim as xmi \n\nThere is only one class currently in xmimsim, so one could just as easily use `from xmimsim import model`.\n\nFrom there, the parameters can be defined as a dictionary:\n\n parameters = {'n_photons_interval' : 1,'n_photons_line' : 100000,'n_interactions_trajectory' : 1,\n 'reference_layer' : 2,'d_sample_source' : 100,'area_detector' : 0.5,\n 'collimator_height' : 0,'collimator_diameter' : 0,'d_source_slit' : 100,\n 'slit_size_x' : 0.001,'slit_size_y' : 0.001,'detector_type' : 'SiLi',\n 'detector_live_time' : 1500,'detector_pulse_width' : 1e-05,'detector_nchannels' : 2048,\n 'detector_gain' : 0.0182138,'detector_zero' : 0,'detector_fano' : 0.12,'detector_noise' : 0.1}\n\nto be injected into the code. The model is initialized with:\n\n xm = xmi.model()\n\nfrom there the model, `xm`, can be added to, e.g.:\n\n xm.set_parameters(**parameters)\n xm.add_source(\n energy = 13.5,\n horizontal_intensity = '1e+012',\n vertical_intensity = '1e+009',\n gaussian=0.14)\n\nAll these classes return self, so one can actually do this all with one line, i.e. `xm.set_parameters(**parameters).add_source(....)`\n\nThe beampath layers are added: \n\n xm.add_excitation_path_layer(atomic_numbers=[4], masses=[100], density=1.85, thickness=0.02)\n xm.add_detector_path_layer(atomic_numbers=[4], masses=[100], density=1.85, thickness=0.0025)\n xm.add_crystal_layer(atomic_numbers=[14], masses=[100], density=2.33, thickness=0.35)\n\nWhich behave like regular analyte layers:\n\n xm.add_layer(symbols=['N','O','Ar'],masses=[70,29,1],density=.00122,thickness=3)\n xm.add_layer(symbols=['As','Fe'],masses=[50,50],density=7.31,thickness=0.01)\n\nOrientations are defined:\n\n xm.sample_orientation(rthetaphi=[1,270+65,0])\n xm.detector_orientation(rthetaphi=[1,135,0])\n xm.detector_window(xyz=[0,5.6,0])\n\nThe filename is defined for this, although this is not strictly necessary:\n\n xm.set_filename('xmsi_testfile')\n\nAnd the calculation is run, discarding the massive xmso in favor of the csv file (default): \n\n xm.calculate(M_lines=False, auger_cascade=True,radiative_cascade=False)\n\nWe can print out the number of photons from each of the following bands.\n\n print(xm.count_photons(**{'k_a_Fe':[6.098,6.744],'k_b_Fe':[6.7801,7.340],'k_a_As':[10.196,10.890],'k_b_As':[11.472,11.999]})) \n\n`xm.get_spectrum()` also returns a plottable spectrum from the xmi file.\n\nIf you simply copy the blocks of code together into one file and run it it should give you an output.\n\n## Changelog\n\n### 0.0.1\n\n - Initial Release\n\n### 0.0.2\n\n - Fixed windows command, but it requires some changing of environment variables to make it run.\n - Fixed some header issues with the readme\n - Cleaned up example.py file\n\n### 0.1.0\n\n - Fixing the windows problem broke *nix versions. Fixed.\n\n### 0.1.1\n\n - Added default of no collimator or detector offset\n - Fixed a minor bug in the code (should not change any answers) with element arrays normalizations\n\n### 0.1.2\n\n - Fixed Readme document type so PyPI handles it correctly\n\n### 0.1.3\n\n - Allowed larger numbers of interaction counts (greater than 1) in get_spectrum() method\n\n## Contributing\nThanks to [Tom Schoonjans](https://github.com/tschoonj) for creating XMI-MSIM. Special thanks to the [vapory](https://github.com/Zulko/vapory) package, which some of the inspiration for this code comes from (also a python interface for a third-party utility).\n\nReport problems to my gmail: nsgeorgescu\n\nNGeorgescu : [https://github.com/NGeorgescu](https://github.com/NGeorgescu)\n\nGithub : [https://github.com/NGeorgescu/xmimsim.git](https://github.com/NGeorgescu/xmimsim.git)\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": "", "keywords": "xmimsim xmi msim xrf fluorescence x-ray xray simulation", "license": "see LICENSE.txt", "maintainer": "", "maintainer_email": "", "name": "xmimsim", "package_url": "https://pypi.org/project/xmimsim/", "platform": "", "project_url": "https://pypi.org/project/xmimsim/", "project_urls": null, "release_url": "https://pypi.org/project/xmimsim/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Toolkit for making and processing X-ray fluoresence simulations via XMI-MSIM", "version": "0.1.3" }, "last_serial": 5764630, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2c0d1700b0eea9e43bda98460761f003", "sha256": "1fe5ff220ea3ff9f82cb1596ac47a9d40ee31a712b3fac2a586f42fbe5224766" }, "downloads": -1, "filename": "xmimsim-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2c0d1700b0eea9e43bda98460761f003", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12415, "upload_time": "2018-10-12T03:09:23", "url": "https://files.pythonhosted.org/packages/7a/ab/188345c41b6e07a4ba0b11122a791be540f7fa6704c5bd03e209f9badc8b/xmimsim-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "bc09cf0ee82e1dce8bc5461e78c2c7a1", "sha256": "669194ea86d7ab23f53ab67e06ac25e07acd199cce0e16da8bde95b8c29a0132" }, "downloads": -1, "filename": "xmimsim-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bc09cf0ee82e1dce8bc5461e78c2c7a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13270, "upload_time": "2018-10-12T17:22:13", "url": "https://files.pythonhosted.org/packages/ae/c0/aadda06648fbdaea52651d3717567a087d6c15d85457dd4aab1b5a1b5639/xmimsim-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "3eaaaee1892ceda66952b83cfe44e8c4", "sha256": "f76d2186788749fe29b1e24792acf25a0919fbe77525d65350c450fcf10a8fc1" }, "downloads": -1, "filename": "xmimsim-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3eaaaee1892ceda66952b83cfe44e8c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13369, "upload_time": "2018-10-12T19:03:27", "url": "https://files.pythonhosted.org/packages/88/1b/c42b1432bce92afa76a872fe656bbf1073e9ba5586ee70626ec97f9f60e5/xmimsim-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "831f07e72273bcca2981e2244979f9b9", "sha256": "aeaa4b6c24a2d478fd6b103578bf5cbda6b8334365664fd096251afa6c0b512d" }, "downloads": -1, "filename": "xmimsim-0.1.1.tar.gz", "has_sig": false, "md5_digest": "831f07e72273bcca2981e2244979f9b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13619, "upload_time": "2018-10-16T20:28:09", "url": "https://files.pythonhosted.org/packages/57/28/f2d9f47fcfc1f908530e1c85969f0cc86de2412f3669e4cbb60b8db8d4e5/xmimsim-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b2440f671c82dd4d3970d87fc604e934", "sha256": "a72ddb8cb158c96af3341b11942111b54d018da7b7034463e71ac95b1b9df2b0" }, "downloads": -1, "filename": "xmimsim-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b2440f671c82dd4d3970d87fc604e934", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12746, "upload_time": "2019-08-29T04:01:08", "url": "https://files.pythonhosted.org/packages/3d/60/12e6d54ff9bd85c42c4e6fa6a85470904ef0d4983eca761e49e9ebf524ff/xmimsim-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97767a2c88f26dcb16d1710cac44761f", "sha256": "74fb0a3f9a85ed3f115934f653972a0bc19607f7ca18f9d5eab53690895346da" }, "downloads": -1, "filename": "xmimsim-0.1.2.tar.gz", "has_sig": false, "md5_digest": "97767a2c88f26dcb16d1710cac44761f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12817, "upload_time": "2019-08-29T04:01:10", "url": "https://files.pythonhosted.org/packages/bf/d1/de37bcc31c7cc59ba7588950be081f3192ae77a56772d65093d7f5c42d52/xmimsim-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bf527f6eedcf5cfea9f27c6d57bcc32d", "sha256": "5548f8e2470f0bbc2743db0963f509a0ac03896f940d8b89fe4f7830fb12acd7" }, "downloads": -1, "filename": "xmimsim-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "bf527f6eedcf5cfea9f27c6d57bcc32d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12828, "upload_time": "2019-08-31T16:00:44", "url": "https://files.pythonhosted.org/packages/37/52/dfbd249a1721e2aafb0bcba4ea1df1ee549a1ca44d3d22582cfc32919195/xmimsim-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "889a4bad8f9aefd2d54a526409dd21a1", "sha256": "4301a44fdbe69b41017b02ccfbe52fe2d67692855bb54fad852330050ac7d33b" }, "downloads": -1, "filename": "xmimsim-0.1.3.tar.gz", "has_sig": false, "md5_digest": "889a4bad8f9aefd2d54a526409dd21a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12959, "upload_time": "2019-08-31T16:00:46", "url": "https://files.pythonhosted.org/packages/b4/59/fb62f05a9c9b5eb757280b99f5ed5d3c31a3e6caa7dc5c2b2531ad9664f0/xmimsim-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf527f6eedcf5cfea9f27c6d57bcc32d", "sha256": "5548f8e2470f0bbc2743db0963f509a0ac03896f940d8b89fe4f7830fb12acd7" }, "downloads": -1, "filename": "xmimsim-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "bf527f6eedcf5cfea9f27c6d57bcc32d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12828, "upload_time": "2019-08-31T16:00:44", "url": "https://files.pythonhosted.org/packages/37/52/dfbd249a1721e2aafb0bcba4ea1df1ee549a1ca44d3d22582cfc32919195/xmimsim-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "889a4bad8f9aefd2d54a526409dd21a1", "sha256": "4301a44fdbe69b41017b02ccfbe52fe2d67692855bb54fad852330050ac7d33b" }, "downloads": -1, "filename": "xmimsim-0.1.3.tar.gz", "has_sig": false, "md5_digest": "889a4bad8f9aefd2d54a526409dd21a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12959, "upload_time": "2019-08-31T16:00:46", "url": "https://files.pythonhosted.org/packages/b4/59/fb62f05a9c9b5eb757280b99f5ed5d3c31a3e6caa7dc5c2b2531ad9664f0/xmimsim-0.1.3.tar.gz" } ] }