Folks, Could someone advise me how to compute SFR for halos? I have a dataset for which I computed SFR: d = yt.load('/data/gnedin/REICMP/D/RT/CASE.REF2/rei10_a0.1003/rei10_a0.1003.art') ad = d.all_data() sfr = StarFormationRate(d,data_source=ad) I also know how to add stellar masses to halos: sm = d.add_deposited_particle_field(("STAR","MASS"),"sum") h = yt.load('/data/gnedin/REICMP/D/RT/CASE.REF2/HC/a=0.1/hc.0.h5') hc = HaloCatalog(data_ds=d,halos_ds=h,output_dir="/data/gnedin/REICMP/D/RT/CASE.REF2/HC/a=0.1") hc.add_recipe("calculate_virial_quantities", ["radius", sm], overdensity_field=('artio', 'HVAR_GAS_DENSITY')) hc.create() But how do I add sfr.Msol_yr field from sfr as a deposited particle field for d? Thank you so much, Nick Gnedin
Hi Nick, I think the way to do this is via a custom halo quantity: http://yt-project.org/doc/analyzing/analysis_modules/halo_catalogs.html#quan... You can see how the current halo quantities are defined here: https://github.com/yt-project/yt/blob/master/yt/analysis_modules/halo_analys... Rather than using the StarFormationRate class from the star analysis module (which is deprecated and not maintained) I think a better way to do this is to calculate the star formation rate using a particle filter for stars that formed dynamically in the simulation. The star formation rate can then be calculated by using a weighted histogram of the particle creation times. See this cookbook recipe for an example: http://yt-project.org/doc/cookbook/calculating_information.html#using-partic... Hope that helps, Nathan On Mon, May 1, 2017 at 10:33 AM, Nick Gnedin <ngnedin@gmail.com> wrote:
Folks,
Could someone advise me how to compute SFR for halos?
I have a dataset for which I computed SFR:
d = yt.load('/data/gnedin/REICMP/D/RT/CASE.REF2/rei10_a0.1003/re i10_a0.1003.art') ad = d.all_data() sfr = StarFormationRate(d,data_source=ad)
I also know how to add stellar masses to halos:
sm = d.add_deposited_particle_field(("STAR","MASS"),"sum") h = yt.load('/data/gnedin/REICMP/D/RT/CASE.REF2/HC/a=0.1/hc.0.h5') hc = HaloCatalog(data_ds=d,halos_ds=h,output_dir="/data/gnedin/RE ICMP/D/RT/CASE.REF2/HC/a=0.1") hc.add_recipe("calculate_virial_quantities", ["radius", sm], overdensity_field=('artio', 'HVAR_GAS_DENSITY')) hc.create()
But how do I add sfr.Msol_yr field from sfr as a deposited particle field for d?
Thank you so much,
Nick Gnedin
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Nathan Goldbaum
-
Nick Gnedin