SPEARS


NameSPEARS JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/JustinD-T
SummarySPEARS : SPARCL Pipeline for Emission-Absorption Line Retrieval and Spectroscopy
upload_time2024-02-02 19:17:27
maintainer
docs_urlNone
authorJustin Domagala-Tang
requires_python
licenseMIT License
keywords sparcl spectroscopy astonomy desi-edr noirlab
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===================================
 SPEARS - README
===================================

SPEARS - Sparcl Pipeline for Emission-Absorption Line Retrieval and Spectroscopy
--------------------------------------------------------------------------------

This library aims to provide users with a quick, and easily scalable pipeline for spectroscopic analysis of spectra from the DESI-EDR accessed through the SPARCL API at NOIRLAB. Provides a list of spectral lines present in a given spectrum, along with other information outlined in spectro_analyze header. Specific usage of each function can be found under Features.

Features
========

Main Functionality
------------------

- ``spectro_analyze(limit, save_as_fits=False)``: 
  Returns a list of QTables (or .fits file if specified) with the following headers:
  
    - 'Ion' (str): The ion type present
    - 'Ion Line Wavelength' (float64, angstrom): The wavelength of the present spectral line
    - 'Spectral Flux at Line' (float64, 1 / (erg17 cm2 s Angstrom)): The model-spectral flux at the given spectral line wavelength
    - 'Observed Deviation' (float64, angstrom): The distance from the observed spectral line and the actual line
    - 'Normalized Deviation' (float64, dimensionless): The observed deviation divided by the spectral resolution at that given wavelength
    - meta={'id'}: id of spectrum, identical to dict key

Sub-modules
-----------

- ``fetch_sparcl_ids(limit)``: Fetches the first n SPARCL ids, based on the limit provided.

- ``sparcl_ids_to_spectra(sparcl_ids)``: Takes SPARCL ids and returns a list of Spectrum1D objects with each spectra's flux, redshifted-accounted wavelength, and SPARCL id.

- ``normalize_spectra(model_spectra)``: Takes an array of Spectrum1D object(s) and returns the continuum normalized spectra for each (continuum derived by median-filter smoothing original spectrum).

- ``norm_spectra_to_lines(normalized_spectra, save_as_fits=False)``: Takes an array of normalized spectra, and returns the present spectral lines (and other info specified in spectro_analyze) in each in a list of QTables, or .fits file if specified.

Requirements
============

As listed in ``setup.py``:

    - astropy==6.0.0
    - numpy==1.26.3
    - scipy==1.12.0
    - sparclclient==1.2.1
    - specutils==1.12.0
    - Unidecode==1.3.8

Installation
============

.. code-block:: bash

    $ [sudo] pip install SPEARS

Usage
=====

Retrieving spectral analysis info from the first 5 spectra in the database:

.. code-block:: python

    from SPEARS import SPEARS

    sparcl_ids = SPEARS.fetch_sparcl_ids(limit=5)

    info = SPEARS.spectro_analyze(sparcl_ids)

Documentation
=============

Full documentation will be later uploaded to my `GitHub <https://github.com/JustinD-T>`_.

License
=======

MIT License

Copyright (c) 2024 Justin Domagala-Tang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Acknowledgments
===============

- Full accreditation can be found on my `GitHub <https://github.com/JustinD-T>`_.
- Thanks to NOIRLAB for supplying their vast spectral data for free through SPARCL API.

Contact
=======

Email: justindomagalatang@hotmail.com

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JustinD-T",
    "name": "SPEARS",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "SPARCL spectroscopy astonomy DESI-EDR NOIRLAB",
    "author": "Justin Domagala-Tang",
    "author_email": "justindomagalatang@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/30/4a/ab5b7ef7dd43dd21d4533115c1669fa382c078ffc11b73f6e844964d7f80/SPEARS-0.1.4.tar.gz",
    "platform": null,
    "description": "===================================\r\n SPEARS - README\r\n===================================\r\n\r\nSPEARS - Sparcl Pipeline for Emission-Absorption Line Retrieval and Spectroscopy\r\n--------------------------------------------------------------------------------\r\n\r\nThis library aims to provide users with a quick, and easily scalable pipeline for spectroscopic analysis of spectra from the DESI-EDR accessed through the SPARCL API at NOIRLAB. Provides a list of spectral lines present in a given spectrum, along with other information outlined in spectro_analyze header. Specific usage of each function can be found under Features.\r\n\r\nFeatures\r\n========\r\n\r\nMain Functionality\r\n------------------\r\n\r\n- ``spectro_analyze(limit, save_as_fits=False)``: \r\n  Returns a list of QTables (or .fits file if specified) with the following headers:\r\n  \r\n    - 'Ion' (str): The ion type present\r\n    - 'Ion Line Wavelength' (float64, angstrom): The wavelength of the present spectral line\r\n    - 'Spectral Flux at Line' (float64, 1 / (erg17 cm2 s Angstrom)): The model-spectral flux at the given spectral line wavelength\r\n    - 'Observed Deviation' (float64, angstrom): The distance from the observed spectral line and the actual line\r\n    - 'Normalized Deviation' (float64, dimensionless): The observed deviation divided by the spectral resolution at that given wavelength\r\n    - meta={'id'}: id of spectrum, identical to dict key\r\n\r\nSub-modules\r\n-----------\r\n\r\n- ``fetch_sparcl_ids(limit)``: Fetches the first n SPARCL ids, based on the limit provided.\r\n\r\n- ``sparcl_ids_to_spectra(sparcl_ids)``: Takes SPARCL ids and returns a list of Spectrum1D objects with each spectra's flux, redshifted-accounted wavelength, and SPARCL id.\r\n\r\n- ``normalize_spectra(model_spectra)``: Takes an array of Spectrum1D object(s) and returns the continuum normalized spectra for each (continuum derived by median-filter smoothing original spectrum).\r\n\r\n- ``norm_spectra_to_lines(normalized_spectra, save_as_fits=False)``: Takes an array of normalized spectra, and returns the present spectral lines (and other info specified in spectro_analyze) in each in a list of QTables, or .fits file if specified.\r\n\r\nRequirements\r\n============\r\n\r\nAs listed in ``setup.py``:\r\n\r\n    - astropy==6.0.0\r\n    - numpy==1.26.3\r\n    - scipy==1.12.0\r\n    - sparclclient==1.2.1\r\n    - specutils==1.12.0\r\n    - Unidecode==1.3.8\r\n\r\nInstallation\r\n============\r\n\r\n.. code-block:: bash\r\n\r\n    $ [sudo] pip install SPEARS\r\n\r\nUsage\r\n=====\r\n\r\nRetrieving spectral analysis info from the first 5 spectra in the database:\r\n\r\n.. code-block:: python\r\n\r\n    from SPEARS import SPEARS\r\n\r\n    sparcl_ids = SPEARS.fetch_sparcl_ids(limit=5)\r\n\r\n    info = SPEARS.spectro_analyze(sparcl_ids)\r\n\r\nDocumentation\r\n=============\r\n\r\nFull documentation will be later uploaded to my `GitHub <https://github.com/JustinD-T>`_.\r\n\r\nLicense\r\n=======\r\n\r\nMIT License\r\n\r\nCopyright (c) 2024 Justin Domagala-Tang\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n\r\nAcknowledgments\r\n===============\r\n\r\n- Full accreditation can be found on my `GitHub <https://github.com/JustinD-T>`_.\r\n- Thanks to NOIRLAB for supplying their vast spectral data for free through SPARCL API.\r\n\r\nContact\r\n=======\r\n\r\nEmail: justindomagalatang@hotmail.com\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "SPEARS : SPARCL Pipeline for Emission-Absorption Line Retrieval and Spectroscopy",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/JustinD-T"
    },
    "split_keywords": [
        "sparcl",
        "spectroscopy",
        "astonomy",
        "desi-edr",
        "noirlab"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb2592cb693a65add771656743503ef1f76ea8311c82e1aa30daca04f964ae35",
                "md5": "dd67187dcafd911bbe207e619a4190e8",
                "sha256": "6b83f18a519540089e421123832f5e29353d189683a269a383170791e159e2bf"
            },
            "downloads": -1,
            "filename": "SPEARS-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd67187dcafd911bbe207e619a4190e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11022,
            "upload_time": "2024-02-02T19:17:25",
            "upload_time_iso_8601": "2024-02-02T19:17:25.183119Z",
            "url": "https://files.pythonhosted.org/packages/fb/25/92cb693a65add771656743503ef1f76ea8311c82e1aa30daca04f964ae35/SPEARS-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "304aab5b7ef7dd43dd21d4533115c1669fa382c078ffc11b73f6e844964d7f80",
                "md5": "4d9248875118c12fc51a2ac1b1d9ffe7",
                "sha256": "5d000dad6c780f8b14d126fdd6ddf9e911ecc879d9ffc6adefd0606d849e6744"
            },
            "downloads": -1,
            "filename": "SPEARS-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4d9248875118c12fc51a2ac1b1d9ffe7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11827,
            "upload_time": "2024-02-02T19:17:27",
            "upload_time_iso_8601": "2024-02-02T19:17:27.852223Z",
            "url": "https://files.pythonhosted.org/packages/30/4a/ab5b7ef7dd43dd21d4533115c1669fa382c078ffc11b73f6e844964d7f80/SPEARS-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-02 19:17:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spears"
}
        
Elapsed time: 0.20724s