GithubHelp home page GithubHelp logo

juliengirard / pancake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spacetelescope/pandeia-coronagraphy

0.0 2.0 0.0 14.76 MB

Toolkit for adding advanced coronagraph simulations on top of the Pandeia engine

License: Other

Jupyter Notebook 87.33% Python 12.67%

pancake's Introduction

Pandeia-Coronagraphy

Simulated NIRCam 210R scene with KLIP reference-subtraction

Installation

It is highly recommended that you begin by installing AstroConda (with Python 2.7 or python 3) and then follow these installation instructions to install the Pandeia engine and the required reference files. Once Pandeia is set up, the following command will install this package:

pip install git+git://github.com/spacetelescope/pandeia-coronagraphy.git

Alternatively, follow these step-by-step instructions:

  1. If you don't already have Anaconda or Miniconda installed, download and install either the Python 2.7 version or the Python 3 version here.
  2. Add the AstroConda channel to your Conda channels:
conda config --add channels http://ssb.stsci.edu/astroconda
  1. Create a conda environment with the STScI software stack:

conda create -n astroconda stsci python=2.7

or

conda create -n astroconda stsci python=3

  1. Activate this environment with source activate astroconda. (NB: Conda is only compatible with a BASH shell.)
  2. Install the Pandeia engine with this command: pip install pandeia.engine. (You should already have the Pysynphot package installed at this point. If you don't, install it with pip install pysypnphot. You can generate a list of installed packages with conda list.)
  3. Download and unzip the matching Pandeia data files from the Pandeia pypi page and the PySynphot data files (ftp://archive.stsci.edu/pub/hst/pysynphot/). See Installing PySynphot Data Files for more detail on setting up the PySynphot data files.
  4. Add the following lines to your ~/.bashrc file (and source it after modifying):
export pandeia_refdata=/path/to/pandeia/data/directory
export PYSYN_CDBS=/path/to/cdbs/directory
  1. Finally, install the pandeia-coronagraphy package:
pip install git+git://github.com/spacetelescope/pandeia-coronagraphy.git
  1. (Optional, but highly recommended) Install WebbPSF with conda install webbpsf. This is required only if you are interested in using higher-fidelity PSFs in your calculations; otherwise, the Pandeia engine relies on interpolations of a bundled library of precomputed PSFs. This functionality is documented here and here.

Installing PySynphot Data Files

The entire PySynphot data file collection is quite large, and the PySynphot package expects a particular directory structure. If you're on the STScI network, you can skip this download and point the PYSYN_CDBS environment variable to the CDBS directory on central store instead (/grp/hst/cdbs). Otherwise, two (hopefully) helpful tips for installing the reference files locally:

  1. Rather than download every package, you may be able to get away with downloading only the Pysynphot Phoenix Models (ftp://archive.stsci.edu/pub/hst/pysynphot/synphot5.tar.gz).
  2. The .tar files will unpack to a directory structure that looks something like grp/hst/cdbs/etc. You'll need to consolidate the multiple structures into a single directory structure under cdbs. When setting up your environment variables in Step 7 (under Installation), you'll want to point to the cdbs directory directly.

Getting Started

Once installation is complete, take a look at the provided Jupyter notebooks for examples of constructing a scene, setting instrument properties, running the Pandeia engine, and performing some basic post-processing.

You can find a quickstart guide to using the Pandeia engine here.

Example input templates for the Pandeia engine are provided for coronagraphy here and for other instruments and observing modes here.

pancake's People

Contributors

polemarkh avatar kvangorkom avatar mperrin avatar york-stsci avatar juliengirard avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.