Commit 57753ee7 authored by Médéric Boquien's avatar Médéric Boquien

Give a better diagnostic when the flux table is not read correctly.

parent b7c43344
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
- When using the `parameters\_file` option, the indices of the models now correspond to the line number of the input file. (Médéric Boquien) - When using the `parameters\_file` option, the indices of the models now correspond to the line number of the input file. (Médéric Boquien)
- When using the `parameters\_file` option, the list of modules is read from `sed\_modules` rather than being inferred from the input file. (Médéric Boquien) - When using the `parameters\_file` option, the list of modules is read from `sed\_modules` rather than being inferred from the input file. (Médéric Boquien)
- The computation of the upper limits would only work for the first few models, reverting back to regular fits for the others. (Médéric Boquien) - The computation of the upper limits would only work for the first few models, reverting back to regular fits for the others. (Médéric Boquien)
- A more explicit message is now given when the flux table cannot be read properly. (Médéric Boquien)
### Optimised ### Optimised
- The cache architecture has been simplified, making it somewhat faster. It speeds up the model generation by ~1%. (Médéric Boquien) - The cache architecture has been simplified, making it somewhat faster. It speeds up the model generation by ~1%. (Médéric Boquien)
......
...@@ -137,8 +137,12 @@ class Configuration(object): ...@@ -137,8 +137,12 @@ class Configuration(object):
if self.config['data_file'] != '': if self.config['data_file'] != '':
obs_table = read_table(self.config['data_file']) obs_table = read_table(self.config['data_file'])
# Check that the id and redshift columns are present in the input # Check that the the file was correctly read and that the id and
# file # redshift columns are present in the input file
if 'col1' in obs_table.columns:
raise Exception("The input could not be read properly. Verify "
"its format and that it does not have two "
"columns with the same name.")
if 'id' not in obs_table.columns: if 'id' not in obs_table.columns:
raise Exception("Column id not present in input file") raise Exception("Column id not present in input file")
if 'redshift' not in obs_table.columns: if 'redshift' not in obs_table.columns:
......
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