Skip to content

Commit

Permalink
v0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Stolker committed Feb 20, 2019
1 parent 931bb6b commit e5602b1
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 53 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

help:
@echo "pypi - submit package to the PyPI server"
@echo "pypi-test - submit package to the TestPyPI server"
@echo "docs - generate Sphinx documentation"
@echo "coverage - check code coverage"
@echo "test - run test cases"
Expand All @@ -11,6 +12,10 @@ pypi:
python setup.py sdist bdist_wheel
twine upload dist/*

pypi-test:
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

docs:
rm -f docs/species.*rst
sphinx-apidoc -o docs/ species
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ License

Copyright 2018 Tomas Stolker

SPECIES is free software and distributed under the GNU General Public License v3.
SPECIES is distributed under the GNU General Public License v3. See the LICENSE file for the terms and conditions.
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@

setup(
name='species',
version='0.0.3',
version='0.0.4',
description='Toolkit for analyzing spectral and photometric data of planetary and substellar atmospheres',
long_description=open('README.rst').read(),
author='Tomas Stolker',
author_email='[email protected]',
url='https://github.com/tomasstolker/species',
packages=['species'],
packages=['species',
'species.analysis',
'species.core',
'species.data',
'species.plot',
'species.read'],
package_dir={'species':'species'},
include_package_data=True,
install_requires=reqs,
Expand Down
2 changes: 1 addition & 1 deletion species/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

__author__ = 'Tomas Stolker'
__license__ = 'GPLv3'
__version__ = '0.0.3'
__version__ = '0.0.4'
__maintainer__ = 'Tomas Stolker'
__email__ = '[email protected]'
__status__ = 'Development'
6 changes: 3 additions & 3 deletions species/analysis/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import progress.bar
import numpy as np

from . import photometry
from .. data import database
from .. read import read_model, read_object
from species.analysis import photometry
from species.data import database
from species.read import read_model, read_object


MIN_CHISQ = np.inf
Expand Down
4 changes: 2 additions & 2 deletions species/analysis/photometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from scipy.integrate import simps

from .. data import database
from .. read import read_filter, read_spectrum
from species.data import database
from species.read import read_filter, read_spectrum


def apparent_to_absolute(app_mag, distance):
Expand Down
2 changes: 1 addition & 1 deletion species/data/btnextgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from scipy.interpolate import interp1d

from . import util
from species.data import util


def add_btnextgen(input_path,
Expand Down
18 changes: 5 additions & 13 deletions species/data/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,11 @@

from astropy.io import votable

from .. analysis import photometry
from .. core import box
from .. read import read_model
from . import drift_phoenix
from . import btnextgen
from . import vega
from . import irtf
from . import spex
from . import vlm_plx
from . import leggett
from . import companions
from . import filters
from . import util
from species.analysis import photometry
from species.core import box
from species.read import read_model
from species.data import drift_phoenix, btnextgen, vega, irtf, spex, vlm_plx, leggett, \
companions, filters, util


warnings.simplefilter('ignore', UserWarning)
Expand Down
2 changes: 1 addition & 1 deletion species/data/drift_phoenix.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import numpy as np

from . import util
from species.data import util


def add_drift_phoenix(input_path,
Expand Down
3 changes: 1 addition & 2 deletions species/data/irtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

from astropy.io import fits

from . import queries
from . import util
from species.data import queries, util


def add_irtf(input_path, database):
Expand Down
2 changes: 1 addition & 1 deletion species/data/leggett.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import numpy as np
import pandas as pd

from . import util
from species.data import util


def add_leggett(input_path,
Expand Down
7 changes: 3 additions & 4 deletions species/data/spex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
from astropy.io.votable import parse_single_table
from astropy.utils.exceptions import AstropyWarning

from . import queries
from . import util
from .. analysis import photometry
from .. read import read_filter
from species.analysis import photometry
from species.data import queries, util
from species.read import read_filter


warnings.simplefilter('ignore', category=AstropyWarning)
Expand Down
3 changes: 1 addition & 2 deletions species/data/vlm_plx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

from astropy.io import fits

from . import queries
from . import util
from species.data import queries, util


def add_vlm_plx(input_path,
Expand Down
8 changes: 4 additions & 4 deletions species/plot/plot_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import matplotlib as mpl
import matplotlib.pyplot as plt

from . util import update_labels
from .. data import database
from species.data import database
from species.plot import util


mpl.rcParams['font.serif'] = ['Bitstream Vera Serif']
Expand All @@ -37,7 +37,7 @@ def plot_walkers(tag,
box = species_db.get_samples(tag)

samples = box.samples
labels = update_labels(box.parameters)
labels = util.update_labels(box.parameters)

plt.figure(1, figsize=(6, 5))
gridsp = mpl.gridspec.GridSpec(4, 1)
Expand Down Expand Up @@ -136,7 +136,7 @@ def plot_posterior(tag,
box = species_db.get_samples(tag)

samples = box.samples
labels = update_labels(box.parameters)
labels = util.update_labels(box.parameters)

ndim = samples.shape[2]

Expand Down
2 changes: 1 addition & 1 deletion species/plot/plot_photometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from matplotlib.colorbar import Colorbar

from .. read import read_object
from species.read import read_object


mpl.rcParams['font.serif'] = ['Bitstream Vera Serif']
Expand Down
9 changes: 4 additions & 5 deletions species/plot/plot_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import matplotlib as mpl
import matplotlib.pyplot as plt

from . util import quantity_unit
from .. core import box
from .. read import read_filter
from species.core import box
from species.plot import util
from species.read import read_filter


mpl.rcParams['font.serif'] = ['Bitstream Vera Serif']
Expand Down Expand Up @@ -219,9 +219,8 @@ def plot_spectrum(boxes,
if isinstance(boxitem, box.ModelBox):
param = boxitem.parameters
#TODO fix luminosity
print(param)

par_key, par_unit = quantity_unit(list(param.keys()))
par_key, par_unit = util.quantity_unit(list(param.keys()))
par_val = list(param.values())

label = ''
Expand Down
4 changes: 2 additions & 2 deletions species/read/read_colormag.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import h5py
import numpy as np

from .. data import database
from .. analysis import photometry
from species.analysis import photometry
from species.data import database


class ReadColorMagnitude:
Expand Down
2 changes: 1 addition & 1 deletion species/read/read_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from scipy.interpolate import interp1d, InterpolatedUnivariateSpline

from .. data import database
from species.data import database


class ReadFilter:
Expand Down
8 changes: 4 additions & 4 deletions species/read/read_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from scipy.interpolate import RegularGridInterpolator
from PyAstronomy.pyasl import instrBroadGaussFast

from . import read_filter
from .. analysis import photometry
from .. core import box
from .. data import database
from species.analysis import photometry
from species.core import box
from species.data import database
from species.read import read_filter


def multi_photometry(model,
Expand Down
6 changes: 3 additions & 3 deletions species/read/read_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import h5py
import numpy as np

from . import read_filter
from .. core import box
from .. data import database
from species.core import box
from species.data import database
from species.read import read_filter


class ReadSpectrum:
Expand Down

0 comments on commit e5602b1

Please sign in to comment.