/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)


Waiting 124 seconds before starting...
Proceeding.

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 7487
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1616.6+4630_daily_bin37
RA = 244.16, Dec = 46.5099
tmin = 248918401, tmax = 249177601
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository Job = True

LAT data Source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='210826', job_status='RUN', time_executed='2021-09-13 18:59:49.656121', time_epoch_executed='1631584789.66' WHERE source_name='4FGL J1616.6+4630' and cadence='daily' and bin_id='37'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/210826

Creating custom pfile directory:
/scratch/kocevski/210826/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=248918401.0 && nMetStart<249177601.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=248918401.0 && nMetStart<249177601.0' /Data/Flight/Level1/LPA

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/210826/ft1_4FGL_J1616.6+4630_daily_bin37.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=248918401.0 && nMetStart<249177601.0' /Data/Flight/Level1/LPA

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/210826/ft1_4FGL_J1616.6+4630_daily_bin37.fits outfile=/scratch/kocevski/210826/ft1_filteredMKT_4FGL_J1616.6+4630_daily_bin37.fits ra=244.16 dec=46.5099 rad=12.0 tmin=248918401.0 tmax=249177601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 1.64
user 1.45
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/210826/ft1_filteredMKT_4FGL_J1616.6+4630_daily_bin37.fits evtable="EVENTS" outfile="/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.45
user 0.28
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits" evtable="EVENTS" scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits sctable="SC_DATA" outfile=/scratch/kocevski/210826/ltcube_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits
.....................!
real 12.73
user 12.40
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits evtable="EVENTS" scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits sctable="SC_DATA" expcube=/scratch/kocevski/210826/ltcube_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits outfile=/scratch/kocevski/210826/expmap_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /scratch/kocevski/210826/ltcube_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits
.....................!
real 156.04
user 151.14
sys 4.26

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 212 point sources and 0 extended sources

Setting source of interest to:
4FGL J1616.6+4630 @ 244.16 46.5099

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits outfile=/scratch/kocevski/210826/cmap_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=244.16 yref=46.5099 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.48
user 0.32
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits outfile=/scratch/kocevski/210826/cmap_HighResolution_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=244.16 yref=46.5099 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.49
user 0.34
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits evtable="EVENTS" scfile=/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/210826/Model_4FGL_J1616.6+4630_daily_bin37.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits.....................!
real 37.24
user 36.11
sys 1.06

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits', '/scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits', expMap='/scratch/kocevski/210826/expmap_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits', expCube='/scratch/kocevski/210826/ltcube_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/210826/Model_4FGL_J1616.6+4630_daily_bin37.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1616.6+4630'

4FGL J1616.6+4630
   Spectrum: PowerLaw
300    Prefactor:  3.213e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.600e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  8.481e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/210826/ft1_filtered_4FGL_J1616.6+4630_daily_bin37.fits
Spacecraft file(s): /scratch/kocevski/210826/ft2_4FGL_J1616.6+4630_daily_bin37.fits
Exposure map: /scratch/kocevski/210826/expmap_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits
Exposure cube: /scratch/kocevski/210826/ltcube_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/210826/Model_4FGL_J1616.6+4630_daily_bin37.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5284.89008089

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5284.7535984

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .63662E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    24.683       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.8547       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10490E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .36294       1.0000         .10000E-03   10000.    
    13 'Prefactor '    7.1771       1.0000         .10000E-03   10000.    
    14 'norm      '    32.611       1.0000         .10000E-03   10000.    
    15 'norm      '    .19652       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .27173       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.8338       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .12256E-02   1.0000         .10000E-03   10000.    
    20 'norm      '    .10926E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    3.5606       1.0000         .10000E-03   10000.    
    22 'Prefactor '    2.0547       1.0000         .10000E-03   10000.    
    23 'Prefactor '    3.4139       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    2.2134       1.0000         .10000E-03   10000.    
    26 'norm      '    3.8649       1.0000         .10000E-03   10000.    
    27 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    1.5489       1.0000         .10000E-03   10000.    
    29 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.2479       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .58198       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6800E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5284.754     FROM MIGRAD    STATUS=CONVERGED    880 CALLS     3737 TOTAL
                     EDM=   .48E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1.1039       -.44873E-07** at limit **
   2  Prefactor     .10000E-03    3.7854       -.12845E-06** at limit **
   3  Prefactor     .10000E-03    7.3888       -.11566E-06** at limit **
   4  Prefactor     .10000E-03    4.2986       -.11263E-06** at limit **
   5  norm          .10002E-03    14.792       -.87457E-06** at limit **
   6  Prefactor     .10000E-03    16.709       -.32847E-06** at limit **
   7  Prefactor     24.684        11.444        .27743E-07    .69165E-04
   8  norm          .10000E-03    3.1414        .90896E-08** at limit **
   9  Prefactor     .10000E-03    23.745       -.32499E-06** at limit **
  10  Prefactor     7.8530        6.7961       -.31817E-06    .39363E-04
  11  Prefactor     .10000E-03    151.54        .22931E-05** at limit **
  12  Prefactor     .34405        21.346       -.50638E-05    .10975E-04
  13  Prefactor     7.1768        4.0951        .53433E-08   -.56656E-04
  14  norm          32.623        22.522        .32291E-06   -.27523E-04
  15  norm          .19629        .16356        .11918E-06    .41158E-02
  16  norm          .10000E-03    6.9154       -.18848E-07** at limit **
  17  Prefactor     .37776        57.600       -.97672E-05    .19963E-03
  18  Prefactor     2.8340        3.2618        .70510E-06    .13432E-02
  19  Prefactor     .10001E-03    6.8495       -.65660E-06** at limit **
  20  norm          .10000E-03    298.71        .10774E-04** at limit **
  21  Prefactor     3.5609        2.0945        .25787E-06    .90754E-05
  22  Prefactor     2.0550        1.8171        .14468E-06   -.12043E-03
  23  Prefactor     3.4143        3.7737        .60301E-07    .20200E-03
  24  Prefactor     .10000E-03    1.4010       -.16626E-06** at limit **
  25  Prefactor     2.2147        13.141       -.40072E-06    .60173E-04
  26  norm          3.8648        2.1252       -.26315E-07   -.42185E-05
  27  norm          .10000E-03    .57774       -.22118E-06** at limit **
  28  Prefactor     1.5491        5.8080       -.40438E-07    .17245E-03
  29  norm          .10000E-03    .39308       -.14577E-06** at limit **
  30  Normalizat    1.2481        .19721        .84454E-06    .36123E-03
  31  Prefactor     .58184        .17824        .14011E-05    .17822E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100018
  Prefactor  = 0.0001
  Prefactor  = 24.6838
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.85303
  Prefactor  = 0.000100002
  Prefactor  = 0.344048
  Prefactor  = 7.17677
  norm       = 32.623
  norm       = 0.196289
  norm       = 0.0001
  Prefactor  = 0.377757
  Prefactor  = 2.83402
  Prefactor  = 0.000100007
  norm       = 0.000100001
  Prefactor  = 3.56093
  Prefactor  = 2.05498
  Prefactor  = 3.41429
  Prefactor  = 0.0001
  Prefactor  = 2.21473
  norm       = 3.86483
  norm       = 0.0001
  Prefactor  = 1.54907
  norm       = 0.0001
  Normalizat = 1.24812
  Prefactor  = 0.581842
 **********
 **   18 **HESSE 
 **********

 FCN=   5284.754     FROM HESSE     STATUS=OK           640 CALLS     4377 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    1.1052        .74597E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    3.8004        .13814E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.3978        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.3090        .14721E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10002E-03    19.719        .85515E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    16.757        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     24.684        11.453        .80628E-04   -1.4714    
   8  norm          .10000E-03    3.1448        .12578E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    23.758        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     7.8530        6.7567        .14307E-03   -1.5147    
  11  Prefactor     .10000E-03    153.41        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .34405        32.693        .26935E-02   -1.5591    
  13  Prefactor     7.1768        4.0935        .10431E-03   -1.5172    
  14  norm          32.623        22.575        .70168E-04   -1.4565    
  15  norm          .19629        .16437        .22348E-04   -1.5619    
  16  norm          .10000E-03    6.9196        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .37776        280.13        .57289E-02   -1.5585    
  18  Prefactor     2.8340        5.1891        .10254E-02   -1.5371    
  19  Prefactor     .10001E-03    56.925        .36363E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    298.33        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     3.5609        2.1077        .55698E-04   -1.5331    
  22  Prefactor     2.0550        1.8318        .66018E-04   -1.5421    
  23  Prefactor     3.4143        3.7350        .13528E-03   -1.5338    
  24  Prefactor     .10000E-03    1.4256        .84124E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     2.2147        13.139        .27645E-03   -1.5410    
  26  norm          3.8648        2.1210        .75058E-04   -1.5315    
  27  norm          .10000E-03    .99603        .10431E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     1.5491        5.7022        .31465E-03   -1.5459    
  29  norm          .10000E-03    .80472        .87512E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    1.2481        .23653        .22496E-03   -.85129    
  31  Prefactor     .58184        .20828        .29409E-03   -1.0836    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.75505e-09
Minuit parameter uncertainties:
  1  4.81579e-07
  2  2.9058e-06
  3  5.19494e-06
  4  1.843e-06
  5  0.00117924
  6  2.78916e-05
  7  11.4543
  8  3.23573e-06
  9  7.59829e-05
  10  6.75735
  11  0.00102111
  12  6.71039
  13  4.09367
  14  22.5809
  15  0.164367
  16  5.87942e-06
  17  20.6687
  18  5.18993
  19  0.00125765
  20  0.000950725
  21  2.10775
  22  1.83183
  23  3.73521
  24  1.08042e-05
  25  10.7923
  26  2.12103
  27  1.184e-05
  28  5.70416
  29  1.04397e-06
  30  0.236736
  31  0.20856
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5284.75356903

Extracting fit parameters...

4FGL J1616.6+4630
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.021e-03  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.600e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  8.481e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
677    Prefactor:  5.818e-01  2.086e-01  0.000e+00  1.000e+01 ( 1.000e+00)
678        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
679        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
676   Normalization:  1.248e+00  2.367e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 244.160 46.510
Photon Flux Upper Limit: 1.04e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.13e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/210826/likelihoodResults_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5284.75360001
delta logL = -3.09783699777e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5284.75356654
delta logL = 2.48638298217e-06

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13800E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.9095       1.0000          .0000       10.000    
     3 'Normalizat'    1.2481       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .58185       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6800E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5284.748     FROM MIGRAD    STATUS=CONVERGED    124 CALLS      311 TOTAL
                     EDM=   .51E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .61295        10.003        .73819E-01    .36537E-03
   2  Index         3.6290        .91884        .50000        .26068E-05
   3  Normalizat    1.2419        .83493E-02    .50985E-01   -.35325E-05
   4  Prefactor     .58509        .77632E-02    .66282E-01    .15955E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.612951
  Index      = 3.62902
  Normalizat = 1.24191
  Prefactor  = 0.585094
 **********
 **   18 **HESSE 
 **********

 FCN=   5284.748     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      346 TOTAL
                     EDM=   .18E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .61295        6154.1        .25154E-02   -1.5551    
   2  Index         3.6290        5.1321        .76443E-02   -.27775    
   3  Normalizat    1.2419        .14443        .22541E-03   -.85317    
   4  Prefactor     .58509        .11613        .29332E-03   -1.0822    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.82999e-06
Minuit parameter uncertainties:
  1  79.7011
  2  60.6902
  3  0.144481
  4  0.11618
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/210826': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5284.74818138
delta logL = 0.00538764865178

Extracting fit parameters...

4FGL J1616.6+4630
   Spectrum: PowerLaw
300    Prefactor:  6.130e-01  7.970e+01  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  3.629e+00  6.069e+01  0.000e+00  1.000e+01 (-1.000e+00)
302        Scale:  8.481e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
677    Prefactor:  5.851e-01  1.162e-01  0.000e+00  1.000e+01 ( 1.000e+00)
678        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
679        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
676   Normalization:  1.242e+00  1.445e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 244.160 46.510

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/210826/cmap_HighResolution_248918401_249177601_4FGL_J1616.6+4630_daily_bin37.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/210826

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.13e-03', job_status='DONE', photon_flux_upper_limit='1.04e-07', time_completed='2021-09-13 19:11:53.903346', job_id='210826', GAL2='0.59', fit_tolerance='1e-08', EG2='1.24', EG='1.25', time_epoch_completed='1631585513.9', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.58', dlogl='5.39e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.60' WHERE bin_id='37' AND source_name='4FGL J1616.6+4630' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 13 19:11:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 210826: <4FGL_J1616.6+4630_daily_bin37> in cluster <slac> Done

Job <4FGL_J1616.6+4630_daily_bin37> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Sep 13 18:55:37 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 13 18:57:38 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 13 18:57:38 2021
Terminated at Mon Sep 13 19:11:54 2021
Results reported at Mon Sep 13 19:11:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1616.6+4630_daily_bin37 244.16 46.5099 248918401 249177601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1616.6+4630 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   721.06 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             278.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   856 sec.
    Turnaround time :                            977 sec.

The output (if any) is above this job summary.

