Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script for panoptes dependencies #129

Merged
merged 15 commits into from
Nov 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions pocs/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@
from astropy.utils import data


def download_all_files(data_folder=None):
def download_all_files(data_folder=None, wide_field=True, narrow_field=False):
download_IERS_A()

if data_folder is None:
data_folder = "{}/astrometry/data".format(os.getenv('PANDIR'))

for i in range(4210, 4219):
fn = 'index-{}.fits'.format(i)
dest = "{}/{}".format(data_folder, fn)

def download_one_file(fn):
dest = "{}/{}".format(data_folder, os.path.basename(fn))
if not os.path.exists(dest):
url = "http://data.astrometry.net/4200/{}".format(fn)
url = "http://data.astrometry.net/{}".format(fn)
df = data.download_file(url)
try:
shutil.move(df, dest)
except OSError as e:
print("Problem saving. (Maybe permissions?): {}".format(e))

if wide_field:
for i in range(4110, 4119):
download_one_file('4100/index-{}.fits'.format(i))

if narrow_field:
for i in range(4210, 4219):
download_one_file('4200/index-{}.fits'.format(i))


if __name__ == '__main__':
parser = argparse.ArgumentParser(
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ codecov
ffmpy
pygraphviz
google-cloud-storage
dateparser
dateparser
coveralls

65 changes: 65 additions & 0 deletions scripts/install/apt-packages-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This file contains a list of apt packages to install.
# Lines starting with # are comments as are blank lines,
# and # starts trailing comments.

# dcraw decodes Canon raw images
dcraw

# gphoto2 enables remote control of cameras, including the Canon DSLRs that
# Panoptes uses. This includes changing many settings and taking pictures.
# We are currently using the published linux package, but that can be quite
# old relative to the latest stable version. gphoto2-updater is an install
# script that we might want to use if we need a newer version. For more info,
# see: https://github.com/gonzalo/gphoto2-updater
gphoto2

# Packages needed according to http://astrometry.net/doc/build.html
libbz2-dev
libbz2-dev
libcfitsio-dev
libjpeg-dev
libnetpbm10-dev
libpng12-dev
netpbm
python-dev
python-numpy
python-pyfits
swig
zlib1g-dev

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like byobu comes with Ubuntu server but not desktop. Let's put it in here to make sure we have it. It will pull in tmux also (I think we should default to byobu but will make comments in #97 )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added byobu & tmux (explicitly).

# Cairo is a graphics library, and matplotlib can use it as a backend
# for rendering.
libcairo2-dev

# exiftool is used in a couple of places to extract info from the .cr2 file
exiftool

# We use cfitsio command line tools (e.g. fpack) from POCS, in addition to the
# uses of the cfitsio libraries by astrometry above.
libcfitsio-bin

# These are used if you want to setup SSH access into the computer (pretty
# darn likely).
openssh-client
openssh-server

# Graphviz is used for rendering the state machine of POCS.
graphviz
libgraphviz-dev

# Linux tool used during building and installing software (e.g. astrometry).
pkg-config

# Improves interaction with pocs_shell (via readline).
libncurses5-dev

# These support the Python package "Shapely", used in PIAA (called from POCS).
libgeos-3.*
libgeos-c1v5
libgeos-dev

# byobu and tmux provide a means to run multiple interactive shells in a way
# that survives disconnection.
byobu
tmux

Loading