beast icon indicating copy to clipboard operation
beast copied to clipboard

In beast.observationmodel.observations.Observations, `obs_colnames` isn't optional

Open lea-hagen opened this issue 4 years ago • 1 comments

The keyword obs_colnames in beast.observationmodel.observations.Observations is currently optional (default is None). But there's no check to see if it's set, so it's always used when making the filter_aliases dictionary. None isn't a valid dictionary key, so the code will break if obs_colnames is left with its default value. https://github.com/BEAST-Fitting/beast/blob/ff43550e8382d225a449f24b2b65c969c7c53d5a/beast/observationmodel/observations.py#L55-L57

lea-hagen avatar Jun 12 '20 21:06 lea-hagen

Looking back at the history, since the old GenFluxCatalog class lived in datamodel.py, it could automatically grab obs_colnames. So even though it has always technically been an optional input, it was always automatically set.

lea-hagen avatar Jun 15 '20 16:06 lea-hagen