Advanced Analysis

They need to perform analyses with different configurations and they need to work with a new AGAnalysis object every time. AGAnalysis does not support a “stateless” mode, So they are implemented to create an new AGAnalysis object and perform analysis in a loop.

The code of the analysis is in the agilepy/api/advanced directory.


The analysis involves spectral fitting and light curve generation for a specific source in the dataset. Check the command line here

    parser = argparse.ArgumentParser(description='Process some integers.')
    parser.add_argument('--username'            , type=str,   required=True, help='')
    parser.add_argument('--sourcename'          , type=str,   required=True, help='')
    parser.add_argument('--glon'                , type=float, required=True, help='')
    parser.add_argument('--glat'                , type=float, required=True, help='')
    parser.add_argument('--flux'                , type=float, required=True, help='')
    parser.add_argument('--index'               , type=float, required=True, help='')
    parser.add_argument('--spectrum-type'       , type=str,   required=True, help='')    
    parser.add_argument('--outputdir'           , type=str,   required=True, help='')

    parser.add_argument('--filtercode'          , type=int,   required=True, help='')
    parser.add_argument('--ffilter'             , type=int,   required=True, help='')
    parser.add_argument('--approx-grb-time'     , type=float, required=True, help='This is t0 (in TT)')
    parser.add_argument('--timeshift'           , type=float, required=True, help='')
    parser.add_argument('--ow'                  , type=str,   required=True, help='')
    parser.add_argument('--channels-conf'       , type=str,   required=True, help='')
    parser.add_argument('--correction'          , type=int,   required=False, default=1, help='Verrechia\'s correction')
    parser.add_argument('--fluxcorrection'      , type=int,   required=False, default=0, help='')
    parser.add_argument('--edpcorrection'       , type=int,   required=False, default=0, help='')
    parser.add_argument('--timebin'             , type=int,   required=False, default=10, help='')
    parser.add_argument('--background-window'   , type=int,   required=False, default=14, help='')
    parser.add_argument('--fovradmax'           , type=int,   required=False, default=60, help='')
    parser.add_argument('--dq'                  , type=int,   required=False, default=1, help='')
    args = parser.parse_args()