{ "info": { "author": "Andrew R. Casey, David W. Hogg, Melissa Ness", "author_email": "andrew.casey@monash.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Astronomy", "Topic :: Scientific/Engineering :: Physics" ], "description": "# The Cannon\n\n[![Build Status](https://img.shields.io/travis/andycasey/AnniesLasso/refactor.svg)](https://travis-ci.org/andycasey/AnniesLasso)\n[![Coverage Status](https://img.shields.io/coveralls/andycasey/AnniesLasso/refactor.svg)](https://coveralls.io/github/andycasey/AnniesLasso?branch=refactor)\n[![Scrutinizer](https://img.shields.io/scrutinizer/g/andycasey/AnniesLasso.svg?b=refactor)](https://scrutinizer-ci.com/g/andycasey/AnniesLasso/?branch=refactor)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/andycasey/AnniesLasso/blob/refactor/LICENSE)\n\n\n[See the documentation.](#)\n\n## Authors\n- **Andy Casey** (Cambridge) (Monash)\n- **David W. Hogg** (NYU) (MPIA) (SCDA)\n- **Melissa K. Ness** (MPIA)\n- **Hans-Walter Rix** (MPIA)\n- **Anna Y. Q. Ho** (Caltech)\n- **Gerry Gilmore** (Cambridge)\n\n\n## License\n**Copyright 2017 the authors**.\nThe code in this repository is released under the open-source **MIT License**.\nSee the file `LICENSE` for more details.\n\n\n## Installation\n\nTo install:\n\n``\npip install https://github.com/andycasey/AnniesLasso/archive/refactor.zip\n``\n\n\n## Getting Started\n\nLet us assume that you have rest-frame continuum-normalized spectra for a set of\nstars for which the stellar parameters and chemical abundances (which we will\ncollectively call *labels*) are known with high fidelity. The labels for those\nstars (and the locations of the spectrum fluxes and inverse variances) are\nassumed to be stored in a table. In this example all stars are assumed to be \nsampled on the same wavelength (dispersion) scale.\n\n\nHere we will create and train a 3-label (effective temperature, surface gravity,\nmetallicity) quadratic (e.g., `Teff^2`) model:\n\n\n````python\nimport numpy as np\nfrom astropy.table import Table\n\nimport AnniesLasso as tc\n\n# Load the table containing the training set labels, and the spectra.\ntraining_set = Table.read(\"training_set_labels.fits\")\n\n# Here we will assume that the flux and inverse variance arrays are stored in\n# different ASCII files. The end goal is just to produce flux and inverse\n# variance arrays of shape (N_stars, N_pixels).\nnormalized_flux = np.array([np.loadtxt(star[\"flux_filename\"]) for star in training_set])\nnormalized_ivar = np.array([np.loadtxt(star[\"ivar_filename\"]) for star in training_set])\n\n# Providing the dispersion to the model is optional, but handy later on.\ndispersion = np.loadtxt(\"common_wavelengths.txt\")\n\n# Create the model that will run in parallel using all available cores.\nmodel = tc.CannonModel(training_set, normalized_flux, normalized_ivar,\n dispersion=dispersion, threads=-1)\n\n# Specify the complexity of the model:\nmodel.vectorizer = tc.vectorizer.NormalizedPolynomialVectorizer(labelled_set,\n tc.vectorizer.polynomial.terminator((\"TEFF\", \"LOGG\", \"FEH\"), 2))\n\n# Train the model!\nmodel.train()\n````\n\nYou can follow this example further in the complete [Getting Started](#) tutorial.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://thecannon.io", "keywords": "The Cannon", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "the-cannon", "package_url": "https://pypi.org/project/the-cannon/", "platform": "", "project_url": "https://pypi.org/project/the-cannon/", "project_urls": { "Homepage": "http://thecannon.io" }, "release_url": "https://pypi.org/project/the-cannon/0.2.6/", "requires_dist": null, "requires_python": "", "summary": "A data-driven approach to stellar spectroscopy", "version": "0.2.6" }, "last_serial": 2685654, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "4e10df3d6d9befa1da1063755109f8dd", "sha256": "0b1c55e22166d867db88b3a80cfd0ec48c38f02e76ebe18989aec07b0883461f" }, "downloads": -1, "filename": "the-cannon-0.2.3.tar.gz", "has_sig": false, "md5_digest": "4e10df3d6d9befa1da1063755109f8dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25315, "upload_time": "2017-03-06T07:00:07", "url": "https://files.pythonhosted.org/packages/f6/7e/0173bfb3ff4b15ec2355d0bd178bbb4aeb8d145460cfadabe2d9708c436a/the-cannon-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "eaa99143c1c210e391373edfaf58f714", "sha256": "f7b13eb65142c23bf8d49cb558f4481caabb3f7d643fa2d0429f0b48a6605733" }, "downloads": -1, "filename": "the-cannon-0.2.4.tar.gz", "has_sig": false, "md5_digest": "eaa99143c1c210e391373edfaf58f714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25933, "upload_time": "2017-03-06T09:47:12", "url": "https://files.pythonhosted.org/packages/3c/e0/89e2e7d5c036b5f5ba7c6bc180330a94ac18dcb49a5b1a19b4c55e714f02/the-cannon-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "e120505ace118ee05bd239a421f2682a", "sha256": "a89b93fceb6fb3f136c68343f942b943e5897c10c7ef8a897a14ee5e2aaa0c2d" }, "downloads": -1, "filename": "the-cannon-0.2.5.tar.gz", "has_sig": false, "md5_digest": "e120505ace118ee05bd239a421f2682a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25470, "upload_time": "2017-03-06T11:24:41", "url": "https://files.pythonhosted.org/packages/8d/19/835b2d9aff0e84e6b7570dd5cf4fa855756db0c800ca4bb8a5a0029e8409/the-cannon-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "fed7ec32dcc5b1d2d5453180c89ea519", "sha256": "727178f1be58cd3c0781dee23755053faee2a93d71eb3be4f80849ddcfc1f4ef" }, "downloads": -1, "filename": "the-cannon-0.2.6.tar.gz", "has_sig": false, "md5_digest": "fed7ec32dcc5b1d2d5453180c89ea519", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25516, "upload_time": "2017-03-06T11:30:50", "url": "https://files.pythonhosted.org/packages/66/29/16938507e570d73c2242e8b46bb1854f00d7704675b73277ee5d3bd753d3/the-cannon-0.2.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fed7ec32dcc5b1d2d5453180c89ea519", "sha256": "727178f1be58cd3c0781dee23755053faee2a93d71eb3be4f80849ddcfc1f4ef" }, "downloads": -1, "filename": "the-cannon-0.2.6.tar.gz", "has_sig": false, "md5_digest": "fed7ec32dcc5b1d2d5453180c89ea519", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25516, "upload_time": "2017-03-06T11:30:50", "url": "https://files.pythonhosted.org/packages/66/29/16938507e570d73c2242e8b46bb1854f00d7704675b73277ee5d3bd753d3/the-cannon-0.2.6.tar.gz" } ] }