Skip to content

Commit

Permalink
v0.7.6 - fit_catalogue bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ACCarnall committed Jan 7, 2019
1 parent 794a5e6 commit 5155a65
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion bagpipes/catalogue/merge_catalogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import glob
import pandas as pd
import os
import time

from subprocess import call

Expand Down Expand Up @@ -31,7 +32,8 @@ def merge(run, mode="merge"):
names=header, skiprows=1))

if isinstance(cats[-1].loc[0, "#ID"], float):
cats[-1].loc[:, "#ID"] = cats[-1].loc[:, "#ID"].astype(int)
m = np.invert(np.isnan(cats[-1].loc[:, "#ID"]))
cats[-1].loc[m, "#ID"] = cats[-1].loc[m, "#ID"].astype(int)

cats[-1].index = cats[-1]["#ID"].astype(str)
break
Expand Down
9 changes: 6 additions & 3 deletions bagpipes/plotting/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ def hist1d(samples, ax, smooth=False, label=None, color="orange",
x_label = fix_param_names([label])
ax.set_xlabel(x_label)

y, x = np.histogram(samples, bins=bins, density=True,
range=(np.max([samples.min(), -99.]), samples.max()))
width = samples.max() - np.max([samples.min(), -99.])
range = (np.max([samples.min(), -99.]) - width/10.,
samples.max() + width/10.)

y, x = np.histogram(samples, bins=bins, density=True, range=range)

y = gaussian_filter(y, 1.5)

Expand All @@ -161,7 +164,7 @@ def hist1d(samples, ax, smooth=False, label=None, color="orange",
color="black", zorder=zorder, lw=3)

ax.set_ylim(bottom=0)
ax.set_xlim(np.max([samples.min(), -99.]), samples.max())
ax.set_xlim(range)
auto_x_ticks(ax, nticks=3.)
plt.setp(ax.get_yticklabels(), visible=False)

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.7.5'
version = u'0.7.6'
# The full version, including alpha/beta/rc tags.
release = u'0.7.5'
release = u'0.7.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion rtd-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ dependencies:
- scipy
- matplotlib>=2.2.2
- numpy>=1.14.2
- pybind11
- pip:
- corner
- pymultinest
- msgpack
- deepdish
- pandas
- sphinx_navtree
- pybind11
- george
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
setup(
name='bagpipes',

version='0.7.5',
version='0.7.6',

description='Galaxy spectral fitting',

Expand Down

0 comments on commit 5155a65

Please sign in to comment.