{ "info": { "author": "Adam Burgasser", "author_email": "aburgasser@ucsd.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Astronomy", "Topic :: Scientific/Engineering :: Physics" ], "description": "# SPLAT: The SpeX Prism Library Analysis Toolkit\n\n## Preamble\n\nSPLAT is a python package built upon numpy, scipy, astropy and matplotlib, as well as \nsome other common packages. SPLAT is\ndesigned to interface specifically with the SpeX Prism Library (SPL: http://www.browndwarfs.org/spexprism), \nan online repository of over\n1500 low-resolution, near-infrared spectra of low-temperature stars and brown dwarfs.\nSPLAT tools allow you to search the library; read in spectra from it; perform basic spectral \nanalyses such as classification, index measurement and spectrophotometry; perform\nadvanced analyses such as spectral model fitting and spectral binary analysis; and \nplot/tabulate your results. \n\n## Installation and Dependencies\n\nSPLAT is best forked from this github site, which is updated on a semi-regular basis.\nSPLAT has not yet reached v1.0, so bugs are rampant. Please help us knock them down by \nsending bug reports to aburgasser@ucsd.edu or noting them on the github page (\"Issues\")\n\nDocumentation on setting up and using SPLAT are maintained at http://www.browndwarfs.org/splat\n\nThere are two additional steps to complete to get full functionality:\n\n- Copy the file ``.splat_access`` into your home directory - this is your access key\n\n- Set up your environment variables to find the SPLAT code; this can be done in three ways (in the order of which the code looks for this directory):\n\n\t- Best: create an environment variable called SPLAT_PATH and set it to the root directory of the SPLAT code (in bsh environment, add the line ``export SPLAT_PATH=/Users/adam/projects/splat`` to your .bashrc or .bash_profile)\n\n\t- If you use the PYTHONPATH environment variable, add the root directory of the SPLAT code to it (in bsh environment add the line ``export PYTHONPATH=/Users/adam/projects/splat:${PYTHONPATH}`` to your .bashrc or .bash_profile)\n\n\t- add the root directory of the SPLAT code to your system PATH variable (in bsh environment add the line ``export PATH=/Users/adam/projects/splat:${PATH}`` to your .bashrc or .bash_profile)\n\n## Using SPLAT\n\nThe best place to start is the code documentation, housed at http://www.browndwarfs.org/splat\n\nHere are some examples:\n\n* The best way to read in a spectrum is to use getSpectrum:\n\n```\nimport splat\nsplist = splat.getSpectrum(shortname='0415-0935')\nsplist = splat.getSpectrum(young=True)\nsplist = splat.getSpectrum(spt=['M7','L5'],jmag=[14.,99.])\n```\n\nIn each case, splist is a list of Spectrum objects, which is a container of various \naspects of the spectrum and it source. For example, selecting the first spectrum,\n\n```\nsp = splist[0]\n```\n\nsp.wave gives the wavelength values of this spectrum, sp.flux the flux values, and sp.noise the \nflux uncertainty.\n\nYou can also read in your own spectrum by passing the Spectrum object a filename:\n\n```\nsp = splat.pectrum(filename='myspectrum.fits',local=True)\n```\n\nNote that this file must conform to the standard of the SPL data: the first column is\nwavelength in microns, second column flux in f_lambda units, third column (optional) is \nflux uncertainty.\n\n* To flux calibrate the spectrum, use the object's built in fluxCalibrate() method:\n\n```\nsp = splat.getSpectrum(shortname='0415-0935')[0]\nsp.fluxCalibrate('2MASS J',14.0)\n```\n\n* To display the spectrum, use the Spectrum object's plot function or plotSpectrum\n\n```\nsp.plot()\nsplat.plotSpectrum(sp)\n```\n\nwhich will pop up a window displaying flux and noise vs. wavelength. You can save this \ndisplay by adding a filename:\n\n```\nsplat.plotSpectrum(sp,file='spectrum.png')\n```\n\nYou can also compare multiple spectra:\n\n```\nsp1 = splat.getSpectrum(shortname='0415-0935')[0]\nsp2 = splat.getSpectrum(shortname='1217-0311')[1]\nsplat.plotSpectrum(sp1,sp2,colors=['k','r'])\n```\n\n* To measure spectral indices, use measureIndex or measureIndexSet:\n\n```\nsp = splat.getSpectrum(shortname='0415-0935')[0]\nvalue, error = splat.measureIndex(sp,[1.14,1.165],[1.21,1.235],method='integrate')\nindices = splat.measureIndexSet(sp,set='burgasser')\n```\n\nNote that the latter is a dictionary, whose value,error pair can be accessed by the name \nof the index:\n\n```\nprint indices['H2O-J']\t\t# returns value, error\n```\n\n* To classify a spectrum, use the classifyByXXX methods:\n\n```\nsp = splat.getSpectrum(shortname='0415-0935')[0]\nspt,unc = splat.classifyByIndex(sp,set='burgasser')\nspt,unc = splat.classifyByStandard(sp)\nspt,unc = splat.classifyByTemplate(sp,spt=['M7','L0'])\n```\n\n* To compare a spectrum to another spectrum or a model, use compareSpectra:\n\n```\nsp = splat.getSpectrum(shortname='0415-0935')[0]\nmdl = splat.loadModel(teff=700,logg=5.0,set='BTSettl2008') # currently BTSettl08 only\nchi,scale = splat.compareSpectra(sp,mdl)\nmdl.scale(scale)\nsplat.plotSpectrum(sp,mdl,colors=['k','r'])\n```\n\nThere is a prototype MCMC fitting program that can determine the best fitting model to a spectrum as well\n\n```\nsp = splat.getSpectrum(shortname='0415-0935')[0]\ntable = splat.modelFitMCMC(sp,initial_guess=[800,5.0,0.],nsamples=1000,step_sizes=[50.,0.5,0.])\n```\n\n\nAll of these routines have many options worth exploring, and we are continually adding\nadditional functionality. If there are capabilities\nyou need, please suggest them, or even better contribute your own code!\n\n## Authors\n\nSPLAT is an experimental, collaborative project of research students in Adam Burgasser's\nUCSD Cool Star Lab, aimed at teaching students how to do research by building \ntheir own analysis tools. Contributors to SPLAT include Christian Aganze, Daniella Bardalez Gagliuffi, Adam Burgasser (PI), Caleb Choban, Ivanna Escala, Aishwarya Iyer, Yuhui Jin, Mike Lopez,\nAlex Mendez, Gretel Mercado, Johnny Parra, Maitrayee Sahi, Melisa Tallis, Tomoki Tamiya and Chris Theissen.\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.browndwarfs.org/splat/", "keywords": "splat,spectroscopy,spectral analysis,astronomy,astrophysics,ultracool dwarfs,low mass stars,brown dwarfs,spex,prism,classification", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "splat", "package_url": "https://pypi.org/project/splat/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/splat/", "project_urls": { "Homepage": "http://www.browndwarfs.org/splat/" }, "release_url": "https://pypi.org/project/splat/0.32/", "requires_dist": [ "astropy", "astroquery", "bokeh", "flask", "matplotlib", "numpy", "pandas", "requests", "scipy" ], "requires_python": "", "summary": "SpeX Prism Library Analysis Toolkit", "version": "0.32" }, "last_serial": 2559855, "releases": { "0.31": [ { "comment_text": "", "digests": { "md5": "f3adaa49035802b8bc8c6376337e135e", "sha256": "e2462621b5ab442814890467af77473a1b8444f686aa2688415d1b414bda5922" }, "downloads": -1, "filename": "SPLAT-0.31.tar.gz", "has_sig": false, "md5_digest": "f3adaa49035802b8bc8c6376337e135e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4406842, "upload_time": "2016-12-07T17:23:06", "url": "https://files.pythonhosted.org/packages/4e/95/5a23805527cc37b1507478a20e826b8324f9d267141875989eba5c2ea3d9/SPLAT-0.31.tar.gz" } ], "0.32": [ { "comment_text": "", "digests": { "md5": "d388c09f3baa1070c68342fe458db4d5", "sha256": "e3446cbc765725c788827dd88a71898c7525d58a18b156f64d040d5fa0a83165" }, "downloads": -1, "filename": "SPLAT-0.32-py3-none-any.whl", "has_sig": false, "md5_digest": "d388c09f3baa1070c68342fe458db4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1275742, "upload_time": "2017-01-07T21:56:25", "url": "https://files.pythonhosted.org/packages/26/b7/33a69deb7c2fa54b1befd1a2a228e7fcd2a251f01f59ee647482566899cf/SPLAT-0.32-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69defc9fc2c25fa4413e52433487126", "sha256": "b73db07bef9bd4c3ae06a7bbc1f1848f00715f98dd58bfed8660654822621c4e" }, "downloads": -1, "filename": "SPLAT-0.32.tar.gz", "has_sig": false, "md5_digest": "f69defc9fc2c25fa4413e52433487126", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4450098, "upload_time": "2017-01-07T21:56:47", "url": "https://files.pythonhosted.org/packages/30/55/9e5b394d4d81b8dc8e0fad7c08e85a13188a70a115e5596e35f702ff9325/SPLAT-0.32.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d388c09f3baa1070c68342fe458db4d5", "sha256": "e3446cbc765725c788827dd88a71898c7525d58a18b156f64d040d5fa0a83165" }, "downloads": -1, "filename": "SPLAT-0.32-py3-none-any.whl", "has_sig": false, "md5_digest": "d388c09f3baa1070c68342fe458db4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1275742, "upload_time": "2017-01-07T21:56:25", "url": "https://files.pythonhosted.org/packages/26/b7/33a69deb7c2fa54b1befd1a2a228e7fcd2a251f01f59ee647482566899cf/SPLAT-0.32-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f69defc9fc2c25fa4413e52433487126", "sha256": "b73db07bef9bd4c3ae06a7bbc1f1848f00715f98dd58bfed8660654822621c4e" }, "downloads": -1, "filename": "SPLAT-0.32.tar.gz", "has_sig": false, "md5_digest": "f69defc9fc2c25fa4413e52433487126", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4450098, "upload_time": "2017-01-07T21:56:47", "url": "https://files.pythonhosted.org/packages/30/55/9e5b394d4d81b8dc8e0fad7c08e85a13188a70a115e5596e35f702ff9325/SPLAT-0.32.tar.gz" } ] }