Commit 097ace21 authored by Médéric Boquien's avatar Médéric Boquien

Change the vague column_list keyword in pcigale.ini to bands. This will...

Change the vague column_list keyword in pcigale.ini to bands. This will require the user to rebuild their pcigale.ini but that is necessary for the validation anyway so that is the right moment to do so.
parent 0d883320
......@@ -126,14 +126,14 @@ class PdfAnalysis(AnalysisModule):
lim_flag = conf['analysis_params']["lim_flag"]
mock_flag = conf['analysis_params']["mock_flag"]
filters = [name for name in conf['column_list'] if not
filters = [name for name in conf['bands'] if not
name.endswith('_err')]
n_filters = len(filters)
# Read the observation table and complete it by adding error where
# none is provided and by adding the systematic deviation.
obs_table = complete_obs_table(read_table(conf['data_file']),
conf['column_list'], filters, TOLERANCE,
conf['bands'], filters, TOLERANCE,
lim_flag)
n_obs = len(obs_table)
......
......@@ -70,7 +70,7 @@ class SaveFluxes(AnalysisModule):
"""Process with the savedfluxes analysis.
All the possible theoretical SED are created and the fluxes in the
filters from the column_list are computed and saved to a table,
filters from the list of bands are computed and saved to a table,
alongside the parameter values.
Parameters
......@@ -85,7 +85,7 @@ class SaveFluxes(AnalysisModule):
out_format = conf['analysis_params']['output_format']
save_sed = conf['analysis_params']['save_sed']
filters = [name for name in conf['column_list'] if not
filters = [name for name in conf['bands'] if not
name.endswith('_err')]
n_filters = len(filters)
......
......@@ -139,28 +139,27 @@ class Configuration(object):
raise Exception("Column redshift not present in input file")
# Finding the known filters in the data table
column_list = []
for column in obs_table.columns:
filter_name = column[:-4] if column.endswith('_err') else column
bands = []
for band in obs_table.columns:
filter_name = band[:-4] if band.endswith('_err') else band
if filter_name in filter_list:
column_list.append(column)
bands.append(band)
# Check that we don't have an error column without the associated
# flux
for column in column_list:
if column.endswith('_err') and (column[:-4]
not in column_list):
# Check that we don't have an band error without the associated
# band
for band in bands:
if band.endswith('_err') and (band[:-4] not in bands):
raise Exception("The observation table as a {} column "
"but no {} column.".format(column,
column[:-4]))
"but no {} column.".format(band,
band[:-4]))
self.config['column_list'] = column_list
self.config['bands'] = bands
else:
self.config['column_list'] = ''
self.config.comments['column_list'] = [""] + wrap(
"List of the columns in the observation data file to use for "
"the fitting.")
self.spec['column_list'] = "cigale_string_list()"
self.config['bands'] = ''
self.config.comments['bands'] = [""] + wrap("Bands to consider. To "
"consider uncertainties too, the name of the band must be "
"indicated with the _err suffix. For instance: FUV, FUV_err.")
self.spec['bands'] = "cigale_string_list()"
# SED creation modules configurations. For each module, we generate
# the configuration section from its parameter list.
......
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