Closed jgducoin closed 4 years ago
So I think it still makes sense to set the numbers to 1 but also print some kind of big warning when this occurs? Folks will still run the code, and other codes will fail if nothing comes out of the catalogs call. Maybe better is to have ToO_Manager interpret this case?
Hi @mcoughlin , could we simply add a new keyword CompatibleGal
(True/False) in the catalog.py's output dictionnaries map_struct or catalog_struct?
I think this could work. Are you proposing to leave the non-zero catalog numbers still to keep backwards compatibility?
Yes, if returning an empy dictionnary may crash the code some other people are using, we could simply add a flag in the output dict, and use its value in ToO_manager. If this fine for you, @jgducoin can implement it.
Yes I will put back the "security" (here: https://github.com/mcoughlin/gwemopt/blob/master/gwemopt/catalog.py#L251) and add the keyword.
@mcoughlin done in the last commit. Should work as expected now.
For the event S200106av, looking at the observation plan produced (cf attached image), it looks crazy. The problem comes from the fact that the skymap and distance error are so small that there are no compatible galaxies. Looking at the gwemopt code it seems that there is a "security" (here: https://github.com/mcoughlin/gwemopt/blob/master/gwemopt/catalog.py#L251) which put Sloc to 1 for all galaxies in such case. This led to point everywhere in the sky. This is probably a marginal effect because such skymap comes only from a non-astrophysical event, but it looks weird for people not aware of that to receive such obsplan.
Changes proposed in this pull request:
Other change:
params["AGN_flag"] = True.