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


Performing analysis on: 4FGL_J2040.5-1705_weekly_bin927
RA = 310.136, Dec = -17.0901
tmin = 799632001, tmax = 800236801
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='26510915', job_status='RUN', time_executed='2026-05-12 02:53:53.564047', time_epoch_executed='1778579633.56' WHERE source_name='4FGL J2040.5-1705' and cadence='weekly' and bin_id='927'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/26510915

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/26510915/ft1_4FGL_J2040.5-1705_weekly_bin927.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/26510915/ft1_4FGL_J2040.5-1705_weekly_bin927.fits outfile=/lscratch/kocevski/26510915/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin927.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=799632001.0 tmax=800236801.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.98
user 3.35
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.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/26510915/ft1_filteredMKT_4FGL_J2040.5-1705_weekly_bin927.fits evtable="EVENTS" outfile="/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.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 0.68
user 0.22
sys 0.12

Number of photons that the gtmktime cut: 2234

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits" evtable="EVENTS" scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits sctable="SC_DATA" outfile=/lscratch/kocevski/26510915/ltcube_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.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/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits
.....................!
real 19.56
user 18.84
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits evtable="EVENTS" scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits sctable="SC_DATA" expcube=/lscratch/kocevski/26510915/ltcube_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits outfile=/lscratch/kocevski/26510915/expmap_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.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/26510915/ltcube_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits
.....................!
real 68.53
user 63.96
sys 3.91

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

Setting source of interest to:
4FGL J2040.5-1705 @ 310.136 -17.0901

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits outfile=/lscratch/kocevski/26510915/cmap_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.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=310.136 yref=-17.0901 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.65
user 0.21
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits outfile=/lscratch/kocevski/26510915/cmap_HighResolution_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.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=310.136 yref=-17.0901 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.75
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits evtable="EVENTS" scfile=/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/26510915/Model_4FGL_J2040.5-1705_weekly_bin927.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/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits.....................!
real 73.87
user 71.91
sys 1.12

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits', '/lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits', expMap='/lscratch/kocevski/26510915/expmap_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits', expCube='/lscratch/kocevski/26510915/ltcube_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/26510915/Model_4FGL_J2040.5-1705_weekly_bin927.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2040.5-1705'

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.223e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/26510915/ft1_filtered_4FGL_J2040.5-1705_weekly_bin927.fits
Spacecraft file(s): /lscratch/kocevski/26510915/ft2_4FGL_J2040.5-1705_weekly_bin927.fits
Exposure map: /lscratch/kocevski/26510915/expmap_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits
Exposure cube: /lscratch/kocevski/26510915/ltcube_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/26510915/Model_4FGL_J2040.5-1705_weekly_bin927.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) = 23683.0311759

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    12.109       1.0000          .0000       .10000E+07
     2 'Prefactor '    1.5977       1.0000          .0000       .10000E+07
     3 'norm      '    16.789       1.0000          .0000       .10000E+07
     4 'norm      '    4.3469       1.0000          .0000       .10000E+07
     5 'Prefactor '    .65412       1.0000          .0000       .10000E+07
     6 'norm      '    .73608E-07   1.0000          .0000       .10000E+07
     7 'norm      '    .25790E-06   1.0000          .0000       .10000E+07
     8 'norm      '    4.8059       1.0000          .0000       .10000E+07
     9 'Prefactor '    .16143E-06   1.0000          .0000       .10000E+07
    10 'Prefactor '    .14321E-04   1.0000          .0000       .10000E+07
    11 'norm      '    .11657E-08   1.0000          .0000       .10000E+07
    12 'Prefactor '    .35283E-06   1.0000          .0000       .10000E+07
    13 'norm      '    5.7604       1.0000          .0000       .10000E+07
    14 'Prefactor '    3.3451       1.0000          .0000       .10000E+07
    15 'Prefactor '    2.4284       1.0000          .0000       .10000E+07
    16 'Prefactor '    .63230       1.0000          .0000       .10000E+07
    17 'Normalizat'    1.1514       1.0000         .10000E-01   10.000    
    18 'Prefactor '    1.0742       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23682.99     FROM MIGRAD    STATUS=CONVERGED    112 CALLS     1065 TOTAL
                     EDM=   .65E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.164        1.6896        .45565E-08   -.15014E-01
   2  Prefactor     1.5967        1.0964       -.44139E-08    .17124E-02
   3  norm          16.804        7.8129       -.28397E-07   -.60957E-01
   4  norm          4.3826        4.7557        .42669E-07    .24393E-02
   5  Prefactor     .11102E-08    226.86       -.50941E-06** at limit **
   6  norm          .14433E-08    6.0993       -.59645E-07** at limit **
   7  norm           .0000        2.5370        .11537E-07** at limit **
   8  norm          4.8061        .96180       -.10695E-08    .82782E-03
   9  Prefactor      .0000        2.2891        .56909E-08** at limit **
  10  Prefactor     .99920E-08    10.101        .16730E-06** at limit **
  11  norm           .0000        .70695        .14836E-07** at limit **
  12  Prefactor      .0000        2.5352       -.37709E-08** at limit **
  13  norm          5.7671        2.8710        .32565E-08    .19197E-01
  14  Prefactor     3.3456        2.7982        .27415E-07    .21112E-02
  15  Prefactor     2.4671        7.1312       -.69861E-07    .28453E-01
  16  Prefactor     .64068        8.9707        .65820E-07   -.24277E-01
  17  Normalizat    1.1512        .16890       -.24909E-05    .12408E-03
  18  Prefactor     1.0742        .75344E-01    .14619E-05    .72324E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.1641
  Prefactor  = 1.59665
  norm       = 16.8044
  norm       = 4.38257
  Prefactor  = 1.11022e-09
  norm       = 1.44329e-09
  norm       = 0
  norm       = 4.80611
  Prefactor  = 0
  Prefactor  = 9.99201e-09
  norm       = 0
  Prefactor  = 0
  norm       = 5.76711
  Prefactor  = 3.34562
  Prefactor  = 2.46712
  Prefactor  = 0.640681
  Normalizat = 1.15122
  Prefactor  = 1.07419
 **********
 **   18 **HESSE 
 **********

 FCN=   23682.99     FROM HESSE     STATUS=OK           282 CALLS     1347 TOTAL
                     EDM=   .14E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.164        17.298        .28762E-03   -1.5638    
   2  Prefactor     1.5967        1.1024        .83861E-04   -1.5683    
   3  norm          16.804        8.6243        .24416E-03   -1.5626    
   4  norm          4.3826        4.7663        .48288E-03   -1.5666    
   5  Prefactor     .11102E-08    223.57        .64514E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .14433E-08    6.1320        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        2.5438        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.8061        .96438        .45867E-03   -1.5664    
   9  Prefactor      .0000        2.3005        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .99920E-08    9.7634        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm           .0000        .70271        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor      .0000        2.4802        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          5.7671        8.6473        .41824E-03   -1.5660    
  14  Prefactor     3.3456        2.7953        .55312E-03   -1.5671    
  15  Prefactor     2.4671        10.046        .65643E-03   -1.5677    
  16  Prefactor     .64068        24.806        .66383E-03   -1.5692    
  17  Normalizat    1.1512        .14344        .85394E-01   -.88124    
  18  Prefactor     1.0742        .63875E-01    .38663E-01   -.90296    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44118e-07
Minuit parameter uncertainties:
  1  17.2984
  2  1.10237
  3  8.6243
  4  4.76633
  5  0.000995771
  6  0.000189486
  7  5.21244e-07
  8  0.964379
  9  1.57894e-05
  10  0.000624287
  11  1.96031e-06
  12  1.29325e-06
  13  8.64731
  14  2.7953
  15  9.95704
  16  7.97324
  17  0.143491
  18  0.0638797
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  0.000e+00  1.293e-06  0.000e+00  1.000e+06 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.074e+00  6.388e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.151e+00  1.435e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 4.91306139365e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00383118000644 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/26510915/likelihoodResults_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.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) = 23682.9962387
delta logL = -0.0081439967762

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 23682.988095
delta logL = -3.15027136821e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .17603E-06   1.0000          .0000       .10000E+07
     2 'Index     '    2.2516       1.0000          .0000       10.000    
     3 'Normalizat'    1.1512       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0742       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23682.99     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      239 TOTAL
                     EDM=   .11E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        2.7115       -.30480E-07** at limit **
   2  Index         2.7061        1.2389        .15864E-05     .0000    
   3  Normalizat    1.1512        .16606       -.33578E-05   -.86457E-05
   4  Prefactor     1.0742        .73918E-01    .19319E-05    .40160E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.70612
  Normalizat = 1.15122
  Prefactor  = 1.07419
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   23682.99     FROM HESSE     STATUS=FAILED        11 CALLS      250 TOTAL
                     EDM=   .11E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        2.6429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .82918        1.9455        .15864E-05   -.47662    
   3  Normalizat    1.1512        1.1259       -.33578E-05   -.88124    
   4  Prefactor     1.0742        1.1675        .19319E-05   -.90296    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.11634e-12
Minuit parameter uncertainties:
  1  1.18781e-06
  2  1.08926
  3  1.15091
  4  1.19709
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) = 23682.9880947
delta logL = 6.91215973347e-11

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  0.000e+00  1.188e-06  0.000e+00  1.000e+06 ( 1.000e-12)
324        Index:  2.706e+00  1.089e+00  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.074e+00  1.197e+00  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.151e+00  1.151e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 310.136 -17.090

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/26510915/cmap_HighResolution_799632001_800236801_4FGL_J2040.5-1705_weekly_bin927.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.83e-03', job_status='DONE', photon_flux_upper_limit='4.91e-08', time_completed='2026-05-12 03:05:05.825927', job_id='26510915', GAL2='1.07', fit_tolerance='1e-08', EG2='1.15', EG='1.15', time_epoch_completed='1778580305.83', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.07', dlogl='6.91e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='927' AND source_name='4FGL J2040.5-1705' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 12 03:05:06 PDT 2026

