Commit 586de99a authored by Médéric Boquien's avatar Médéric Boquien
Browse files

The SSPs in the database are always built on a time grid with 1 Myr time...

The SSPs in the database are always built on a time grid with 1 Myr time steps. No need to drag around a constant for this as it will stay that way for the forseeable future.
parent ec6b64e3
...@@ -19,11 +19,6 @@ import numpy as np ...@@ -19,11 +19,6 @@ import numpy as np
from . import CreationModule from . import CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE = 1
class Sfh2Exp(CreationModule): class Sfh2Exp(CreationModule):
"""Double decreasing exponential Star Formation History """Double decreasing exponential Star Formation History
...@@ -88,8 +83,8 @@ class Sfh2Exp(CreationModule): ...@@ -88,8 +83,8 @@ class Sfh2Exp(CreationModule):
normalise = (self.parameters["normalise"].lower() == "true") normalise = (self.parameters["normalise"].lower() == "true")
# Time grid and age. If needed, the age is rounded to the inferior Myr # Time grid and age. If needed, the age is rounded to the inferior Myr
time_grid = np.arange(AGE_LAPSE, age + AGE_LAPSE, AGE_LAPSE) time_grid = np.arange(1, age + 1)
time_grid_burst = np.arange(AGE_LAPSE, burst_age + AGE_LAPSE, AGE_LAPSE) time_grid_burst = np.arange(1, burst_age + 1)
# SFR for each component # SFR for each component
sfr = np.exp(-time_grid / tau_main) sfr = np.exp(-time_grid / tau_main)
......
...@@ -28,11 +28,6 @@ import numpy as np ...@@ -28,11 +28,6 @@ import numpy as np
from . import CreationModule from . import CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE = 1
class SfhBuat08(CreationModule): class SfhBuat08(CreationModule):
"""Chemical evolution motivated Star Formation History """Chemical evolution motivated Star Formation History
...@@ -74,7 +69,7 @@ class SfhBuat08(CreationModule): ...@@ -74,7 +69,7 @@ class SfhBuat08(CreationModule):
normalise = (self.parameters["normalise"].lower() == "true") normalise = (self.parameters["normalise"].lower() == "true")
# Time grid and age. If needed, the age is rounded to the inferior Myr # Time grid and age. If needed, the age is rounded to the inferior Myr
time_grid = np.arange(AGE_LAPSE, age + AGE_LAPSE, AGE_LAPSE) time_grid = np.arange(1, age + 1)
# Values from Buat et al. (2008) table 2 # Values from Buat et al. (2008) table 2
paper_velocities = np.array([80., 150., 220., 290., 360.]) paper_velocities = np.array([80., 150., 220., 290., 360.])
......
...@@ -21,11 +21,6 @@ import numpy as np ...@@ -21,11 +21,6 @@ import numpy as np
from . import CreationModule from . import CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE = 1
class SfhQuench(CreationModule): class SfhQuench(CreationModule):
"""Star Formation History Quenching """Star Formation History Quenching
......
...@@ -20,11 +20,6 @@ import numpy as np ...@@ -20,11 +20,6 @@ import numpy as np
from . import CreationModule from . import CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE = 1
class SFHDelayed(CreationModule): class SFHDelayed(CreationModule):
"""Delayed tau model for Star Formation History """Delayed tau model for Star Formation History
...@@ -70,7 +65,7 @@ class SFHDelayed(CreationModule): ...@@ -70,7 +65,7 @@ class SFHDelayed(CreationModule):
normalise = (self.parameters["normalise"].lower() == "true") normalise = (self.parameters["normalise"].lower() == "true")
# Time grid and age. If needed, the age is rounded to the inferior Myr # Time grid and age. If needed, the age is rounded to the inferior Myr
time_grid = np.arange(AGE_LAPSE, age + AGE_LAPSE, AGE_LAPSE) time_grid = np.arange(1, age + 1)
# Main SFR # Main SFR
sfr = time_grid / tau_main**2 * np.exp(-time_grid / tau_main) sfr = time_grid / tau_main**2 * np.exp(-time_grid / tau_main)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment