Closed matthew-w-lundy closed 1 month ago
This is mainly a gammapy issue. There is no overwrite flag for copy_obs
. My philosophy was not to trust that the user hasn't passed some important directory by accident and instead require that they manually delete it.
We could implement our own check to see if there are index files, include an overwrite flag and/or have them enter "yes" to delete or something.
I believe there is this functionality in gammapy: https://github.com/gammapy/gammapy/blob/18b65d5cce21876d53aa7faf54aaeccd68e8b76c/gammapy/data/data_store.py#L419C1-L434C41
prepare_dataset
does not allow the user to pass an overwrite flag to copy_obs which means that to re-run prepare datasets you need to delete your index files.https://github.com/VERITAS-Observatory/gammapy-tools/blob/6c24bc96abf49c74fae55d9ad4040a363bc0790e/gammapy_tools/make_background/prepare_data.py#L51C1-L62C1