Skip to content

Ability to reuse livetime cubes#83

Open
rsnemmen wants to merge 5 commits into
gammapy:masterfrom
rsnemmen:ltcube
Open

Ability to reuse livetime cubes#83
rsnemmen wants to merge 5 commits into
gammapy:masterfrom
rsnemmen:ltcube

Conversation

@rsnemmen

Copy link
Copy Markdown

I have been using enrico to carry out a batch analysis for hundreds of sources with the same analysis parameters (different ROIs but same time interval, energy selection, zenith angle cut etc). In this case, one should generate only one livetime cube and then reuse it in all ROIs. In my experience, this greatly sped up my analysis.

I modified the source code just a little bit in order to be able to reuse livetime cubes. Then one only needs to provide the ltcube filename in the field 'config[file][ltcube]’.

if you provide in the config file a ltcube filename, Enrico will now
use this ltcube file and potentially save hours of processing time.
Useful when doing batch processing of many sources, adopting the
same analysis parameters for all of them (except location in the sky,
for example)
…nrico notation

in other to make everything consistent: if a previous ltcube is specified
in the config file, these changes make sure that file if copied to
a fits file following standard enrico notation ('NAME..._ltCube.fits')
instead of copying the ltcube file provided in the config file to
the target dir, simply replaces the internal variable that refers to
the ltcube (CubeName in gtfunction)
@davidsanchez

Copy link
Copy Markdown
Member

Hi,

Sorry for the late reply and thanks for the proposal. I would prefere to have a script in the script folder that rename a ltcube in the script folder than changing the config file in that way

best
david

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants