Commit 021e2d75 authored by Médéric Boquien's avatar Médéric Boquien

Some reformatting to try to improve the legibility of the code and to follow PEP8 better.

parent e654154f
...@@ -42,20 +42,22 @@ class ObservationsManagerPassbands(object): ...@@ -42,20 +42,22 @@ class ObservationsManagerPassbands(object):
self.params = params self.params = params
self.allpropertiesnames, self.massproportional = get_info(self) self.allpropertiesnames, self.massproportional = get_info(self)
self.table = read_table(config['data_file']) self.table = read_table(config['data_file'])
self.bands = [band for band in config['bands'] if not self.bands = [band for band in config['bands']
band.endswith('_err')] if not band.endswith('_err')]
self.bands_err = [band for band in config['bands'] if self.bands_err = [band for band in config['bands']
band.endswith('_err')] if band.endswith('_err')]
self.intprops = [prop for prop in config['properties'] if (prop not in self.intprops = [prop for prop in config['properties']
self.massproportional and not prop.endswith('_err'))] if (prop not in self.massproportional
self.intprops_err = [prop for prop in config['properties'] if and not prop.endswith('_err'))]
(prop.endswith('_err') and prop[:-4] not in self.intprops_err = [prop for prop in config['properties']
self.massproportional)] if (prop.endswith('_err')
self.extprops = [prop for prop in config['properties'] if (prop in and prop[:-4] not in self.massproportional)]
self.massproportional and not prop.endswith('_err'))] self.extprops = [prop for prop in config['properties']
self.extprops_err = [prop for prop in config['properties'] if if (prop in self.massproportional
(prop.endswith('_err') and prop[:-4] in and not prop.endswith('_err'))]
self.massproportional)] self.extprops_err = [prop for prop in config['properties']
if (prop.endswith('_err')
and prop[:-4] in self.massproportional)]
self.tofit = self.bands + self.intprops + self.extprops self.tofit = self.bands + self.intprops + self.extprops
self.tofit_err = self.bands_err + self.intprops_err + self.extprops_err self.tofit_err = self.bands_err + self.intprops_err + self.extprops_err
...@@ -289,6 +291,7 @@ class Observation(object): ...@@ -289,6 +291,7 @@ class Observation(object):
fluxes, intensive properties, extensive properties and their errors, that fluxes, intensive properties, extensive properties and their errors, that
are going to be considered in the fit. are going to be considered in the fit.
""" """
def __init__(self, row, cls): def __init__(self, row, cls):
self.redshift = row['redshift'] self.redshift = row['redshift']
self.id = row['id'] self.id = row['id']
......
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