jluastro / PopSyCLE

Population Synthesis for Compact-object Lensing Events
https://popsycle.readthedocs.io/en/latest/
16 stars 3 forks source link

Problem in sample Python notebook with ifmr.generate_death_mass #45

Open valboz opened 10 months ago

valboz commented 10 months ago

Hello

I have completed the installation of PopSyCLE with my student that should work on simulations of microlensing events with black holes. I am looking forward to seeing simulated microlensing events with your code! However, while running the provided notebook PopSyCLE_example.ipynb, we get the following error

File ~/Documenti/SPISEA/spisea/synthetic.py:260, in ResolvedCluster._make_star_systems_table(self, mass, isMulti, sysMass) 256 idx_rem = np.where((np.isnan(star_systems['Teff'])) & (star_systems['mass'] > highest_mass_iso))[0] 258 # Calculate remnant mass and ID for compact objects; update remnant_id and 259 # remnant_mass arrays accordingly --> 260 if 'metallicity_array' in inspect.getfullargspec(self.ifmr.generate_death_mass).args: 261 r_mass_tmp, r_id_tmp = self.ifmr.generate_death_mass(mass_array=star_systems['mass'][idx_rem], 262 metallicity_array=star_systems['metallicity'][idx_rem]) 263 else:

AttributeError: 'IFMR' object has no attribute 'generate_death_mass'

It seems that a specific ifmr should be specified somewhere, while the code uses the parent class ifmr. Can you please help?

Valerio