Skip to content

Commit

Permalink
convert astropy columns to numpy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Jun 3, 2020
1 parent fc925f1 commit 9edd814
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py/minimint/mist_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def prepare(eep_prefix,
tab = atpy.Table().read(outp_prefix + '/' + TRACKS_FILE)
os.unlink(outp_prefix + '/' + TRACKS_FILE) # remove after reading

umass, mass_id = np.unique(tab['initial_mass'], return_inverse=True)
ufeh, feh_id = np.unique(tab['feh'], return_inverse=True)
umass, mass_id = np.unique(np.array(tab['initial_mass']), return_inverse=True)
ufeh, feh_id = np.unique(np.array(tab['feh']), return_inverse=True)

neep = 1710
nfeh = len(ufeh)
Expand Down Expand Up @@ -178,8 +178,8 @@ def __init__(self, prefix=None):
self.logage_grid = np.load(prefix + '/' + LOGAGE_FILE)
with open(prefix + '/' + INTERP_PKL, 'rb') as fp:
D = pickle.load(fp)
self.umass = D['umass']
self.ufeh = D['ufeh']
self.umass = np.array(D['umass'])
self.ufeh = np.array(D['ufeh'])
self.neep = D['neep']

def __call__(self, mass, logage, feh):
Expand Down

0 comments on commit 9edd814

Please sign in to comment.