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