Skip to content

Commit

Permalink
Merge branch 'master' (bug fix [numpy] from @cmccormick1) into featur…
Browse files Browse the repository at this point in the history
…e/constants (iss #8)
  • Loading branch information
astrochun committed Jan 31, 2020
2 parents 0ef778f + 2368f24 commit 875c91c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Metallicity_Stack_Commons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from datetime import date
import os
import getpass
import numpy as np

version = "0.1.0"

Expand Down Expand Up @@ -45,7 +46,7 @@ def exclude_outliers(objno):
flag = np.zeros(len(objno), dtype=int)
bad_data = np.array(['32007727', '32101412', '42006031', '32035286', '14023705'])
for ii in range(len(bad_data)):
idx = [xx for xx in range(len(objno)) if bad_data[ii] == str(objno[xx])][0]
idx = [xx for xx in range(len(objno)) if bad_data[ii] == str(objno[xx])]
flag[idx] = 1

return flag
Expand Down Expand Up @@ -79,7 +80,7 @@ def dir_date(org_name, path_init='', year=False):

list_path = [path_init, org_name, "%02i%02i" % (today.month, today.day), '']
if year:
list_path[-2] += "i%02i%02i" % today.year
list_path[-2] += "%02i" % today.year

fitspath = os.path.join(*list_path)
try:
Expand Down

0 comments on commit 875c91c

Please sign in to comment.