Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zuds-survey/zuds-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dannygoldstein committed Apr 26, 2020
2 parents 95c72b0 + 5a7fd88 commit a1161bc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 16 deletions.
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ZUDS Image Processing Pipeline
# ZUDS Image Processing Pipeline [WIP]

An object-oriented pipeline for ZTF image processing. Current capabilities include:

Expand All @@ -14,31 +14,40 @@ An object-oriented pipeline for ZTF image processing. Current capabilities inclu

## Installation

### Prerequisites
To install the package you can simply do

The pipeline requires that you install the following on your own:

* [SExtractor >= 2.19.5](https://github.com/astromatic/sextractor)
pip install zuds

However, there are some external tools you need for the image processing steps to work. The sections below present some methods for how you can install everything needed to run the pipeline.

Prerequisites:

* [SExtractor >= 2.25.0](https://github.com/astromatic/sextractor)
* [SWarp >= 2.38.0](https://github.com/astromatic/swarp)
* [hotpants >= 5.1.11](https://github.com/zuds-survey/hotpants)
* [postgresql >= 10](https://www.postgresql.org/)
* [cfitsio](https://heasarc.gsfc.nasa.gov/fitsio/)

If you have `conda` installed on your machine, everything above but hotpants can be installed by executing
* [hotpants >= 5.1.11](https://github.com/zuds-survey/hotpants)

bash build.conda.sh
from within this repository. This should work on OSX, Linux, and Windows.

To build hotpants, first install the other dependencies above. Clone the zuds-survey hotpants repository linked above, cd into the directory, and type `make`. It should build an executable called `hotpants`. Copy that executable into your `PATH`, and you should be good to go.
### Recommended method (`conda`)

### Installing the python package
This approach requires the `conda` executable to be installed on your system and used to manage your python and python packages.

Once you have the prerequisites, do
Clone this repository, then run

pip install zuds
bash build.conda.sh

to install the python package. `build.conda.sh` will do this for you, if you use it.
to install `zuds`, sextractor, swarp, postgres, and cfitsio.

After you have completed this step, to install hotpants, cd into the `hotpants` directory and type `make`. Then copy the `hotpants` executable to your `PATH`. It should then be available to the `zuds` library.


### Via docker-compose

A complete setup of the pipeline+database is available via `docker-compose`. Clone this repository, then run `docker-compose up`. A container running a jupyter notebook with the `zuds` pipeline and all dependencies installed should spin up, as well as a separate container for the database. Navigate to `localhost:8174` and open up `demo/demo.ipynb` to start running a demo of the pipeline in a jupyter notebook.

Note: This approach is not recommended for Mac OSX users due to [resource issues with docker on Mac](https://github.com/docker/for-mac/issues/178).

### Roll your own

You can download and build all of the prerequisite packages manually, then do `pip install zuds` to install the pipeline.
14 changes: 14 additions & 0 deletions nersc/kernel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"argv": [
"shifter",
"--image=dannygoldstein/zuds:0.1dev",
"--volume=HOMEDIR:/home/zuds",
"/opt/conda/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "zuds0.1dev",
"language": "python"
}
8 changes: 8 additions & 0 deletions nersc/setup_nersc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

path=$HOME/.local/share/jupyter/kernels/zuds:0.1dev
echo $path
mkdir -p $path
cp kernel.json $path
sed -i "s|HOMEDIR|$HOME|g" $path/kernel.json

0 comments on commit a1161bc

Please sign in to comment.