/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: Dan/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 = 17363
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1031.1+7442_weekly_bin703
RA = 157.792, Dec = 74.7019
tmin = 664156801, tmax = 664761601
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='620052', job_status='RUN', time_executed='2022-01-25 06:10:42.206032', time_epoch_executed='1643119842.21' WHERE source_name='4FGL J1031.1+7442' and cadence='weekly' and bin_id='703'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/620052

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/620052/ft1_4FGL_J1031.1+7442_weekly_bin703.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/620052/ft1_4FGL_J1031.1+7442_weekly_bin703.fits outfile=/scratch/kocevski/620052/ft1_filteredMKT_4FGL_J1031.1+7442_weekly_bin703.fits ra=157.792 dec=74.7019 rad=12.0 tmin=664156801.0 tmax=664761601.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 8.12
user 7.79
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.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/620052/ft1_filteredMKT_4FGL_J1031.1+7442_weekly_bin703.fits evtable="EVENTS" outfile="/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.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.57
user 0.37
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits" evtable="EVENTS" scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits sctable="SC_DATA" outfile=/scratch/kocevski/620052/ltcube_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.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/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits
.....................!
real 25.86
user 25.46
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits sctable="SC_DATA" expcube=/scratch/kocevski/620052/ltcube_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits outfile=/scratch/kocevski/620052/expmap_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.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/620052/ltcube_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits
.....................!
real 190.42
user 185.01
sys 5.05

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

Setting source of interest to:
4FGL J1031.1+7442 @ 157.792 74.7019

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits outfile=/scratch/kocevski/620052/cmap_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.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.792 yref=74.7019 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.59
user 0.42
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits outfile=/scratch/kocevski/620052/cmap_HighResolution_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.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.792 yref=74.7019 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.58
user 0.42
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/620052/Model_4FGL_J1031.1+7442_weekly_bin703.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/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits.....................!
real 226.48
user 224.86
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits', '/scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits', expMap='/scratch/kocevski/620052/expmap_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits', expCube='/scratch/kocevski/620052/ltcube_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/620052/Model_4FGL_J1031.1+7442_weekly_bin703.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1031.1+7442'

4FGL J1031.1+7442
   Spectrum: PowerLaw
344    Prefactor:  7.368e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
345        Index:  2.162e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
346        Scale:  2.674e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/620052/ft1_filtered_4FGL_J1031.1+7442_weekly_bin703.fits
Spacecraft file(s): /scratch/kocevski/620052/ft2_4FGL_J1031.1+7442_weekly_bin703.fits
Exposure map: /scratch/kocevski/620052/expmap_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits
Exposure cube: /scratch/kocevski/620052/ltcube_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/620052/Model_4FGL_J1031.1+7442_weekly_bin703.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) = 21474.2705066

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.7274       1.0000         .10000E-03   10000.    
     2 'norm      '    15.233       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.9597       1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.4359       1.0000         .10000E-03   10000.    
     5 'norm      '    3.9056       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.4149       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .44199       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.1483       1.0000         .10000E-03   10000.    
    10 'norm      '    3.1043       1.0000         .10000E-03   10000.    
    11 'norm      '    9.3428       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.8528       1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.2210       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .27359E-02   1.0000         .10000E-03   10000.    
    15 'Prefactor '    12.198       1.0000         .10000E-03   10000.    
    16 'norm      '    .30905       1.0000         .10000E-03   10000.    
    17 'Prefactor '    74.362       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    4.2855       1.0000         .10000E-03   10000.    
    20 'norm      '    .18499E-02   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    4.7176       1.0000         .10000E-03   10000.    
    23 'Prefactor '    2.8305       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    5.5619       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    27 'norm      '    .10164E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .68005       1.0000         .10000E-03   10000.    
    29 'Prefactor '    23.714       1.0000         .10000E-03   10000.    
    30 'Prefactor '    .19403E-01   1.0000         .10000E-03   10000.    
    31 'Normalizat'    1.0464       1.0000         .10000E-01   10.000    
    32 'Prefactor '    1.0236       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   21474.26     FROM MIGRAD    STATUS=CONVERGED    889 CALLS     4579 TOTAL
                     EDM=   .59E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7282        60.192        .25945E-05    .29679E-05
   2  norm          15.234        11.158        .17653E-06   -.48545E-04
   3  Prefactor     4.9609        21.553        .12908E-05   -.27350E-04
   4  Prefactor     2.4359        2.0591        .48824E-07   -.89847E-04
   5  norm          3.9057        1.7098        .94542E-07   -.28708E-03
   6  Prefactor     .10000E-03    30.492        .97220E-06** at limit **
   7  Prefactor     6.4148        15.413        .44627E-06   -.34199E-04
   8  Prefactor     .44564        2.2386       -.10492E-06   -.15603E-03
   9  Prefactor     6.1487        5.7864        .11383E-06   -.19915E-04
  10  norm          3.1043        .57357        .30009E-07   -.61296E-03
  11  norm          9.3424        7.1485       -.25487E-08   -.31910E-05
  12  Prefactor     4.8397        6.0373       -.91644E-07   -.72886E-03
  13  Prefactor     2.2210        3.2089        .18324E-07   -.14026E-03
  14  Prefactor     .10000E-03    8.8538        .99938E-06** at limit **
  15  Prefactor     12.189        23.484       -.66196E-07   -.14519E-03
  16  norm          .30786        .93841       -.21407E-06   -.23960E-03
  17  Prefactor     74.304        92.080        .45422E-05   -.76510E-04
  18  Prefactor     .10000E-03    .87030        .19087E-06** at limit **
  19  norm          4.2857        .61923       -.14436E-06   -.40614E-02
  20  norm          .10000E-03    .42656       -.63059E-06** at limit **
  21  Prefactor     .10000E-03    2.1459        .47393E-08** at limit **
  22  Prefactor     4.7280        3.3991        .20764E-05   -.70037E-03
  23  Prefactor     2.8305        9.6917        .57787E-06   -.21094E-04
  24  Prefactor     .10000E-03    .55700        .55983E-07** at limit **
  25  Prefactor     5.5623        7.0424        .23274E-05   -.42977E-03
  26  Prefactor     .10000E-03    30.065       -.12334E-06** at limit **
  27  norm          .10000E-03    .75424        .30931E-06** at limit **
  28  norm          .67996        1.3705       -.22160E-07   -.22644E-03
  29  Prefactor     23.711        17.367       -.25408E-08   -.43364E-04
  30  Prefactor     .10004E-03    2.7269       -.13497E-06** at limit **
  31  Normalizat    1.0464        .10587       -.15502E-05   -.97773E-03
  32  Prefactor     1.0236        .83985E-01   -.36657E-06   -.14164E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.72822
  norm       = 15.2337
  Prefactor  = 4.96086
  Prefactor  = 2.43589
  norm       = 3.90568
  Prefactor  = 0.0001
  Prefactor  = 6.41484
  Prefactor  = 0.445642
  Prefactor  = 6.1487
  norm       = 3.1043
  norm       = 9.34241
  Prefactor  = 4.83966
  Prefactor  = 2.22101
  Prefactor  = 0.0001
  Prefactor  = 12.1889
  norm       = 0.307858
  Prefactor  = 74.3043
  Prefactor  = 0.0001
  norm       = 4.28568
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 4.72805
  Prefactor  = 2.83055
  Prefactor  = 0.0001
  Prefactor  = 5.56234
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.67996
  Prefactor  = 23.711
  Prefactor  = 0.000100036
  Normalizat = 1.04643
  Prefactor  = 1.02357
 **********
 **   18 **HESSE 
 **********

 FCN=   21474.26     FROM HESSE     STATUS=OK           691 CALLS     5270 TOTAL
                     EDM=   .27E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7282        60.568        .31948E-03   -1.5445    
   2  norm          15.234        11.144        .10262E-03   -1.4927    
   3  Prefactor     4.9609        21.377        .18059E-03   -1.5262    
   4  Prefactor     2.4359        2.0572        .18533E-03   -1.5396    
   5  norm          3.9057        1.6930        .10405E-03   -1.5313    
   6  Prefactor     .10000E-03    30.624        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.4148        15.286        .15847E-03   -1.5201    
   8  Prefactor     .44564        10.705        .42025E-02   -1.5574    
   9  Prefactor     6.1487        5.7809        .16191E-03   -1.5212    
  10  norm          3.1043        .57302        .45618E-04   -1.5356    
  11  norm          9.3424        7.1495        .13111E-03   -1.5097    
  12  Prefactor     4.8397        5.1689        .18261E-03   -1.5268    
  13  Prefactor     2.2210        3.1842        .27593E-03   -1.5410    
  14  Prefactor     .10000E-03    57.208        .69713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     12.189        23.325        .11469E-03   -1.5010    
  16  norm          .30786        2.7263        .22760E-02   -1.5597    
  17  Prefactor     74.304        91.333        .23280E-03   -1.3982    
  18  Prefactor     .10000E-03    .87761        .13333E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          4.2857        .60945        .38286E-04   -1.5294    
  20  norm          .10000E-03    11.837        .15883E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    2.1589        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     4.7280        3.3900        .92631E-03   -1.5273    
  23  Prefactor     2.8305        9.6887        .24172E-03   -1.5371    
  24  Prefactor     .10000E-03    .56084        .10680E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     5.5623        6.4743        .85176E-03   -1.5236    
  26  Prefactor     .10000E-03    30.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  norm          .10000E-03    1.8863        .24700E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .67996        1.3412        .20846E-02   -1.5543    
  29  Prefactor     23.711        17.363        .82256E-04   -1.4734    
  30  Prefactor     .10004E-03    5.3040        .79968E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Normalizat    1.0464        .11959        .27436E-03   -.91491    
  32  Prefactor     1.0236        .97038E-01    .23266E-03   -.91948    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.65457e-07
Minuit parameter uncertainties:
  1  20.4841
  2  11.1457
  3  20.6082
  4  2.05727
  5  1.69299
  6  3.26357e-05
  7  15.2955
  8  4.36882
  9  5.78141
  10  0.573018
  11  7.1502
  12  5.16934
  13  3.18447
  14  0.000130563
  15  23.3423
  16  1.8321
  17  91.5062
  18  1.19069e-05
  19  0.609447
  20  0.000219813
  21  1.71471e-06
  22  3.39013
  23  9.69407
  24  2.22912e-06
  25  6.47516
  26  0.000177781
  27  9.63149e-06
  28  1.34129
  29  17.3669
  30  0.000875027
  31  0.119619
  32  0.097055
Done.

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

Extracting fit parameters...

4FGL J1031.1+7442
   Spectrum: PowerLaw
344    Prefactor:  1.000e-04  1.306e-04  1.000e-04  1.000e+04 ( 1.000e-14)
345        Index:  2.162e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
346        Scale:  2.674e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
702    Prefactor:  1.024e+00  9.706e-02  0.000e+00  1.000e+01 ( 1.000e+00)
703        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
704        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
701   Normalization:  1.046e+00  1.196e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 157.792 74.702
Photon Flux Upper Limit: 3.28e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.49e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/620052/likelihoodResults_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.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): 102
logL (Free Index) = 21474.2560497
delta logL = -8.29687669466e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 21474.2560497
delta logL = -8.29677082947e-05

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   21474.26     FROM MIGRAD    STATUS=CONVERGED     64 CALLS      233 TOTAL
                     EDM=   .30E-13    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .18182E-01    .12600    ** at limit **
   2  Index         2.1616        6.0373        .50000        .15862E-06
   3  Normalizat    1.0464        .14191E-03    .62032E-01    .12338E-04
   4  Prefactor     1.0236        .11974E-03    .41802E-01   -.14441E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.1616
  Normalizat = 1.04643
  Prefactor  = 1.02357
 **********
 **   18 **HESSE 
 **********

 FCN=   21474.26     FROM HESSE     STATUS=NOT POSDEF    37 CALLS      270 TOTAL
                     EDM=   .92E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.0562        .70976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1616        6.0173        .50000       -.60368    
   3  Normalizat    1.0464        .86284E-03    .27436E-03   -.91491    
   4  Prefactor     1.0236        .72867E-03    .23266E-03   -.91948    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 9.2261e-13
Minuit parameter uncertainties:
  1  1.77549e-05
  2  28.914
  3  0.000862839
  4  0.000728674
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/620052': 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) = 21474.2559668
delta logL = 2.69210431725e-10

Extracting fit parameters...

4FGL J1031.1+7442
   Spectrum: PowerLaw
344    Prefactor:  1.000e-04  1.775e-05  1.000e-04  1.000e+04 ( 1.000e-14)
345        Index:  2.162e+00  2.891e+01  0.000e+00  1.000e+01 (-1.000e+00)
346        Scale:  2.674e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
702    Prefactor:  1.024e+00  7.287e-04  0.000e+00  1.000e+01 ( 1.000e+00)
703        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
704        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
701   Normalization:  1.046e+00  8.628e-04  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 157.792 74.702

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/620052/cmap_HighResolution_664156801_664761601_4FGL_J1031.1+7442_weekly_bin703.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.49e-03', job_status='DONE', photon_flux_upper_limit='3.28e-08', time_completed='2022-01-25 07:03:18.870234', job_id='620052', GAL2='1.02', fit_tolerance='1e-08', EG2='1.05', EG='1.05', time_epoch_completed='1643122998.87', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='2.69e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.16' WHERE bin_id='703' AND source_name='4FGL J1031.1+7442' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 25 07:03:18 PST 2022

slac> at Tue Jan 25 00:55:29 2022
Job was executed on host(s) <bullet0272>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:55:30 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:55:30 2022
Terminated at Tue Jan 25 01:51:51 2022
Results reported at Tue Jan 25 01:51:51 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1031.1+7442_weekly_bin703 157.792 74.7019 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1031.1+7442 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3353.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             355.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   3380 sec.
    Turnaround time :                            3382 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0262>
Subject: Job 620052: <4FGL_J1031.1+7442_weekly_bin703> in cluster <slac> Done

Job <4FGL_J1031.1+7442_weekly_bin703> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Jan 25 00:09:05 2022
Job was executed on host(s) <bullet0262>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:09:21 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:09:21 2022
Terminated at Tue Jan 25 07:03:22 2022
Results reported at Tue Jan 25 07:03:22 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1031.1+7442_weekly_bin703 157.792 74.7019 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1031.1+7442 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3159.00 sec.
    Max Memory :                                 1259 MB
    Average Memory :                             87.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   24838 sec.
    Turnaround time :                            24857 sec.

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

