firecrown icon indicating copy to clipboard operation
firecrown copied to clipboard

API for passing sacc data to `load_likelihood` and `build_likelihood`

Open tilmantroester opened this issue 1 year ago • 3 comments

For blinding (@arthurmloureiro) we need to be able to pass sacc objects to the likelihood creation entry point. At the moment, load_likelihood and build_likelihood expect a NamedParameters argument. This precludes passing a sacc object (as opposed to a filename string) and also gives no indication if the build_likelihood implementation actually looks for a sacc object or file in the build_parameters argument.

A possible solution would be to add an optional sacc_data keyword argument to load_likelihood that gets passed to build_likelihood. If the latter doesn't implement this argument, it will cause an error, which informs the caller that the likelihood factory doesn't support external sacc files.

sacc_data could be either a string or Sacc object and it would be up to the likelihood factory to deal with this.

tilmantroester avatar Feb 22 '24 15:02 tilmantroester