/sdf/group/fermi/u/kocevski/software/conda/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)

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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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

/sdf/group/fermi/u/kocevski/software/conda/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 = 7672
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1031.6+6019_daily_bin2043
RA = 157.909, Dec = 60.3178
tmin = 768873601, tmax = 769132801
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='5041538', job_status='RUN', time_executed='2025-05-17 00:35:51.937518', time_epoch_executed='1747467351.94' WHERE source_name='4FGL J1031.6+6019' and cadence='daily' and bin_id='2043'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/5041538

Creating custom pfile directory:
/lscratch/kocevski/5041538/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=768873601.0 && nMetStart<769132801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=768873601.0 && nMetStart<769132801.0' /Data/Flight/Level1/LPA

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/5041538/ft1_4FGL_J1031.6+6019_daily_bin2043.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=768873601.0 && nMetStart<769132801.0' /Data/Flight/Level1/LPA

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/5041538/ft1_4FGL_J1031.6+6019_daily_bin2043.fits outfile=/lscratch/kocevski/5041538/ft1_filteredMKT_4FGL_J1031.6+6019_daily_bin2043.fits ra=157.909 dec=60.3178 rad=12.0 tmin=768873601.0 tmax=769132801.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 3.23
user 1.23
sys 0.17

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/5041538/ft1_filteredMKT_4FGL_J1031.6+6019_daily_bin2043.fits evtable="EVENTS" outfile="/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.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('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 1.63
user 0.20
sys 0.15

Number of photons that the gtmktime cut: 914

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits" evtable="EVENTS" scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits sctable="SC_DATA" outfile=/lscratch/kocevski/5041538/ltcube_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.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 /lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits
.....................!
real 9.92
user 8.06
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits evtable="EVENTS" scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits sctable="SC_DATA" expcube=/lscratch/kocevski/5041538/ltcube_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits outfile=/lscratch/kocevski/5041538/expmap_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.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 /lscratch/kocevski/5041538/ltcube_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits
.....................!
real 66.21
user 60.68
sys 3.38

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=/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits outfile=/lscratch/kocevski/5041538/cmap_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.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.66
user 0.22
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits outfile=/lscratch/kocevski/5041538/cmap_HighResolution_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.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.68
user 0.22
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits evtable="EVENTS" scfile=/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/5041538/Model_4FGL_J1031.6+6019_daily_bin2043.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...
/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits.....................!
real 37.62
user 36.22
sys 0.68

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits', '/lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits', expMap='/lscratch/kocevski/5041538/expmap_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits', expCube='/lscratch/kocevski/5041538/ltcube_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/5041538/Model_4FGL_J1031.6+6019_daily_bin2043.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  0.000e+00  1.000e+06 ( 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): /lscratch/kocevski/5041538/ft1_filtered_4FGL_J1031.6+6019_daily_bin2043.fits
Spacecraft file(s): /lscratch/kocevski/5041538/ft2_4FGL_J1031.6+6019_daily_bin2043.fits
Exposure map: /lscratch/kocevski/5041538/expmap_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits
Exposure cube: /lscratch/kocevski/5041538/ltcube_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/5041538/Model_4FGL_J1031.6+6019_daily_bin2043.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) = 9948.38896814

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .69711       1.0000          .0000       .10000E+07
     2 'Prefactor '    .37070E-06   1.0000          .0000       .10000E+07
     3 'Prefactor '    .94369E-09   1.0000          .0000       .10000E+07
     4 'Prefactor '    1.6107       1.0000          .0000       .10000E+07
     5 'Prefactor '    .29947E-04   1.0000          .0000       .10000E+07
     6 'norm      '    .13152E-05   1.0000          .0000       .10000E+07
     7 'Prefactor '    .21792E-02   1.0000          .0000       .10000E+07
     8 'norm      '    1.2484       1.0000          .0000       .10000E+07
     9 'Prefactor '    2.1492       1.0000          .0000       .10000E+07
    10 'norm      '    .23649       1.0000          .0000       .10000E+07
    11 'norm      '    4.1758       1.0000          .0000       .10000E+07
    12 'Prefactor '    38.776       1.0000          .0000       .10000E+07
    13 'norm      '    .32702       1.0000          .0000       .10000E+07
    14 'Prefactor '    .10864E-03   1.0000          .0000       .10000E+07
    15 'norm      '    .91038E-08   1.0000          .0000       .10000E+07
    16 'norm      '    4.3589       1.0000          .0000       .10000E+07
    17 'Prefactor '    94.633       1.0000          .0000       .10000E+07
    18 'norm      '    1.5599       1.0000          .0000       .10000E+07
    19 'norm      '    2.0063       1.0000          .0000       .10000E+07
    20 'Prefactor '    70.782       1.0000          .0000       .10000E+07
    21 'norm      '    3.6936       1.0000          .0000       .10000E+07
    22 'Prefactor '    .93029E-03   1.0000          .0000       .10000E+07
    23 'Prefactor '    .82113E-04   1.0000          .0000       .10000E+07
    24 'Prefactor '    2.4207       1.0000          .0000       .10000E+07
    25 'Prefactor '    29.185       1.0000          .0000       .10000E+07
    26 'Prefactor '    .15592E-04   1.0000          .0000       .10000E+07
    27 'Prefactor '    6.7876       1.0000          .0000       .10000E+07
    28 'norm      '    .28718E-05   1.0000          .0000       .10000E+07
    29 'norm      '    .63096E-03   1.0000          .0000       .10000E+07
    30 'Prefactor '    .49892E-05   1.0000          .0000       .10000E+07
    31 'Prefactor '    .50693E-03   1.0000          .0000       .10000E+07
    32 'Normalizat'    1.1017       1.0000         .10000E-01   10.000    
    33 'Prefactor '    .94586       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7870E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9948.360     FROM MIGRAD    STATUS=CONVERGED    244 CALLS     3318 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .69637        .52215        .28191E-07   -.97561E-03
   2  Prefactor      .0000        2.9446       -.11487E-06** at limit **
   3  Prefactor      .0000        .90657        .56457E-06** at limit **
   4  Prefactor     1.6109        3.6806       -.15604E-06    .15410E-03
   5  Prefactor      .0000        2.8023        .81232E-07** at limit **
   6  norm           .0000        2.3169        .15362E-06** at limit **
   7  Prefactor     .66946E-05    58.894       -.12838E-06** at limit **
   8  norm          1.2503        .42933       -.27926E-07    .22839E-02
   9  Prefactor     2.1369        3.1103        .33636E-06   -.82698E-03
  10  norm          .23650        .37533       -.57231E-07** at limit **
  11  norm          4.1714        2.2091       -.72361E-07    .10034E-02
  12  Prefactor     37.639        33.606        .13536E-06    .35464E-01
  13  norm          .12254E-02    69.970        .51136E-06** at limit **
  14  Prefactor      .0000        3.7669        .85674E-06** at limit **
  15  norm           .0000        .40925       -.75042E-07** at limit **
  16  norm          4.3654        1.7332       -.28935E-06    .61092E-02
  17  Prefactor     97.301        123.69        .22438E-06   -.41856E-01
  18  norm          1.5596        .70879        .20561E-07    .19076E-02
  19  norm          1.9981        2.0649       -.26669E-06    .27643E-02
  20  Prefactor     68.813        88.568        .66571E-06   -.38688E-01
  21  norm          3.7018        2.2834        .19507E-06   -.10579E-02
  22  Prefactor     .35583E-07    25.223       -.13716E-05** at limit **
  23  Prefactor     .19984E-08    12.216        .10855E-05** at limit **
  24  Prefactor     2.3870        5.2300       -.27947E-06    .58164E-03
  25  Prefactor     29.040        20.400       -.10930E-06   -.54216E-02
  26  Prefactor      .0000        3.4185        .44962E-06** at limit **
  27  Prefactor     6.7807        3.6481       -.74055E-07    .37109E-03
  28  norm           .0000        4.4727        .14580E-06** at limit **
  29  norm          .11102E-09    10.015        .79547E-06** at limit **
  30  Prefactor      .0000        4.6918        .35150E-06** at limit **
  31  Prefactor     .72164E-09    10.647        .52130E-06** at limit **
  32  Normalizat    1.1033        .15391        .40594E-05    .56317E-05
  33  Prefactor     .94529        .16324       -.12310E-05    .21223E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.696373
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 1.61088
  Prefactor  = 0
  norm       = 0
  Prefactor  = 6.69459e-06
  norm       = 1.25034
  Prefactor  = 2.13692
  norm       = 0.236499
  norm       = 4.17141
  Prefactor  = 37.6386
  norm       = 0.00122544
  Prefactor  = 0
  norm       = 0
  norm       = 4.36538
  Prefactor  = 97.3008
  norm       = 1.55959
  norm       = 1.99808
  Prefactor  = 68.813
  norm       = 3.70178
  Prefactor  = 3.55826e-08
  Prefactor  = 1.9984e-09
  Prefactor  = 2.38695
  Prefactor  = 29.0398
  Prefactor  = 0
  Prefactor  = 6.78071
  norm       = 0
  norm       = 1.11022e-10
  Prefactor  = 0
  Prefactor  = 7.21645e-10
  Normalizat = 1.10334
  Prefactor  = 0.945291
 **********
 **   18 **HESSE 
 **********

 FCN=   9948.360     FROM HESSE     STATUS=OK           763 CALLS     4081 TOTAL
                     EDM=   .68E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .69637        .52325        .60943E-04   -1.5691    
   2  Prefactor      .0000        2.9441        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        .90478        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.6109        3.7223        .83429E-03   -1.5683    
   5  Prefactor      .0000        2.7923        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm           .0000        2.3192        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .66946E-05    60.587        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.2503        .43007        .82994E-03   -1.5686    
   9  Prefactor     2.1369        3.1225        .70259E-03   -1.5679    
  10  norm          .23650        .40595        .17704E-02   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          4.1714        2.2094        .49296E-03   -1.5667    
  12  Prefactor     37.639        33.652        .16061E-03   -1.5585    
  13  norm          .12254E-02    7.0841        .14557E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        3.7691        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm           .0000        .40845        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.3654        1.7365        .48220E-03   -1.5666    
  17  Prefactor     97.301        129.01        .10280E-03   -1.5511    
  18  norm          1.5596        .71934        .85171E-03   -1.5683    
  19  norm          1.9981        2.0968        .73073E-03   -1.5680    
  20  Prefactor     68.813        90.774        .11887E-03   -1.5542    
  21  norm          3.7018        2.2929        .52525E-03   -1.5669    
  22  Prefactor     .35583E-07    25.272        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .19984E-08    12.215        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     2.3870        5.2499        .65758E-03   -1.5677    
  25  Prefactor     29.040        20.439        .18514E-03   -1.5600    
  26  Prefactor      .0000        3.4211        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     6.7807        3.6460        .38488E-03   -1.5656    
  28  norm           .0000        4.4719        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .11102E-09    9.6202        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor      .0000        4.6756        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Prefactor     .72164E-09    10.654        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    1.1033        .13679        .37933E-01   -.89645    
  33  Prefactor     .94529        .14581        .45587E-01   -.94576    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.84529e-07
Minuit parameter uncertainties:
  1  0.523246
  2  8.55888e-07
  3  7.57026e-06
  4  3.72233
  5  4.52579e-06
  6  5.00812e-06
  7  0.0402799
  8  0.430068
  9  3.12249
  10  0.405951
  11  2.20938
  12  33.6521
  13  0.186346
  14  1.9587e-05
  15  6.84107e-07
  16  1.73654
  17  129.012
  18  0.71934
  19  2.09682
  20  90.776
  21  2.29291
  22  0.00189662
  23  0.000313409
  24  5.24992
  25  20.4391
  26  1.3534e-05
  27  3.64604
  28  3.03944e-06
  29  6.62814e-05
  30  4.65901e-06
  31  0.000172542
  32  0.136835
  33  0.145866
Done.

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

Extracting fit parameters...

4FGL J1031.6+6019
   Spectrum: PowerLaw
418    Prefactor:  0.000e+00  1.959e-05  0.000e+00  1.000e+06 ( 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:  9.453e-01  1.459e-01  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:  1.103e+00  1.368e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 157.909 60.318
Photon Flux Upper Limit: 3.99663400012e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00313031097534 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/5041538/likelihoodResults_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.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) = 9948.36229998
delta logL = -0.00227424339937

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9948.36002614
delta logL = -4.03926605941e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .36243E-05   1.0000          .0000       .10000E+07
     2 'Index     '    2.0140       1.0000          .0000       10.000    
     3 'Normalizat'    1.1033       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94533       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.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   9948.360     FROM MIGRAD    STATUS=CONVERGED     35 CALLS      276 TOTAL
                     EDM=   .71E-13  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        3.2480        .42118E-03** at limit **
   2  Index         1.3008        .85533       -.24934E-04     .0000    
   3  Normalizat    1.1033        1.1530       -.15655E-05    .18839E-05
   4  Prefactor     .94529        1.2878       -.77952E-06   -.36352E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.30078
  Normalizat = 1.10334
  Prefactor  = 0.945291
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   9948.360     FROM HESSE     STATUS=FAILED         9 CALLS      285 TOTAL
                     EDM=   .71E-13  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        3.2480        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .12935        1.2930       -.24934E-04   -.83284    
   3  Normalizat    1.1033        1.1530       -.15655E-05   -.89645    
   4  Prefactor     .94529        1.2878       -.77952E-06   -.94576    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 7.10579e-14
Minuit parameter uncertainties:
  1  4.30757e-07
  2  0.864829
  3  1.181
  4  1.33351
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 9948.36002573
delta logL = 0.0

Extracting fit parameters...

4FGL J1031.6+6019
   Spectrum: PowerLaw
418    Prefactor:  0.000e+00  4.308e-07  0.000e+00  1.000e+06 ( 1.000e-13)
419        Index:  1.301e+00  8.648e-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:  9.453e-01  1.334e+00  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:  1.103e+00  1.181e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 157.909 60.318

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 /lscratch/kocevski/5041538/cmap_HighResolution_768873601_769132801_4FGL_J1031.6+6019_daily_bin2043.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.13e-03', job_status='DONE', photon_flux_upper_limit='4.00e-08', time_completed='2025-05-17 00:49:10.204759', job_id='5041538', GAL2='0.95', fit_tolerance='1e-08', EG2='1.10', EG='1.10', time_epoch_completed='1747468150.2', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.61' WHERE bin_id='2043' AND source_name='4FGL J1031.6+6019' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat May 17 00:49:15 PDT 2025

