[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Sep 5 08:44:48 PDT 2017


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/afe3f3351289/
Changeset:   afe3f3351289
User:        hyschive
Date:        2017-09-01 20:35:46+00:00
Summary:     Minor update for the cookbook of calculating SFR
Affected #:  1 file

diff -r 9921b57c74edb63adf0c6faecfe158b2d84eaab0 -r afe3f335128985e3098c24358205bebcc4a4c723 doc/source/cookbook/particle_filter_sfr.py
--- a/doc/source/cookbook/particle_filter_sfr.py
+++ b/doc/source/cookbook/particle_filter_sfr.py
@@ -24,7 +24,7 @@
 inds = np.digitize(formation_time, bins=bins)
 time = (bins[:-1] + bins[1:])/2
 
-sfr = np.array([masses[inds == j].sum()/(bins[j+1]-bins[j])
+sfr = np.array([masses[inds == j+1].sum()/(bins[j+1]-bins[j])
                 for j in range(len(time))])
 sfr[sfr == 0] = np.nan
 


https://bitbucket.org/yt_analysis/yt/commits/e6ea9f86b3ee/
Changeset:   e6ea9f86b3ee
User:        ngoldbaum
Date:        2017-09-05 15:43:45+00:00
Summary:     Merge pull request #1547 from hyschive/update-cookbook-sfr

Minor update for the cookbook of calculating SFR
Affected #:  1 file

diff -r ce4b774035140f64e6cc92907a9bb2c736b250b7 -r e6ea9f86b3eeaf95f3ece1ccec8b35253eff4459 doc/source/cookbook/particle_filter_sfr.py
--- a/doc/source/cookbook/particle_filter_sfr.py
+++ b/doc/source/cookbook/particle_filter_sfr.py
@@ -24,7 +24,7 @@
 inds = np.digitize(formation_time, bins=bins)
 time = (bins[:-1] + bins[1:])/2
 
-sfr = np.array([masses[inds == j].sum()/(bins[j+1]-bins[j])
+sfr = np.array([masses[inds == j+1].sum()/(bins[j+1]-bins[j])
                 for j in range(len(time))])
 sfr[sfr == 0] = np.nan

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list