-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffd895c
commit 32ad8d0
Showing
2 changed files
with
73 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,72 @@ | ||
# README # | ||
# The LAMBDA footprint library # | ||
|
||
This is the README for the CMB footprint module provided by LAMBDA. | ||
|
||
## What is this repository for? ## | ||
|
||
The CMB footprint module is designed to show where different surveys are | ||
observing on the sky. All surveys for which we provide footprint regions | ||
are listed in the footprint.cfg file. | ||
|
||
## How do I get set up? ## | ||
|
||
The code runs on both Python 2 (checken on 2.7.10) and Python 3 (checked on | ||
3.4.3). The Python modules that are required for the code to run are | ||
This module overplots cosmological survey regions. The survey specifications | ||
are contained in `footprint.cfg` and rendered as markdown in `footprint.md`. | ||
|
||
Required python libraries: | ||
* Numpy | ||
* Matplotlib | ||
* Healpy | ||
* Astropy | ||
* Astropy (coordinate units, WCS) | ||
* Scipy | ||
|
||
Numpy, Matplotlib, and Healpy are fairly obvious requirements. Astropy is | ||
needed so that human readable values can be input into the configuration | ||
file. Additionally, it can be used to read in WCS FITS files. Scipy is only | ||
used for the code that converts a WCS map to a Healpix map. | ||
The code runs in both Python 2 (checked on 2.7.10) and Python 3 (checked on | ||
3.4.3). Astropy supports a range of coordinate specifications in the | ||
configuration file. | ||
|
||
To add a new survey, feel free to fork and add survey rectangles and vertices | ||
to the configuration file, or email us that information. The configuration file | ||
format is described below. To add your own healpix file region to specify a | ||
survey, email us and we'll make the binary available on the LAMBDA website. | ||
|
||
As long as your PYTHONPATH environment variable points to the directory | ||
where this module is located, the code should be able to run. | ||
Contact: Nathan Miller ([email protected]) | ||
|
||
## Overview of the library ## | ||
## Overview ## | ||
|
||
There are a couple examples on how to run the code shown in the examples/ | ||
subdirectory. Additionally, a Jupyter notebook is provided that shows the | ||
results from both of the example scripts. A background for the footprint | ||
is needed for the code to run. Backgrounds can be added to the configuration | ||
file, but will need to be downloaded the first time and the files can be large. | ||
Alternatively, any Healpix map can be input. | ||
The `examples` directory contains several plotting scripts and an ipython | ||
notebook (rendered on github). The healpix regions are large binary files and | ||
are hosted on the LAMBDA website. The first time you run the code, these will | ||
be downloaded to the `maps` directory. Subsequently, the code will only update | ||
a region if its local checksum does not match the library. | ||
|
||
There are many different options when plotting the survey footprints. You | ||
can plot using any projection that Healpy provides and use most of the options | ||
that these projections provide. The coordinate system of the background map | ||
and the coordinate system of the plot should be provided though they do have | ||
default values ('G' and 'C' respectively). The coordinate system of each | ||
survey in the configuration file is assumed to be in Equatorial | ||
coordinates, though if an input map is provided instead of using the | ||
definitions in the configuration file, a coordinate system should be provided. | ||
There are many different options when plotting the survey footprints. You can | ||
plot using any projection that Healpy provides and use most of the options that | ||
these projections provide. The coordinate system of the background map and the | ||
coordinate system of the plot should be provided though they do have default | ||
values ('G' and 'C' respectively). The coordinate system of each survey in the | ||
configuration file is assumed to be in Equatorial coordinates, though if an | ||
input map is provided instead of using the definitions in the configuration | ||
file, a coordinate system should be provided. | ||
|
||
The input colors can be any string understood by matplotlib or an rgb triplet. | ||
The plotted regions for single survey will have the same color but a | ||
varying (0.5 to 1) alpha depending on the pixel value. | ||
The plotted regions for single survey will have the same color but a varying | ||
alpha depending on the pixel value (survey depth). | ||
|
||
A copy of the latest configuration file is additionally stored on LAMBDA and | ||
an option can be set to download the latest version of the configuration file | ||
every time the code is run. | ||
|
||
## Types of Configuration File Entries ## | ||
|
||
There are several different ways to input surveys to the configuration | ||
file. Here we will go over all the different types. For each types I will | ||
list the different keys that must go in the configuration file for that entry. The | ||
regions are specified as strings in the standard astropy [coordinate format](http://astropy.readthedocs.org/en/latest/coordinates/). | ||
There are several different ways to add surveys to the configuration file. Here | ||
we will go over all the different types. For each types I will list the | ||
different keys that must go in the configuration file for that entry. The | ||
regions are specified as strings in the standard astropy | ||
[coordinate format](http://astropy.readthedocs.org/en/latest/coordinates/). | ||
|
||
### Common Keys ### | ||
|
||
These are keys that are common to all the different types of configuration file entries. | ||
|
||
* **coord** : 'C', 'E', or 'G' describing the coordinate system of the input map or | ||
* **coord** : 'C', 'E', or 'G' describing the coordinate system of the input map or | ||
the coordinate system of the input values. | ||
* **instrument** : Instrument with which this data comes from. Multiple entries can | ||
have the same instrument. | ||
* **survey_type** : Either 'background', 'cmb', 'cmbpol', or 'lss'. Used to separate | ||
entries into different tables when we generate a markdown file listing all the | ||
* **survey_type** : e.g. 'background', 'cmb', 'cmbpol', or 'lss'. Used to separate | ||
entries into different tables when we generate a markdown file listing all the | ||
entries in the configuration file. | ||
* **citation** : Citation describing how we got our survey footprint for the given | ||
experiment. Possible entries include a link to a file that we got our data form or | ||
* **citation** : Citation describing how we got our survey footprint for the given | ||
experiment. Possible entries include a link to a file that we got our data form or | ||
and link to a paper from which we pulled values. | ||
|
||
|
||
|
@@ -82,7 +76,7 @@ This reads in a footprint stored as a Healpix file. If the file does not | |
exist in the path specified when you initialize the class, it will attempt | ||
to download the file from LAMBDA | ||
|
||
* **handler** : hpx_file | ||
* **handler** : `hpx_file` | ||
* **file** : filename of the file | ||
* **checksum** : The MD5 checksum of the file. It the checksum does not match the | ||
checksum of the local file, it will attempt to download it from LAMBDA. | ||
|
@@ -123,30 +117,18 @@ multiple other surveys listed in the configuration file. This is used so | |
that a single survey can have multiple entries for different patches, so | ||
we can choose to plot a single patch or multiple patches without the code | ||
thinking they are different surveys. All component maps must have the same | ||
coordinate system because we just sum the Healpix maps together. Additionally, | ||
coordinate system because we just sum the Healpix maps together. Additionally, | ||
all combination maps are normalized to a maximum value of 1. | ||
|
||
* **handler** : combination | ||
* **components** : The names of the other entries in the configuration file that | ||
will be combined. Names must be separated by a comma. | ||
|
||
## Examples and Config File ## | ||
## Config File ## | ||
|
||
Examples are shown in the examples directory. The Jupyter (.ipynb) notebook | ||
(https://github.com/nasa-lambda/cmb_footprint/blob/master/examples/plot_footprints.ipynb) | ||
can be visualized by github. The output is what I get on my computer. | ||
|
||
The entries in the config file can be seen at | ||
The entries in the config file can be seen at | ||
https://github.com/nasa-lambda/cmb_footprint/blob/master/footprint_config.md or | ||
http://lambda.gsfc.nasa.gov/toolbox/footprint/configfile.cfm. These pages | ||
are automatically generated by gen_footprint_md.py based on the entries in | ||
the configuration file and is an easier way of seeing what surveys are | ||
http://lambda.gsfc.nasa.gov/toolbox/footprint/configfile.cfm. These pages | ||
are automatically generated by gen_footprint_md.py based on the entries in | ||
the configuration file and is an easier way of seeing what surveys are | ||
predefined. | ||
|
||
## Contributing ## | ||
|
||
If you want to add a footprint to the library, feel free to submit a pull request. | ||
|
||
## Who do I talk to? ## | ||
|
||
* Nathan Miller ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters