from agilepy.api.AGAnalysis import AGAnalysis
%matplotlib widget
confFilePath = "$HOME/agilepy_conf.yaml"
AGAnalysis.getConfiguration(
confFilePath = confFilePath,
evtfile="$AGILE/agilepy-test-data/test_dataset_agn/EVT/EVT.index",
logfile="$AGILE/agilepy-test-data/test_dataset_agn/LOG/LOG.index",
userName = "user",
sourceName = "aitoff-tutorial",
tmin = 55513.0,
tmax = 55520.0,
timetype = "MJD",
glon = 0,
glat = 0,
outputDir = "$HOME/agilepy_analysis",
verboselvl = 0
)
ag = AGAnalysis("$HOME/agilepy_conf.yaml")
ag.setOptions(proj="AIT", fovradmax=60, albedorad=80)
ag.setOptions(binsize=0.5, expstep=2, mapsize=360)
ag.printOptions()
{ 'ap': {'radius': 3, 'timeslot': 3600},
'input': { 'evtfile': '/Users/bulgarelli/opt/anaconda3/envs/agilepyenv/agiletools/agilepy-test-data/test_dataset_agn/EVT/EVT.index',
'logfile': '/Users/bulgarelli/opt/anaconda3/envs/agilepyenv/agiletools/agilepy-test-data/test_dataset_agn/LOG/LOG.index'},
'maps': { 'binsize': 0.5,
'energybins': [[100, 10000]],
'expstep': 2,
'fovbinnumber': 1,
'mapsize': 360,
'offaxisangle': 30,
'proj': 'ARC',
'projtype': 'WCS',
'spectralindex': 2.1,
'timestep': 160,
'useEDPmatrixforEXP': False},
'mle': { 'contourpoints': 40,
'edpcorrection': 0.75,
'expratio_maxthr': 15,
'expratio_minthr': 0,
'expratio_size': 10,
'expratioevaluation': True,
'fluxcorrection': 0,
'integratortype': 1,
'loccl': 5.99147,
'mindefaulttolerance': 0.01,
'minimizeralg': 'Migrad',
'minimizerdefstrategy': 2,
'minimizertype': 'Minuit',
'ranal': 10,
'ulcl': 2},
'model': { 'emax_sources': 10000,
'emin_sources': 100,
'galcoeff': [-1],
'galmode': 1,
'galmode2': 0,
'galmode2fit': 0,
'isocoeff': [-1],
'isomode': 1,
'isomode2': 0,
'isomode2fit': 0,
'modelfile': None},
'output': { 'filenameprefix': 'analysis_product',
'logfilenameprefix': 'analysis_log',
'outdir': PosixPath('/Users/bulgarelli/agilepy_analysis/aitoff-tutorial_user_20210116-221228'),
'sourcename': 'user',
'username': 'aitoff-tutorial',
'verboselvl': 0},
'plotting': {'twocolumns': False},
'selection': { 'albedorad': 80,
'bpointing': None,
'dq': 0,
'emax': 10000,
'emin': 100,
'filtercode': 5,
'fovradmax': 60,
'fovradmin': 0,
'glat': 0.0,
'glon': 1e-06,
'lonpole': 180,
'lpointing': None,
'maplistgen': 'None',
'phasecode': 6,
'proj': 'AIT',
'timelist': 'None',
'timetype': 'TT',
'tmax': 217296000.0,
'tmin': 216691200.0}}
maplistfile = ag.generateMaps()
ag.displayCtsSkyMaps(smooth=2, normType="sqrt")
2021-01-16 22:16:04,551 [WARNING ] [AGAnalysis] singleMode has been turned off because only one map is going to be displayed.
[None]
ag.displayExpSkyMaps()
2021-01-16 22:17:41,176 [WARNING ] [AGAnalysis] singleMode has been turned off because only one map is going to be displayed.
[None]