Commit 6f4be909 authored by  Hector Salas's avatar Hector Salas

modify models.py to use get_info from utils, add intprops and extprops...

modify models.py to use get_info from utils, add intprops and extprops property to ModelsManager class
parent 1e53c834
...@@ -31,7 +31,7 @@ class ModelsManager(object): ...@@ -31,7 +31,7 @@ class ModelsManager(object):
self.block = params.blocks[iblock] self.block = params.blocks[iblock]
self.propertiesnames = conf['analysis_params']['variables'] self.propertiesnames = conf['analysis_params']['variables']
self.allpropertiesnames, self.massproportional = self._get_info() self.allpropertiesnames, self.massproportional = get_info(self)
self._fluxes = SharedArray((len(self.obs.bands), len(self.block))) self._fluxes = SharedArray((len(self.obs.bands), len(self.block)))
self._properties = SharedArray((len(self.propertiesnames), self._properties = SharedArray((len(self.propertiesnames),
...@@ -57,14 +57,17 @@ class ModelsManager(object): ...@@ -57,14 +57,17 @@ class ModelsManager(object):
""" """
return self._properties.data return self._properties.data
def _get_info(self): @property
warehouse = SedWarehouse() def intprops(self):
sed = warehouse.get_sed(self.conf['sed_modules'], """Returns a shared array containing the intensive properties to fit.
self.params.from_index(0)) """
info = list(sed.info.keys()) return self._intprops.data
info.sort()
return (info, sed.mass_proportional_info) @property
def extprops(self):
"""Returns a shared array containing the extensive properties to fit.
"""
return self._extprops.data
def save(self, filename): def save(self, filename):
"""Save the fluxes and properties of all the models into a table. """Save the fluxes and properties of all the models into a table.
......
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