Skip to content

Commit

Permalink
Fix profile read issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Feb 21, 2020
1 parent 31a546f commit 1319551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesaPlot/file_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def iterateProfiles(self,f="",priority=None,rng=[-1.0,-1.0],step=1,cache=True):
def _loadProfileIndex(self,f):
self.prof_ind=np.genfromtxt(f+"/profiles.index",skip_header=1,names=["model","priority","profile"])

def _readProfile(self,filename,cache=True,cols=[]):
def _readProfile(self,filename,cache=True,cols=[],use_pickle=True,reload_pickle=False):
"""
Reads a MESA profile file.
Expand Down Expand Up @@ -485,7 +485,7 @@ def _readProfile(self,filename,cache=True,cols=[]):
self.prof=self._cache_prof[self._cache_prof_name.index(filename)]
else:
x=data()
x.loadFile(filename,cols=cols)
x.loadFile(filename,cols=cols,use_pickle=use_pickle,reload_pickle=reload_pickle)
if cache:
if len(self._cache_prof_name)==self.cache_limit:
self._cache_prof.pop(0)
Expand Down

0 comments on commit 1319551

Please sign in to comment.