Commit 00d6eaad authored by  Hector Salas's avatar Hector Salas

Add intprops and extprops property to BestResultManager class

parent fda2ce6e
...@@ -127,11 +127,15 @@ class BestResultsManager(object): ...@@ -127,11 +127,15 @@ class BestResultsManager(object):
self.obs = models.obs self.obs = models.obs
self.nbands = len(models.obs.bands) self.nbands = len(models.obs.bands)
self.nobs = len(models.obs) self.nobs = len(models.obs)
self.nintprops = len(models.obs.intprops)
self.nextprops = len(models.obs.extprops)
self.propertiesnames = models.allpropertiesnames self.propertiesnames = models.allpropertiesnames
self.massproportional = models.massproportional self.massproportional = models.massproportional
self.nproperties = len(models.allpropertiesnames) self.nproperties = len(models.allpropertiesnames)
self._fluxes_shape = (self.nobs, self.nbands) self._fluxes_shape = (self.nobs, self.nbands)
self._intprops_shape = (self.nobs, self.nintprops)
self._extprops_shape = (self.nobs, self.nextprops)
self._properties_shape = (self.nobs, self.nproperties) self._properties_shape = (self.nobs, self.nproperties)
# Arrays where we store the data related to the models. For memory # Arrays where we store the data related to the models. For memory
...@@ -140,6 +144,8 @@ class BestResultsManager(object): ...@@ -140,6 +144,8 @@ class BestResultsManager(object):
# important that there is no conflict and that two different workers do # important that there is no conflict and that two different workers do
# not write on the same section. # not write on the same section.
self._fluxes = SharedArray(self._fluxes_shape) self._fluxes = SharedArray(self._fluxes_shape)
self._intprops = SharedArray(self._intprops_shape)
self._extprops = SharedArray(self._extprops_shape)
self._properties = SharedArray(self._properties_shape) self._properties = SharedArray(self._properties_shape)
self._chi2 = SharedArray(self.nobs) self._chi2 = SharedArray(self.nobs)
# We store the index as a float to work around python issue #10746 # We store the index as a float to work around python issue #10746
...@@ -153,6 +159,22 @@ class BestResultsManager(object): ...@@ -153,6 +159,22 @@ class BestResultsManager(object):
""" """
return self._fluxes.data return self._fluxes.data
@property
def intprops(self):
"""Returns a shared array containing the fluxes of the best fit for
each observation.
"""
return self._intprops.data
@property
def extprops(self):
"""Returns a shared array containing the fluxes of the best fit for
each observation.
"""
return self._extprops.data
@property @property
def properties(self): def properties(self):
"""Returns a shared array containing the physical properties of the """Returns a shared array containing the physical properties of the
......
Markdown is supported
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