[yt-users] question about the star analysis module

Stephen Skory s at skory.us
Sat May 28 13:24:32 PDT 2011


Hi Christine,

> For example, if I ran the module to get the star formation rates like this:
>
> sfr = StarFormationRate(pf, data_source=all)
>
> How can I access the contents of sfr in the script itself, rather than just
> writing it out to a file?

You should look at the write_out() function in the source:

http://hg.enzotools.org/yt/src/6d4a5588a550/yt/analysis_modules/star_analysis/sfr_spectrum.py#cl-130

in the for loop for inspiration. In the source things that are named
'self.mass_bins', for example, can be accessed as 'sfr.mass_bins' if
you do things as you've said above.

Good luck!

-- 
Stephen Skory
s at skory.us
http://stephenskory.com/
510.621.3687 (google voice)



More information about the yt-users mailing list