timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
120 stars 62 forks source link

something wrong with Dartmouth (for Mac) and MIST(for Linux) #73

Closed xuhengdada closed 4 years ago

xuhengdada commented 6 years ago

Yeah, it seems strange. Here in both case, I use Anaconda. On my Mac(macOS Sierra 10.12.5) (both anaconda2 and anaconda3), I tried in two ways

  1. nosetests isochrones in command line:

    it give back some error, very long thus I omit the feedback, just give the last several lines here:

    File "/Users/xuheng/psrsoft/star_evolution/isochrones/isochrones/dartmouth/grid.py", line 152, in df_all

    df = super(DartmouthModelGrid, self).df_all(phot)

    File "/Users/xuheng/psrsoft/star_evolution/isochrones/isochrones/grid.py", line 191, in df_all

    df = pd.concat([self.to_df(f) for f in self.get_filenames(phot)])

    File "/Users/xuheng/anaconda3/lib/python3.6/site-packages/pandas/core/reshape/concat.py", line 206, in concat

    copy=copy)

    File "/Users/xuheng/anaconda3/lib/python3.6/site-packages/pandas/core/reshape/concat.py", line 239, in init

    ​ raise ValueError('No objects to concatenate')

    ValueError: No objects to concatenate

  2. I tried your example in the notebook in my Ipython:

    from isochrones.dartmouth import DartmouthModelGrid

    g_dar = DartmouthModelGrid(['g','r','i','J','H','K'])

    print(len(g_dar.df))

    then it gives back:

    ---------------------------------------------------------------------------

    ValueError Traceback (most recent call last)

    in () ---- > 1 print(len(g_dar.df)) /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/grid.pyc in df(self) 95 def df(self): 96 if self._df is None:​ ---> 97 self._df = self._get_df() 98 99 return self._df /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/grid.pyc in _get_df(self) 110 logging.debug('loading {} band from {}'.format(b,s)) 111 if s not in grids: --> 112 grids[s] = self.get_hdf(s) 113 if self.common_columns[0] not in df: 114 df[list(self.common_columns)] = grids[s][list(self.common_columns)] /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/grid.pyc in get_hdf(self, phot) 197 df = pd.read_hdf(h5file, 'df') 198 except: --> 199 df = self.write_hdf(phot) 200 return df 201 /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/grid.pyc in write_hdf(self, phot) 201 202 def write_hdf(self, phot): --> 203 df = self.df_all(phot) 204 h5file = self.hdf_filename(phot) 205 df.to_hdf(h5file,'df') /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/dartmouth/grid.pyc in df_all(self, phot) 150 151 def df_all(self, phot): --> 152 df = super(DartmouthModelGrid, self).df_all(phot) 153 df.loc[:,'age'] = np.log10(df.age * 1e9) # convert to log10(age) 154 df = df.sort_values(by=['feh','age','MMo','EEP']) /Users/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/grid.pyc in df_all(self, phot) 189 """Subclasses may want to sort this 190 """ --> 191 df = pd.concat([self.to_df(f) for f in self.get_filenames(phot)]) 192 return df 193 /Users/xuheng/anaconda2/lib/python2.7/site-packages/pandas/core/reshape/concat.pyc in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 210 keys=keys, levels=levels, names=names, 211 verify_integrity=verify_integrity, --> 212 copy=copy) 213 return op.get_result() 214 /Users/xuheng/anaconda2/lib/python2.7/site-packages/pandas/core/reshape/concat.pyc in __init__(self, objs, axis, join, join_axes, keys, levels, names, ignore_index, verify_integrity, copy) 243 244 if len(objs) == 0: --> 245 raise ValueError('No objects to concatenate') 246 247 if keys is None: ValueError: No objects to concatenate

On my centos (CentOS Linux release 7.5.1804 (Core)) and Python 2.7.13: Anaconda custom (64-bit) environment, I tried with MIST in Ipython:

from isochrones.mist import MIST_Isochrone

mist = MIST_Isochrone()

then the error feedback is:

---------------------------------------------------------------------------

TypeError Traceback (most recent call last)

in () ----> 1 mist = MIST_Isochrone() /home/xuheng/anaconda2/lib/python2.7/site-packages/isochrones/mist/isochrone.pyc in __init__(self, *args, **kwargs) 36 self.default_bands = self.default_bands + ('TESS', 'BP', 'RP') 37 ---> 38 super().__init__(*args, **kwargs) 39 40 def Z_surf(self, mass, age, feh): TypeError: super() takes at least 1 argument (0 given)

so I have no idea about these problems​​, do you know the reason?