quest_qso


Namequest_qso JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryA machine learning model to generate quasar spectra
upload_time2025-10-23 12:32:56
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.12
licenseBSD 3-Clause License Copyright (c) 2025, cosmic-dawn-group Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords astronomy python quasar science spectroscopy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QUEST: A machine learning framework to generate quasar spectra

QUEST (Quasar Unsupervised Encoder and Synthesis Tool) is an implementation of a Variational Auto-Encoder (VAE) with the primary purpose of generating realistic quasar spectra and post-processing them to obtain synthetic quasar photometry. QUEST can also be used to reconstruct spectra with limited wavelength coverage, absorption systems, and even the continuum blueward of the Lyman-$\alpha$ emission line (with some caveats).

Check out the [paper]() for a full breakdown of its capabilities and limitations.

## Install instructions

We recommend installing QUEST in a dedicated virtual environment.

1.  **Create and activate a virtual environment** (e.g., using `venv`):
    ```bash
    python -m venv venv_name
    source venv_name/bin/activate  # Linux/macOS
    ```

2.  **Install from source:**
    ```bash
    git clone [https://github.com/cosmic-dawn-group/QUEST.git](https://github.com/cosmic-dawn-group/QUEST.git)
    cd QUEST
    pip install -e .
    ```

3.  or **Install from PyPI:**
    ```bash
    pip install quest_qso
    ```
    *Note: Updates on the PyPI version might lag slightly behind the main repository.*

    **A note of caution:** QUEST has been tested as much as possible, but there are surely bugs and aspects to improve. Please report any issue you find using the **GitHub Issues** tab, or consider sending us an email ([francesco.guarneri@uni-hamburg.de](mailto:francesco.guarneri@uni-hamburg.de)).

## Environment variables

QUEST uses a few environment variables to set its output folders and ensure that it does not overuse resources on shared machines.

* `QUEST_LOCALPATH` — General cache directory. This is the primary folder used to download all cached files and save generated spectra/photometry in the examples. If downloaded using the utilities included in QUEST, this will also contain the datasets used to train the model.
* `QUEST_LOG_TO_FILE` - QUEST logs to the terminal by default. However, if this variable is set to `True` or `1`, an additional log file will be created in `QUEST_LOCALPATH`.
* `AM_I_ON_SHARED_SERVER` - If set to `True` or `1`, QUEST will limit its resource usage (see details in `__init__.py` -- make sure to customize this to your needs!).
* `TORCH_SEED` - Sets the overall seed for `PyTorch`. If this is not set, the seed defaults to `42`. If negative, no seed is set. Otherwise, the seed will be set to the value of this variable.
* `TORCH_DEBUG` - Effectively sets `torch.autograd.set_detect_anomaly(True)`. This should only be used to debug issues with the model, as it greatly slows down any PyTorch operation.

Environment variables can be set (for example, in `bash`) using the `export` command:

```bash
export QUEST_LOCALPATH="/path/to/your/cache/folder"
```

Usage
-----
Head over to the `examples` folder, where we've included Jupyter notebooks showing how to load the model for inference, sample from it, or generate synthetic photometry.

Contributing
------------
Contributions are more than welcome! Please open an issue to report problems, open PRs to contribute to the code, or just let us know if you have any feature requests! We are a small team but are happy to receive feedback!

License
-------
See `LICENSE` in the repository root.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "quest_qso",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.12",
    "maintainer_email": null,
    "keywords": "astronomy, python, quasar, science, spectroscopy",
    "author": null,
    "author_email": "Francesco Guarneri <francesco.guarneri@uni-hamburg.de>, Jan-Torge Schindler <jan-torge.schindler@uni-hamburg.de>",
    "download_url": "https://files.pythonhosted.org/packages/02/03/a90b78228b5b067f548c0ed6ed192e0151821ee71b73b2279563b94f5b11/quest_qso-1.0.1.tar.gz",
    "platform": null,
    "description": "# QUEST: A machine learning framework to generate quasar spectra\n\nQUEST (Quasar Unsupervised Encoder and Synthesis Tool) is an implementation of a Variational Auto-Encoder (VAE) with the primary purpose of generating realistic quasar spectra and post-processing them to obtain synthetic quasar photometry. QUEST can also be used to reconstruct spectra with limited wavelength coverage, absorption systems, and even the continuum blueward of the Lyman-$\\alpha$ emission line (with some caveats).\n\nCheck out the [paper]() for a full breakdown of its capabilities and limitations.\n\n## Install instructions\n\nWe recommend installing QUEST in a dedicated virtual environment.\n\n1.  **Create and activate a virtual environment** (e.g., using `venv`):\n    ```bash\n    python -m venv venv_name\n    source venv_name/bin/activate  # Linux/macOS\n    ```\n\n2.  **Install from source:**\n    ```bash\n    git clone [https://github.com/cosmic-dawn-group/QUEST.git](https://github.com/cosmic-dawn-group/QUEST.git)\n    cd QUEST\n    pip install -e .\n    ```\n\n3.  or **Install from PyPI:**\n    ```bash\n    pip install quest_qso\n    ```\n    *Note: Updates on the PyPI version might lag slightly behind the main repository.*\n\n    **A note of caution:** QUEST has been tested as much as possible, but there are surely bugs and aspects to improve. Please report any issue you find using the **GitHub Issues** tab, or consider sending us an email ([francesco.guarneri@uni-hamburg.de](mailto:francesco.guarneri@uni-hamburg.de)).\n\n## Environment variables\n\nQUEST uses a few environment variables to set its output folders and ensure that it does not overuse resources on shared machines.\n\n* `QUEST_LOCALPATH` \u2014 General cache directory. This is the primary folder used to download all cached files and save generated spectra/photometry in the examples. If downloaded using the utilities included in QUEST, this will also contain the datasets used to train the model.\n* `QUEST_LOG_TO_FILE` - QUEST logs to the terminal by default. However, if this variable is set to `True` or `1`, an additional log file will be created in `QUEST_LOCALPATH`.\n* `AM_I_ON_SHARED_SERVER` - If set to `True` or `1`, QUEST will limit its resource usage (see details in `__init__.py` -- make sure to customize this to your needs!).\n* `TORCH_SEED` - Sets the overall seed for `PyTorch`. If this is not set, the seed defaults to `42`. If negative, no seed is set. Otherwise, the seed will be set to the value of this variable.\n* `TORCH_DEBUG` - Effectively sets `torch.autograd.set_detect_anomaly(True)`. This should only be used to debug issues with the model, as it greatly slows down any PyTorch operation.\n\nEnvironment variables can be set (for example, in `bash`) using the `export` command:\n\n```bash\nexport QUEST_LOCALPATH=\"/path/to/your/cache/folder\"\n```\n\nUsage\n-----\nHead over to the `examples` folder, where we've included Jupyter notebooks showing how to load the model for inference, sample from it, or generate synthetic photometry.\n\nContributing\n------------\nContributions are more than welcome! Please open an issue to report problems, open PRs to contribute to the code, or just let us know if you have any feature requests! We are a small team but are happy to receive feedback!\n\nLicense\n-------\nSee `LICENSE` in the repository root.",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2025, cosmic-dawn-group  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "A machine learning model to generate quasar spectra",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/cosmic-dawn-group/QUEST/issues",
        "Homepage": "https://github.com/cosmic-dawn-group/QUEST"
    },
    "split_keywords": [
        "astronomy",
        " python",
        " quasar",
        " science",
        " spectroscopy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "258e039a4ee5fdd4647a4738702d87ad7a3af184b2e4e03c2ef41c59a6e3ea6d",
                "md5": "0876abd0bd2b975298609473cc3c4c40",
                "sha256": "361de2fbc75deff5eb9d41f797a0c51ebf09eb42e85190201a18aad354bff1b7"
            },
            "downloads": -1,
            "filename": "quest_qso-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0876abd0bd2b975298609473cc3c4c40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.12",
            "size": 9469777,
            "upload_time": "2025-10-23T12:32:49",
            "upload_time_iso_8601": "2025-10-23T12:32:49.127368Z",
            "url": "https://files.pythonhosted.org/packages/25/8e/039a4ee5fdd4647a4738702d87ad7a3af184b2e4e03c2ef41c59a6e3ea6d/quest_qso-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0203a90b78228b5b067f548c0ed6ed192e0151821ee71b73b2279563b94f5b11",
                "md5": "1be2e68b6ce9be2bc17fd1b9b4949685",
                "sha256": "747a2fc7c2767b77572cad1308838c0d9e90656b98d69573eddb2c34233d66ac"
            },
            "downloads": -1,
            "filename": "quest_qso-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1be2e68b6ce9be2bc17fd1b9b4949685",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.12",
            "size": 9455184,
            "upload_time": "2025-10-23T12:32:56",
            "upload_time_iso_8601": "2025-10-23T12:32:56.853271Z",
            "url": "https://files.pythonhosted.org/packages/02/03/a90b78228b5b067f548c0ed6ed192e0151821ee71b73b2279563b94f5b11/quest_qso-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-23 12:32:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cosmic-dawn-group",
    "github_project": "QUEST",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "quest_qso"
}
        
Elapsed time: 2.79712s