AITOFF maps¶

Prerequisities: in order to run this notebook you need the AGILE data.¶

In [1]:
from agilepy.api.AGAnalysis import AGAnalysis
In [2]:
%matplotlib widget

Configuration file¶

In [3]:
confFilePath = "$HOME/agilepy_conf.yaml"
In [4]:
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,
    userestapi=False
)

Obtaining the AGAnalysis object¶

In [5]:
ag = AGAnalysis("$HOME/agilepy_conf.yaml")

Aitoff configurations and display¶

In [6]:
ag.setOptions(proj="AIT", fovradmax=60, albedorad=80, dq=0)
In [7]:
ag.setOptions(binsize=0.5, expstep=2, mapsize=360)
In [8]:
ag.printOptions()
{ 'ap': {'radius': 3, 'timeslot': 3600},
  'input': { 'datapath': 'None',
             'evtfile': '//agiletools/agilepy-test-data/test_dataset_agn/EVT/EVT.index',
             'logfile': '//agiletools/agilepy-test-data/test_dataset_agn/LOG/LOG.index',
             'userestapi': False},
  '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': 1,
           '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('/root/agilepy_analysis/user_aitoff-tutorial_20221022-185408'),
              'sourcename': 'aitoff-tutorial',
              'username': 'user',
              'verboselvl': 0},
  'plotting': {'twocolumns': False},
  'selection': { 'albedorad': 80,
                 'bpointing': None,
                 'dq': 0,
                 'emax': 10000,
                 'emin': 100,
                 'filtercode': 5,
                 'fovradmax': 60,
                 'fovradmin': 0,
                 'glat': 0,
                 'glon': 1e-06,
                 'lonpole': 180,
                 'lpointing': None,
                 'maplistgen': 'None',
                 'phasecode': 6,
                 'proj': 'AIT',
                 'timelist': 'None',
                 'timetype': 'TT',
                 'tmax': 217296000.0,
                 'tmin': 216691200.0}}
In [9]:
maplistfile = ag.generateMaps()
Generating maps..please wait.
Fov bins loop:   0%|          | 0/1 [00:00<?, ?it/s]
Energy bins loop: 0it [00:00, ?it/s]
In [10]:
ag.displayCtsSkyMaps(smooth=2, normType="sqrt")
Generating plot..please wait.
2022-10-22 18:57:05,743 [WARNING ] [AGAnalysis] singleMode has been turned off because only one map is going to be displayed.
WARNING: FITSFixedWarning: 'datfix' made the change 'Set DATEREF to '2004-01-01T00:01:06.184' from MJDREF.
Set MJD-OBS to 55513.000764 from DATE-OBS.
Set MJD-END to 55520.000764 from DATE-END'. [astropy.wcs.wcs]
Figure
Out[10]:
[None]
In [11]:
ag.displayExpSkyMaps()
Generating plot..please wait.
2022-10-22 18:57:06,722 [WARNING ] [AGAnalysis] singleMode has been turned off because only one map is going to be displayed.
WARNING: FITSFixedWarning: 'datfix' made the change 'Set DATEREF to '2004-01-01T00:01:06.184' from MJDREF.
Set MJD-OBS to 55513.000764 from DATE-OBS.
Set MJD-END to 55520.000764 from DATE-END'. [astropy.wcs.wcs]
Figure
Out[11]:
[None]
In [ ]: