Commit f10d9f86 authored by Médéric Boquien's avatar Médéric Boquien

Slight formatting corrections to follow the PEP8 a bit more closely.

parent eb3ffc69
......@@ -97,7 +97,8 @@ class ObservationsManagerPassbands(object):
self.tofit = self.bands + self.intprops + self.extprops
self.tofit_err = self.bands_err + self.intprops_err + self.extprops_err
self.observations = list([Observation(row, self) for row in self.table])
self.observations = list([Observation(row, self)
for row in self.table])
def __len__(self):
return len(self.observations)
......@@ -162,9 +163,12 @@ class ObservationsManagerPassbands(object):
for item in self.tofit:
error = item + '_err'
if item in self.intprops:
if error not in self.intprops_err or error not in self.table.colnames:
raise ValueError("Intensive properties errors must be in input file.")
elif error not in self.tofit_err or error not in self.table.colnames:
if (error not in self.intprops_err or
error not in self.table.colnames):
raise ValueError("Intensive properties errors must be in "
"input file.")
elif (error not in self.tofit_err or
error not in self.table.colnames):
colerr = Column(data=np.fabs(self.table[item] * defaulterror),
name=error)
self.table.add_column(colerr,
......
......@@ -73,7 +73,7 @@ class ParametersManagerGrid(object):
"""
k = len(l) // nb
step = k + nz - k%nz
step = k + nz - k % nz
return [l[i * step: (i+1) * step] for i in range(nb)]
......@@ -223,7 +223,6 @@ class ParametersManagerFile(object):
raise ValueError("The number of blocks must be no more than the number"
"of models.")
def from_index(self, index):
"""Provides the parameters of a model given an index.
......
......@@ -13,6 +13,7 @@ import numpy as np
from multiprocessing.sharedctypes import RawArray
from ..warehouse import SedWarehouse
def get_info(cls):
warehouse = SedWarehouse()
sed = warehouse.get_sed(cls.conf['sed_modules'],
......@@ -22,6 +23,7 @@ def get_info(cls):
return (info, sed.mass_proportional_info)
class SharedArray(object):
"""Class to Create a shared array that can be read/written by parallel
processes, were data related to the models is going to be stored. For
......
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