sbird / fake_spectra

A code for generating fake spectra from a cosmological simulation
MIT License
12 stars 13 forks source link

Added gamma_factor and temp_factor as options in RateNetworkSpectra #45

Closed andreufont closed 4 years ago

andreufont commented 4 years ago

This addresses issue #44

I tested that I can generate spectra with these options, and that they provide different mean flux, but I haven't fully tested the resulting value of (T_0,gamma) since I only have a small test simulation in my laptop.

andreufont commented 4 years ago

I've also added the option to pass treecool_file, hubble and fbar options to the network.

sbird commented 4 years ago

Thanks, looks good to me! I think you are indeed the first one to rescale gamma with the rate network (we have used RateNetworkSpectra mostly for DLAs).

sbird commented 4 years ago

Wait, sorry, I merge too quickly. You can just pass the temp_factor and gamma_factor in the gasprop_args dictionary, can't you? It is intended that to avoid a million arguments to the RateNetworkSpectra you pass a gasprop_args dictionary containing the arguments for the gas properties structure (which does not have to be one of the structures implemented so far).

andreufont commented 4 years ago

Hi @sbird - yes, you need to add both factors to the gasprop_args, but this is not an input of RateNetworkSpectra either.

One option is to make gasprop_args an input of RateNetworkSpectra, the other option was to do what I did. I don't mind either way.

sbird commented 4 years ago

Ah, indeed. I see. The gasprop_args is over-ridden by the constructor. Got it. In that case, let's leave is as is, fully merged because the revert is a bit painful :-) Thanks!

andreufont commented 4 years ago

Great. Thanks!