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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 9 08:21:05 PDT 2014


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/701f1228cde2/
Changeset:   701f1228cde2
Branch:      yt
User:        gsiisg
Date:        2014-04-05 01:59:42
Summary:     fixed star formation rate density calculation to use cMpc following literature
Affected #:  1 file

diff -r afe7b20c1a5ef1264251e4ec6a0bb1223e3bb3b5 -r 701f1228cde2c1b2a7e121a51b2f238e0666eae2 yt/analysis_modules/star_analysis/sfr_spectrum.py
--- a/yt/analysis_modules/star_analysis/sfr_spectrum.py
+++ b/yt/analysis_modules/star_analysis/sfr_spectrum.py
@@ -148,8 +148,10 @@
             self.redshift.append(self.cosm.ComputeRedshiftFromTime(time * tc))
             self.Msol_yr.append(self.mass_bins[i] / \
                 (self.time_bins_dt[i] * tc / YEAR))
+            # added (1+z)^3 to correctly change to cMpc^3 used in literature
             self.Msol_yr_vol.append(self.mass_bins[i] / \
-                (self.time_bins_dt[i] * tc / YEAR) / vol)
+                (self.time_bins_dt[i] * tc / YEAR) / vol / \
+                (1+self._pf.current_redshift)**3)
             self.Msol.append(self.mass_bins[i])
             self.Msol_cumulative.append(self.cum_mass_bins[i])
         self.time = np.array(self.time)


https://bitbucket.org/yt_analysis/yt/commits/367548fc2ffc/
Changeset:   367548fc2ffc
Branch:      yt
User:        gsiisg
Date:        2014-04-08 20:26:06
Summary:     sfr_spectrum.py edited online with Bitbucket
Affected #:  1 file

diff -r 701f1228cde2c1b2a7e121a51b2f238e0666eae2 -r 367548fc2ffc2a34320a40479bd5de3836096740 yt/analysis_modules/star_analysis/sfr_spectrum.py
--- a/yt/analysis_modules/star_analysis/sfr_spectrum.py
+++ b/yt/analysis_modules/star_analysis/sfr_spectrum.py
@@ -125,14 +125,14 @@
         """
         if self.mode == 'data_source':
             try:
-                vol = self._data_source.volume('mpc')
+                vol = self._data_source.volume('mpccm')
             except AttributeError:
                 # If we're here, this is probably a HOPHalo object, and we
                 # can get the volume this way.
                 ds = self._data_source.get_sphere()
-                vol = ds.volume('mpc')
+                vol = ds.volume('mpccm')
         elif self.mode == 'provided':
-            vol = self.volume
+            vol = self.volume('mpccm')
         tc = self._pf["Time"]
         self.time = []
         self.lookback_time = []
@@ -148,10 +148,9 @@
             self.redshift.append(self.cosm.ComputeRedshiftFromTime(time * tc))
             self.Msol_yr.append(self.mass_bins[i] / \
                 (self.time_bins_dt[i] * tc / YEAR))
-            # added (1+z)^3 to correctly change to cMpc^3 used in literature
+            # changed vol from mpc to mpccm used in literature
             self.Msol_yr_vol.append(self.mass_bins[i] / \
-                (self.time_bins_dt[i] * tc / YEAR) / vol / \
-                (1+self._pf.current_redshift)**3)
+                (self.time_bins_dt[i] * tc / YEAR) / vol)
             self.Msol.append(self.mass_bins[i])
             self.Msol_cumulative.append(self.cum_mass_bins[i])
         self.time = np.array(self.time)


https://bitbucket.org/yt_analysis/yt/commits/adb3948387b1/
Changeset:   adb3948387b1
Branch:      yt
User:        gsiisg
Date:        2014-04-08 21:05:32
Summary:     sfr_spectrum.py edited online with Bitbucket
Affected #:  1 file

diff -r 367548fc2ffc2a34320a40479bd5de3836096740 -r adb3948387b1616858721cc0528556b90b81cde2 yt/analysis_modules/star_analysis/sfr_spectrum.py
--- a/yt/analysis_modules/star_analysis/sfr_spectrum.py
+++ b/yt/analysis_modules/star_analysis/sfr_spectrum.py
@@ -41,7 +41,7 @@
     star_creation_time : Ordered array or list of floats
         The creation time for the stars in code units.
     volume : Float
-        The volume of the region for the specified list of stars.
+        The comoving volume of the region for the specified list of stars.
     bins : Integer
         The number of time bins used for binning the stars. Default = 300.
     
@@ -69,7 +69,7 @@
                 If data_source is not provided, all of these paramters need to be set:
                 star_mass (array, Msun),
                 star_creation_time (array, code units),
-                volume (float, Mpc**3).
+                volume (float, cMpc**3).
                 """)
                 return None
             self.mode = 'provided'

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