Commit aaca15af authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Check that the id and redshift columns are present in the input file. Freely...

Check that the id and redshift columns are present in the input file. Freely inspired from an initial patch written by Denis.
parent 51a3810f
......@@ -158,8 +158,15 @@ class Configuration(object):
with Database() as base:
filter_list = base.get_filter_list()[0]
# Finding the known filters in the data table
obs_table = read_table(self.config['data_file'])
# Check that the id and redshift columns are present in the input file
if 'id' not in obs_table.columns:
raise Exception("Column id not present in input file")
if 'redshift' not in obs_table.columns:
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
......
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