You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently looking at the ratio between the total_subgrid vs total_accreted BH masses from the snapshots. I'm reading these quantities using swiftsimio in the following way:
importpandasaspdimportnumpyasnpfromswiftsimioimportloadasload_snapsim='HYDRO_FIDUCIAL'#sim = 'HYDRO_JETS_published' snap=77#77 or 78 for high res fiducialrun='L1000N1800'#Snapshots datarun_directory=f'/cosma8/data/dp004/flamingo/Runs/{run}/{sim}/'#simulation directorysnapshot_name=f'snapshots/flamingo_00{snap}/flamingo_0077.hdf5'#snapshot filesnap=load_snap(run_directory+'/'+snapshot_name)
# #Reading in BH particle dataprint('Reading BH data...')
data=load_snap(run_directory+'/'+snapshot_name)
df_BH=pd.DataFrame()
df_BH['BH_subgrid_mass'] =data.black_holes.subgrid_masses.to('Msun').valueprint(data.black_holes.total_accreted_masses.units)
df_BH['BH_accretion_mass'] =data.black_holes.total_accreted_masses.to('Msun').valuedf_BH['BH_accretion_rate'] =data.black_holes.accretion_rates.to('Msun/Gyr').valuedf_BH['BH_particle_ID'] =data.black_holes.particle_ids.valueprint(df_BH)
For the int res fiducial model, this is working fine. But for the int res jets model, swiftsimio seems to think the TotalAccretedMass quantity is given in Msun/Gyr and so I can't read it in. The units listed in the actual snapshots are correct, so I'm not sure what's going on. Could you look into this please?
The actual error it gives me is this:
UnitConversionError: Cannot convert between '10227144.8879616*Msun/Gyr' (dim '(mass)/(time)') and 'Msun' (dim '(mass)').
The text was updated successfully, but these errors were encountered:
Thanks for catching this Emily. The problem is due to incorrect metadata stored in the swift snapshot, rather than a problem with swiftsimio. We can got through the snapshots and correct the metadata. I'll leave this issue open until we've done that.
I'm currently looking at the ratio between the total_subgrid vs total_accreted BH masses from the snapshots. I'm reading these quantities using swiftsimio in the following way:
For the int res fiducial model, this is working fine. But for the int res jets model, swiftsimio seems to think the TotalAccretedMass quantity is given in Msun/Gyr and so I can't read it in. The units listed in the actual snapshots are correct, so I'm not sure what's going on. Could you look into this please?
The actual error it gives me is this:
UnitConversionError: Cannot convert between '10227144.8879616*Msun/Gyr' (dim '(mass)/(time)') and 'Msun' (dim '(mass)').
The text was updated successfully, but these errors were encountered: