jwst-backgrounds


Namejwst-backgrounds JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/spacetelescope/jwst_background
SummaryRetrieve and plot JWST background information
upload_time2022-11-28 20:32:16
maintainer
docs_urlNone
authorJane Rigby (GSFC) and Klaus Pontoppidan (STScI)
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            jwst_backgrounds is a a simple program to predict the levels of background emission
in JWST observations, for use in proposal planning.

It accesses a precompiled background cache prepared by Space Telescope Science Institute. The background cache is hosted by the 
Mikulski Archive for Space Telescopes (MAST), so you need internet access to run the tool with the remote cache. It is possible to
download the full background cache to your local machine. Instructions for downloading the background cache can be found at http://archive.stsci.edu/archive_news/2017/08-Aug/index.html#article1

For a given target (RA, DEC), and wavelength, jwst_backgrounds does the following:
- Plot the spectrum of the background for that target on a given calendar day.
- Plot the total background for that target versus calendar day.
- Compute the number of days per year that the target is observable at low background,
  for a given wavelength and a selectable threshold.
- Save the retrieved background data to file.
  
This code was written by Jane Rigby (GSFC, Jane.Rigby@nasa.gov) and Klaus Pontoppidan (STScI, pontoppi@stsci.edu)
The background cache was prepared by Wayne Kinzel at STScI, and is the same as used by the JWST Exposure Time Calculator.

This software is provided as-is, with no warranty.

  
INSTALLATION

Using pip:
----------
```
pip install jwst_backgrounds
```

Note: healpy (version >= 1.10) is a required dependency, so if you don't have it pip will install it automatically. 

Note: to upgrade the JBT with pip use `pip install jwst_background --upgrade`

Using Conda
-----------
First clone the repository

```
git clone git@github.com:spacetelescope/jwst_backgrounds.git
cd jwst_backgrounds
conda create --name <env> --file requirements.txt
```

where `<env>` is the name of the environment you wish to create and requirements is the `requirements.txt` in the package directory.
To activate your JBT enter the following command:

```
source activate <env>
```

Manually
----------
Clone the repository from github and install using `easy_install`.

```
git clone git@github.com:spacetelescope/jwst_backgrounds.git
cd jwst_backgrounds
easy_install .
```

   
RUNNING THE CODE:
```
python			# Start python.
from jwst_backgrounds import jbt 	# Import the background module
```

Below is an example that plots a background curve for a given RA, DEC, wavelength, threshold
```
jbt.get_background(261.6833333, -73.33222222, 2.15, thresh=1.1, \
                        plot_background=True, plot_bathtub=True, write_bathtub=True) 
```

Contributing
--------------
`jwst_backgrounds` follows the STScI ["forking workflow"](https://github.com/spacetelescope/style-guides/blob/master/guides/git-workflow.md#forking-workflow).


TROUBLESHOOTING:
-----------
If matplotlib does not display the images, then try editing your ~/.matplotlib/matplotlibrc file,
and choosing a different backend:  
```
backend: MacOSX
backend: TkAgg
backend: GTKCairo
```

Citation
--------
This code was written by Jane Rigby (GSFC, Jane.Rigby@nasa.gov) and Klaus Pontoppidan (STScI, pontoppi@stsci.edu) The background cache was prepared by Wayne Kinzel at STScI, and is the same as used by the JWST Exposure Time Calculator.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/spacetelescope/jwst_background",
    "name": "jwst-backgrounds",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jane Rigby (GSFC) and Klaus Pontoppidan (STScI)",
    "author_email": "Jane.Rigby@nasa.gov",
    "download_url": "https://files.pythonhosted.org/packages/fb/cf/bc39ebfceed0e6e4478d1b51cbc6c71595defa1da0cef102837000b15531/jwst_backgrounds-1.2.0.tar.gz",
    "platform": null,
    "description": "jwst_backgrounds is a a simple program to predict the levels of background emission\nin JWST observations, for use in proposal planning.\n\nIt accesses a precompiled background cache prepared by Space Telescope Science Institute. The background cache is hosted by the \nMikulski Archive for Space Telescopes (MAST), so you need internet access to run the tool with the remote cache. It is possible to\ndownload the full background cache to your local machine. Instructions for downloading the background cache can be found at http://archive.stsci.edu/archive_news/2017/08-Aug/index.html#article1\n\nFor a given target (RA, DEC), and wavelength, jwst_backgrounds does the following:\n- Plot the spectrum of the background for that target on a given calendar day.\n- Plot the total background for that target versus calendar day.\n- Compute the number of days per year that the target is observable at low background,\n  for a given wavelength and a selectable threshold.\n- Save the retrieved background data to file.\n  \nThis code was written by Jane Rigby (GSFC, Jane.Rigby@nasa.gov) and Klaus Pontoppidan (STScI, pontoppi@stsci.edu)\nThe background cache was prepared by Wayne Kinzel at STScI, and is the same as used by the JWST Exposure Time Calculator.\n\nThis software is provided as-is, with no warranty.\n\n  \nINSTALLATION\n\nUsing pip:\n----------\n```\npip install jwst_backgrounds\n```\n\nNote: healpy (version >= 1.10) is a required dependency, so if you don't have it pip will install it automatically. \n\nNote: to upgrade the JBT with pip use `pip install jwst_background --upgrade`\n\nUsing Conda\n-----------\nFirst clone the repository\n\n```\ngit clone git@github.com:spacetelescope/jwst_backgrounds.git\ncd jwst_backgrounds\nconda create --name <env> --file requirements.txt\n```\n\nwhere `<env>` is the name of the environment you wish to create and requirements is the `requirements.txt` in the package directory.\nTo activate your JBT enter the following command:\n\n```\nsource activate <env>\n```\n\nManually\n----------\nClone the repository from github and install using `easy_install`.\n\n```\ngit clone git@github.com:spacetelescope/jwst_backgrounds.git\ncd jwst_backgrounds\neasy_install .\n```\n\n   \nRUNNING THE CODE:\n```\npython\t\t\t# Start python.\nfrom jwst_backgrounds import jbt \t# Import the background module\n```\n\nBelow is an example that plots a background curve for a given RA, DEC, wavelength, threshold\n```\njbt.get_background(261.6833333, -73.33222222, 2.15, thresh=1.1, \\\n                        plot_background=True, plot_bathtub=True, write_bathtub=True) \n```\n\nContributing\n--------------\n`jwst_backgrounds` follows the STScI [\"forking workflow\"](https://github.com/spacetelescope/style-guides/blob/master/guides/git-workflow.md#forking-workflow).\n\n\nTROUBLESHOOTING:\n-----------\nIf matplotlib does not display the images, then try editing your ~/.matplotlib/matplotlibrc file,\nand choosing a different backend:  \n```\nbackend: MacOSX\nbackend: TkAgg\nbackend: GTKCairo\n```\n\nCitation\n--------\nThis code was written by Jane Rigby (GSFC, Jane.Rigby@nasa.gov) and Klaus Pontoppidan (STScI, pontoppi@stsci.edu) The background cache was prepared by Wayne Kinzel at STScI, and is the same as used by the JWST Exposure Time Calculator.\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Retrieve and plot JWST background information",
    "version": "1.2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b5a76eb119333c6f82ea8dfcaf1ac497",
                "sha256": "7e502b237b6128ca89dea776cb079b81abd404921760ccc88df0b188afb75ea0"
            },
            "downloads": -1,
            "filename": "jwst_backgrounds-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b5a76eb119333c6f82ea8dfcaf1ac497",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 121460,
            "upload_time": "2022-11-28T20:32:14",
            "upload_time_iso_8601": "2022-11-28T20:32:14.702597Z",
            "url": "https://files.pythonhosted.org/packages/4a/a3/c148c40d2006978543f689aad24351a3396969b354379aefa178a4164da2/jwst_backgrounds-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "e43f94a558bee6f475ed559d1ba5cb03",
                "sha256": "552e6483badd7c9df3d037a040c7b7eae87513ca6d3ee4db88cfa9c2a64aa695"
            },
            "downloads": -1,
            "filename": "jwst_backgrounds-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e43f94a558bee6f475ed559d1ba5cb03",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 119065,
            "upload_time": "2022-11-28T20:32:16",
            "upload_time_iso_8601": "2022-11-28T20:32:16.178771Z",
            "url": "https://files.pythonhosted.org/packages/fb/cf/bc39ebfceed0e6e4478d1b51cbc6c71595defa1da0cef102837000b15531/jwst_backgrounds-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-28 20:32:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "spacetelescope",
    "github_project": "jwst_background",
    "lcname": "jwst-backgrounds"
}
        
Elapsed time: 0.02272s