Skip to content

Commit

Permalink
Merge 98f4b8a into f000c8d
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-neal committed Mar 14, 2019
2 parents f000c8d + 98f4b8a commit a6262e2
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 41 deletions.
1 change: 1 addition & 0 deletions .shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build:

cache_dir_list:
- $HOME/.cache/pip
- $HOME/data/test_data

ci:
- pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ python:
cache:
directories:
- $HOME/.cache/pip
- $HOME/data/test_data

install:
- pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Other:
- Relax pining in `requirements.txt`.
- Use `requirements.txt` in `setup.py`
- Depreciate `--model phoenix` from `phoenix_precision.py`.
- move download scripts to scripts/download.


### v0.5.1
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ include eniric/config.yaml
include tests/config.yaml
include docs/Notebooks/*.ipynb
include docs/Notebooks/config.yaml
include scripts/*
recursive-include scripts/*
include Makefile
include paper/*
7 changes: 6 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ environment:
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python37-x64"

cache:
- "%LOCALAPPDATA%\\pip\\Cache -> appveyor.yml" # Use cache unless appveyor.yml changes.
- "data\\test_data -> appveyor.yml" # Use cache unless appveyor.yml changes.

install:
- SET PATH=%PYTHON%;%PYTHON%\Scripts\;%path%
- "%PYTHON%\\python.exe -m pip install --upgrade pip"
# We need wheel installed to build wheels
- "%PYTHON%\\python.exe -m pip install wheel"
Expand All @@ -23,7 +28,7 @@ install:
# - cmd: "move tests\\config.yaml config.yaml"

# Downloading Eniric data with powershell script for windows
- ps: ".\\scripts\\ps_download_eniric_data.ps1"
- ps: ".\\scripts\\download\\ps_download_eniric_data.ps1"

# Prepare atmosphere models
- cmd: "%PYTHON%\\python.exe scripts\\split_atmmodel.py -b ALL"
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ astropy==3.1.2
codacy-coverage==1.3.11
codeclimate-test-reporter==0.2.3
coverage==4.5.2
https://github.com/jason-neal/Starfish/archive/eniric_suitable.zip#egg=Starfish
https://github.com/jason-neal/Starfish/archive/eniric_suitable.zip#egg=astrostarfish
hypothesis==4.7.17
joblib==0.13.2 # >=0.12.3
matplotlib==3.0.3
Expand Down
Empty file added scripts/download/__init__.py
Empty file.
12 changes: 6 additions & 6 deletions scripts/download_eniric_data.sh → scripts/download/download_eniric_data.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ fi


# This should download the PHOENIX spectra
# download_test_PHOENIX_spec.sh
download_test_PHOENIX_spec.sh

# FTP on travis gives several delays when getting phoenix data.
# So putting Phoenix data in dropbox now also.
(cd $DIRECTORY2
wget "https://www.dropbox.com/s/raw/skg8zwi7vnxgesj/data_raw.tar.gz"
../../scripts/untar_here.py data_raw.tar.gz
rm data_raw.tar.gz
)
#(cd $DIRECTORY2
# wget "https://www.dropbox.com/s/raw/skg8zwi7vnxgesj/data_raw.tar.gz"
# ../../scripts/untar_here.py data_raw.tar.gz
# rm data_raw.tar.gz
#)
25 changes: 13 additions & 12 deletions tests/download_test_PHOENIX_spec.sh → ...ts/download/download_test_PHOENIX_spec.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ if [ ! -d "$DIRECTORY2" ]; then
mkdir -p $DIRECTORY2
fi

(
cd $DIRECTORY
#(
# cd $DIRECTORY

# Download the wavelength file
wget ftp://phoenix.astro.physik.uni-goettingen.de/HiResFITS/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits
# wget http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits

# Create the Z=0.0, directories, and download the appropriate spectra
Z0="Z-0.0"

mkdir $Z0
cd $Z0
wget ftp://phoenix.astro.physik.uni-goettingen.de/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte02600-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
wget ftp://phoenix.astro.physik.uni-goettingen.de/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte02800-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
wget ftp://phoenix.astro.physik.uni-goettingen.de/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte03500-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
wget ftp://phoenix.astro.physik.uni-goettingen.de/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte03900-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
)
# Z0="Z-0.0"

# mkdir $Z0
# cd $Z0
# wget http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte02600-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
# wget http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte02800-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
# wget http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte03500-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
# wget http://phoenix.astro.physik.uni-goettingen.de/data/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/Z-0.0/lte03900-4.50-0.0.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
#)
download_test_aces.py

(
cd $DIRECTORY2
Expand Down
18 changes: 18 additions & 0 deletions scripts/download/download_test_aces.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
from itertools import product
from os.path import join

import numpy as np

from eniric import config

try:
from Starfish.grid_tools import download_PHOENIX_models
except ImportError:
raise ImportError("You need to install Starfish.")

models = np.array(list(product((2600, 2800, 3500, 3900), (4.5,), (0.0,))))

outdir = join(config.pathdir, config.paths["phoenix_raw"])

download_PHOENIX_models(models, outdir)
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ mkdir $DIRECTORY
cd $DIRECTORY

# Phoenix-raw data and BT-settl raw data
wget "https://www.dropbox.com/s/raw/skg8zwi7vnxgesj/data_raw.tar.gz" -UseBasicParsing -OutFile "data_raw.tar.gz"
dir
python ..\..\scripts\untar_here.py ".\data_raw.tar.gz"
del "data_raw.tar.gz"
#wget "https://www.dropbox.com/s/raw/skg8zwi7vnxgesj/data_raw.tar.gz" -UseBasicParsing -OutFile "data_raw.tar.gz"
#dir
#python ..\..\scripts\untar_here.py ".\data_raw.tar.gz"
#del "data_raw.tar.gz"
python ..\..\scripts\download\download_test_aces.py

cd $HOMEDIR

Expand All @@ -55,18 +56,18 @@ cd $HOMEDIR
# del "phoenix-raw.tar.gz"
#
# cd $HOMEDIR
#


# # BTsettl
#
# $DIRECTORY = ".\data\test_data\btsettl-raw\"
#
# Write-Host $DIRECTORY
#
# if ( -not (Test-Path $DIRECTORY -PathType Container))
# {
# Write-Host "$DIRECTORY is not present. Creating"
# mkdir $DIRECTORY
# }
# cd $DIRECTORY
# wget https://phoenix.ens-lyon.fr/Grids/BT-Settl/CIFIST2011_2015/FITS/lte039.0-4.5-0.0a+0.0.BT-Settl.spec.fits.gz -UseBasicParsing -OutFile "lte039.0-4.5-0.0a+0.0.BT-Settl.spec.fits.gz"
# cd $HOMEDIR
$DIRECTORY = ".\data\test_data\btsettl-raw\"

Write-Host $DIRECTORY

if ( -not (Test-Path $DIRECTORY -PathType Container))
{
Write-Host "$DIRECTORY is not present. Creating"
mkdir $DIRECTORY
}
cd $DIRECTORY
wget https://phoenix.ens-lyon.fr/Grids/BT-Settl/CIFIST2011_2015/FITS/lte039.0-4.5-0.0a+0.0.BT-Settl.spec.fits.gz -UseBasicParsing -OutFile "lte039.0-4.5-0.0a+0.0.BT-Settl.spec.fits.gz"
cd $HOMEDIR
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
"scripts/split_atmmodel.py",
"scripts/bary_shift_atmmodel.py",
"scripts/untar_here.py",
"scripts/download_eniric_data.sh",
"tests/download_test_PHOENIX_spec.sh",
"scripts/download/download_eniric_data.sh",
"scripts/download/download_test_PHOENIX_spec.sh",
"scripts/download/download_test_aces.py",
],
"include_package_data": True,
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit a6262e2

Please sign in to comment.