Skip to content

Commit

Permalink
final fixes for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Dec 26, 2023
1 parent 543a84b commit e33f84e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions py/minimint/mist_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ def prepare(eep_prefix,
if k == 'logage':
grid[:, :, :] = np.cumsum(grid, axis=2)

np.save(outp_prefix + '/' + get_file(k), grid)
np.save(os.path.join(outp_prefix, get_file(k)), grid)

with open(outp_prefix + '/' + INTERP_PKL, 'wb') as fp:
with open(os.path.join(outp_prefix, INTERP_PKL), 'wb') as fp:
pickle.dump(dict(umass=umass, ufeh=ufeh, neep=neep), fp)
print('Reading/processing bolometric corrections')
bolom.prepare(bolom_prefix, outp_prefix, filters)
Expand Down Expand Up @@ -353,13 +353,13 @@ def __init__(self, prefix=None):
"""
if prefix is None:
prefix = utils.get_data_path()
self.logg_grid = np.load(prefix + '/' + get_file('logg'))
self.logl_grid = np.load(prefix + '/' + get_file('logl'))
self.logteff_grid = np.load(prefix + '/' + get_file('logteff'))
self.logage_grid = np.load(prefix + '/' + get_file('logage'))
self.phase_grid = np.load(prefix + '/' + get_file('phase'))
(self.logg_grid, self.logl_grid, self.logteff_grid, self.logage_grid,
self.phase_grid) = [
np.load(os.path.join(prefix, get_file(curt)))
for curt in ['logg', 'logl', 'logteff', 'logage', 'phase']
]

with open(prefix + '/' + INTERP_PKL, 'rb') as fp:
with open(os.path.join(prefix, INTERP_PKL), 'rb') as fp:
D = pickle.load(fp)
self.umass = np.array(D['umass'])
self.ufeh = np.array(D['ufeh'])
Expand Down
2 changes: 1 addition & 1 deletion py/minimint/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_data_path():
path = os.environ.get('MINIMINT_DATA_PATH')
if path is not None:
return path
path = str(pathlib.Path(__file__).parent.absolute()) + '/data/'
path = os.path.join(str(pathlib.Path(__file__).parent.absolute()), 'data')
os.makedirs(path, exist_ok=True)
return path

Expand Down

0 comments on commit e33f84e

Please sign in to comment.