/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 160 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 = 73115
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1031.6+6019_monthly_bin14
RA = 157.909, Dec = 60.3178
tmin = 273283201, tmax = 275875201
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='130336', job_status='RUN', time_executed='2021-10-21 19:04:56.276033', time_epoch_executed='1634868296.28' WHERE source_name='4FGL J1031.6+6019' and cadence='monthly' and bin_id='14'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/130336

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

Retrieving the FT1 file...

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

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

Retrieving 458 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/130336/ft1_4FGL_J1031.6+6019_monthly_bin14.fits


Retrieving the FT1 file...

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

Retrieving 458 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/130336/ft1_4FGL_J1031.6+6019_monthly_bin14.fits outfile=/scratch/kocevski/130336/ft1_filteredMKT_4FGL_J1031.6+6019_monthly_bin14.fits ra=157.909 dec=60.3178 rad=12.0 tmin=273283201.0 tmax=275875201.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 32.97
user 31.96
sys 0.78

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.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/130336/ft1_filteredMKT_4FGL_J1031.6+6019_monthly_bin14.fits evtable="EVENTS" outfile="/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.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.85
user 0.64
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits" evtable="EVENTS" scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits sctable="SC_DATA" outfile=/scratch/kocevski/130336/ltcube_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.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/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits
.....................!
real 117.37
user 116.62
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits evtable="EVENTS" scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits sctable="SC_DATA" expcube=/scratch/kocevski/130336/ltcube_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits outfile=/scratch/kocevski/130336/expmap_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.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/130336/ltcube_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits
.....................!
real 195.03
user 188.60
sys 5.50

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 246 point sources and 0 extended sources

Setting source of interest to:
4FGL J1031.6+6019 @ 157.909 60.3178

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits outfile=/scratch/kocevski/130336/cmap_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.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=157.909 yref=60.3178 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.78
user 0.61
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits outfile=/scratch/kocevski/130336/cmap_HighResolution_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.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=157.909 yref=60.3178 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.78
user 0.60
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits evtable="EVENTS" scfile=/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/130336/Model_4FGL_J1031.6+6019_monthly_bin14.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/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits.....................!
real 594.95
user 591.35
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits', '/scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits', expMap='/scratch/kocevski/130336/expmap_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits', expCube='/scratch/kocevski/130336/ltcube_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/130336/Model_4FGL_J1031.6+6019_monthly_bin14.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1031.6+6019'

4FGL J1031.6+6019
   Spectrum: PowerLaw
418    Prefactor:  9.245e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
419        Index:  2.613e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
420        Scale:  9.651e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/130336/ft1_filtered_4FGL_J1031.6+6019_monthly_bin14.fits
Spacecraft file(s): /scratch/kocevski/130336/ft2_4FGL_J1031.6+6019_monthly_bin14.fits
Exposure map: /scratch/kocevski/130336/expmap_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits
Exposure cube: /scratch/kocevski/130336/ltcube_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/130336/Model_4FGL_J1031.6+6019_monthly_bin14.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) = 73409.285874

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15687E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .17027       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.0718       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .24442       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.6646       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.3740       1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.3977       1.0000         .10000E-03   10000.    
     8 'norm      '    .62010       1.0000         .10000E-03   10000.    
     9 'Prefactor '    10.872       1.0000         .10000E-03   10000.    
    10 'norm      '    1.6519       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.9922       1.0000         .10000E-03   10000.    
    12 'norm      '    .55411       1.0000         .10000E-03   10000.    
    13 'norm      '    4.2485       1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.902       1.0000         .10000E-03   10000.    
    15 'norm      '    2.3997       1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.7197       1.0000         .10000E-03   10000.    
    17 'norm      '    1.1560       1.0000         .10000E-03   10000.    
    18 'norm      '    1.1660       1.0000         .10000E-03   10000.    
    19 'Prefactor '    11.813       1.0000         .10000E-03   10000.    
    20 'norm      '    1.0702       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.3009       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    4.0663       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .64567E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    39.811       1.0000         .10000E-03   10000.    
    27 'Prefactor '    2.4416       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .25326       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    9.5649       1.0000         .10000E-03   10000.    
    31 'Prefactor '    3.1739       1.0000         .10000E-03   10000.    
    32 'norm      '    4.8787       1.0000         .10000E-03   10000.    
    33 'norm      '    .32346       1.0000         .10000E-03   10000.    
    34 'Prefactor '    2.4965       1.0000         .10000E-03   10000.    
    35 'Prefactor '    6.4198       1.0000         .10000E-03   10000.    
    36 'Normalizat'    .92382       1.0000         .10000E-01   10.000    
    37 'Prefactor '    1.2078       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   73409.04     FROM MIGRAD    STATUS=CONVERGED   1078 CALLS     4952 TOTAL
                     EDM=   .94E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .41949         .0000    ** at limit **
   2  norm          .17033        .14965         .0000        .20684E-01
   3  Prefactor     4.0718        2.5118         .0000        .16558E-02
   4  Prefactor     .24386        .42135         .0000        .51286E-02
   5  Prefactor     3.6644        2.4118         .0000       -.22705E-02
   6  Prefactor     3.3742        2.1008         .0000        .94729E-01
   7  Prefactor     1.3980        1.4474         .0000        .70931E-02
   8  norm          .62012        1.0131         .0000        .87221E-02
   9  Prefactor     10.872        7.6777         .0000        .23348E-03
  10  norm          1.6519        .17968         .0000        .46748E-04
  11  Prefactor     5.9923        1.7201         .0000        .57522E-02
  12  norm          .55411        .18716         .0000        .12058E-01
  13  norm          4.2485        .88610         .0000       -.34163E-03
  14  Prefactor     10.902        6.4312         .0000        .29627E-03
  15  norm          2.3998        2.2201         .0000        .18589E-02
  16  Prefactor     3.7198        2.9852         .0000       -.10095E-02
  17  norm          1.1560        .46013         .0000        .24971E-02
  18  norm          1.1660        .35581         .0000       -.12213E-03
  19  Prefactor     11.812        18.140         .0000        .62449E-03
  20  norm          1.0702        .20164         .0000        .21244E-02
  21  Prefactor     .10000E-03    9.7366         .0000    ** at limit **
  22  norm          2.3003        .70275         .0000        .37952E-02
  23  Prefactor     .10001E-03    11.708         .0000    ** at limit **
  24  norm          4.0664        .74329         .0000       -.75797E-04
  25  Prefactor     .10000E-03    .28759         .0000    ** at limit **
  26  Prefactor     39.812        16.541         .0000       -.17746E-02
  27  Prefactor     2.4412        6.1097         .0000        .18670E-01
  28  Prefactor     .25668        .74843         .0000        .23724E-02
  29  Prefactor     .10000E-03    2.9256         .0000    ** at limit **
  30  Prefactor     9.5648        3.8473         .0000       -.52053E-03
  31  Prefactor     3.1739        1.0874         .0000       -.15970E-01
  32  norm          4.8789        2.4637         .0000        .21610E-02
  33  norm          .32159        .54244         .0000        .68879E-02
  34  Prefactor     2.4968        1.5037         .0000        .30295E-01
  35  Prefactor     6.4200        4.8291         .0000        .24781E-03
  36  Normalizat    .92380        .51754E-01     .0000        .99276E-04
  37  Prefactor     1.2078        .53955E-01     .0000       -.58907E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  norm       = 0.170335
  Prefactor  = 4.07183
  Prefactor  = 0.24386
  Prefactor  = 3.66445
  Prefactor  = 3.3742
  Prefactor  = 1.39796
  norm       = 0.620116
  Prefactor  = 10.8716
  norm       = 1.65189
  Prefactor  = 5.99231
  norm       = 0.554111
  norm       = 4.2485
  Prefactor  = 10.9019
  norm       = 2.39979
  Prefactor  = 3.71983
  norm       = 1.15597
  norm       = 1.16598
  Prefactor  = 11.8122
  norm       = 1.07018
  Prefactor  = 0.000100004
  norm       = 2.30033
  Prefactor  = 0.000100005
  norm       = 4.06638
  Prefactor  = 0.000100003
  Prefactor  = 39.8115
  Prefactor  = 2.44123
  Prefactor  = 0.256675
  Prefactor  = 0.000100001
  Prefactor  = 9.56477
  Prefactor  = 3.17386
  norm       = 4.87893
  norm       = 0.321593
  Prefactor  = 2.49685
  Prefactor  = 6.41997
  Normalizat = 0.923797
  Prefactor  = 1.20785
 **********
 **   18 **HESSE 
 **********

 FCN=   73409.04     FROM HESSE     STATUS=OK           905 CALLS     5857 TOTAL
                     EDM=   .24E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .43394        .64718E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .17033        .14493        .91743E-04   -1.5625    
   3  Prefactor     4.0718        2.5125        .19981E-03   -1.5304    
   4  Prefactor     .24386        .89365        .21631E-02   -1.5609    
   5  Prefactor     3.6644        2.4068        .21100E-03   -1.5325    
   6  Prefactor     3.3742        2.0758        .11015E-02   -1.5341    
   7  Prefactor     1.3980        1.4146        .30923E-03   -1.5471    
   8  norm          .62012        1.1213        .32585E-02   -1.5550    
   9  Prefactor     10.872        7.6428        .12151E-03   -1.5048    
  10  norm          1.6519        .17941        .36264E-04   -1.5451    
  11  Prefactor     5.9923        1.7140        .16403E-03   -1.5218    
  12  norm          .55411        .17832        .64316E-03   -1.5559    
  13  norm          4.2485        .88594        .11292E-03   -1.5296    
  14  Prefactor     10.902        6.4332        .12134E-03   -1.5047    
  15  norm          2.3998        2.2098        .26433E-03   -1.5398    
  16  Prefactor     3.7198        2.9761        .20937E-03   -1.5322    
  17  norm          1.1560        .45562        .10602E-03   -1.5493    
  18  norm          1.1660        .35933        .86563E-04   -1.5492    
  19  Prefactor     11.812        18.136        .11656E-03   -1.5020    
  20  norm          1.0702        .19859        .49046E-04   -1.5501    
  21  Prefactor     .10000E-03    9.7687        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.3003        .76762        .10051E-03   -1.5405    
  23  Prefactor     .10001E-03    11.748        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          4.0664        .73946        .93401E-04   -1.5305    
  25  Prefactor     .10000E-03    .82893        .40905E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     39.812        16.581        .63527E-04   -1.4445    
  27  Prefactor     2.4412        6.0600        .13092E-02   -1.5395    
  28  Prefactor     .25668        3.3167        .36537E-02   -1.5607    
  29  Prefactor     .10000E-03    2.9675        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     9.5648        3.8473        .12958E-03   -1.5089    
  31  Prefactor     3.1739        1.0879        .80411E-03   -1.5352    
  32  norm          4.8789        2.4629        .18211E-03   -1.5266    
  33  norm          .32159        1.0860        .23818E-02   -1.5595    
  34  Prefactor     2.4968        1.5050        .12122E-02   -1.5392    
  35  Prefactor     6.4200        4.8160        .15841E-03   -1.5201    
  36  Normalizat    .92380        .58900E-01    .25622E-03   -.95629    
  37  Prefactor     1.2078        .62032E-01    .25691E-03   -.86090    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.43787e-07
Minuit parameter uncertainties:
  1  3.55694e-05
  2  0.144925
  3  2.51256
  4  0.893703
  5  2.40686
  6  2.07585
  7  1.41462
  8  1.12134
  9  7.64349
  10  0.179405
  11  1.71405
  12  0.178325
  13  0.885938
  14  6.43365
  15  2.20989
  16  2.97625
  17  0.455622
  18  0.359331
  19  18.1439
  20  0.19859
  21  0.000403663
  22  0.767626
  23  0.000499624
  24  0.739459
  25  9.67082e-05
  26  16.583
  27  6.06149
  28  1.84511
  29  8.90303e-05
  30  3.84736
  31  1.08791
  32  2.46299
  33  1.08611
  34  1.50501
  35  4.81633
  36  0.0589039
  37  0.0620358
Done.

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

Extracting fit parameters...

4FGL J1031.6+6019
   Spectrum: PowerLaw
418    Prefactor:  3.720e+00  2.976e+00  1.000e-04  1.000e+04 ( 1.000e-13)
419        Index:  2.613e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
420        Scale:  9.651e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
784    Prefactor:  1.208e+00  6.204e-02  0.000e+00  1.000e+01 ( 1.000e+00)
785        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
786        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
783   Normalization:  9.238e-01  5.890e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.65
Ra Dec: 157.909 60.318
Photon Index (Fixed Index): 2.61 +/- 0.00
Photon Flux (Fixed Index): 8.63e-09 +/- 6.90e-09
Energy Flux (Fixed Index): 2.24e-06 +/- 1.79e-06

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) = 73407.220007
delta logL = 1.82104869319

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 73407.2175758
delta logL = 1.82347983

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9522       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6093       1.0000          .0000       10.000    
     3 'Normalizat'    .93112       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2036       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   73407.22     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      260 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9549        4.2252        .50726E-02   -.50812E-04
   2  Index         1.6097        .35072        .34912       -.45766E-03
   3  Normalizat    .93112        .46274E-01    .45298E-01   -.80848E-04
   4  Prefactor     1.2036        .52388E-01    .58187E-01   -.22993E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.95487
  Index      = 1.60973
  Normalizat = 0.931116
  Prefactor  = 1.20359
 **********
 **   18 **HESSE 
 **********

 FCN=   73407.22     FROM HESSE     STATUS=OK            33 CALLS      293 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9549        4.4647        .20290E-03   -1.5310    
   2  Index         1.6097        .52338        .20159E-01   -.74511    
   3  Normalizat    .93112        .52475E-01    .25532E-03   -.95375    
   4  Prefactor     1.2036        .59459E-01    .25730E-03   -.86221    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.29045e-10
Minuit parameter uncertainties:
  1  4.46506
  2  0.525166
  3  0.052478
  4  0.0594625
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/130336': 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): 0
logL (Free Index) = 73407.2175756
delta logL = 1.82348009551

Extracting fit parameters...

4FGL J1031.6+6019
   Spectrum: PowerLaw
418    Prefactor:  3.955e+00  4.465e+00  1.000e-04  1.000e+04 ( 1.000e-13)
419        Index:  1.610e+00  5.252e-01  0.000e+00  1.000e+01 (-1.000e+00)
420        Scale:  9.651e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
784    Prefactor:  1.204e+00  5.946e-02  0.000e+00  1.000e+01 ( 1.000e+00)
785        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
786        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
783   Normalization:  9.311e-01  5.248e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.28
Ra Dec: 157.909 60.318
Photon Index (Free Index): 1.61 +/- 0.53
Photon Flux (Free Index): 2.46e-09 +/- 3.46e-09
Energy Flux (Free Index): 5.38e-06 +/- 5.68e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/130336/cmap_HighResolution_273283201_275875201_4FGL_J1031.6+6019_monthly_bin14.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.63e-09', energy_flux2='5.38e-06', photon_flux_error='6.90e-09', dlogl='1.82e+00', energy_flux='2.24e-06', photon_flux2='2.46e-09', job_status='DONE', time_completed='2021-10-21 21:52:19.851770', photon_index_error2='0.53', photon_index2='1.61', ts='4.65', fit_tolerance='1e-08', GAL='1.21', photon_index_error='0.00', energy_flux_error2='5.68e-06', EG='0.92', time_epoch_completed='1634878339.85', return_code='0', job_id='130336', GAL2='1.20', EG2='0.93', return_code2='0', energy_flux_error='1.79e-06', photon_flux_error2='3.46e-09', ts2='8.28', photon_index='2.61' WHERE bin_id='14' AND source_name='4FGL J1031.6+6019' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Thu Oct 21 21:52:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0174>
Subject: Job 130336: <4FGL_J1031.6+6019_monthly_bin14> in cluster <slac> Done

Job <4FGL_J1031.6+6019_monthly_bin14> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Oct 21 19:00:26 2021
Job was executed on host(s) <bullet0174>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Oct 21 19:02:07 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Oct 21 19:02:07 2021
Terminated at Thu Oct 21 21:52:20 2021
Results reported at Thu Oct 21 21:52:20 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1031.6+6019_monthly_bin14 157.909 60.3178 273283201 275875201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1031.6+6019 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9847.00 sec.
    Max Memory :                                 629 MB
    Average Memory :                             422.45 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   10214 sec.
    Turnaround time :                            10314 sec.

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

