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


Performing analysis on: 4FGL_J1338.0-4159_daily_bin2125
RA = 204.522, Dec = -41.9953
tmin = 790128001, tmax = 790387201
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='19153840', job_status='RUN', time_executed='2026-01-18 00:32:24.601166', time_epoch_executed='1768725144.6' WHERE source_name='4FGL J1338.0-4159' and cadence='daily' and bin_id='2125'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19153840

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19153840/ft1_4FGL_J1338.0-4159_daily_bin2125.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19153840/ft1_4FGL_J1338.0-4159_daily_bin2125.fits outfile=/lscratch/kocevski/19153840/ft1_filteredMKT_4FGL_J1338.0-4159_daily_bin2125.fits ra=204.522 dec=-41.9953 rad=12.0 tmin=790128001.0 tmax=790387201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 1.73
user 1.22
sys 0.15

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.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/19153840/ft1_filteredMKT_4FGL_J1338.0-4159_daily_bin2125.fits evtable="EVENTS" outfile="/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.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.67
user 0.17
sys 0.14

Number of photons that the gtmktime cut: 2410

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19153840/ltcube_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.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/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits
.....................!
real 9.15
user 8.59
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits evtable="EVENTS" scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19153840/ltcube_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits outfile=/lscratch/kocevski/19153840/expmap_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.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/19153840/ltcube_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits
.....................!
real 64.12
user 60.11
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
Extended source CenA Lobes in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CenALobes.fits is the correct path to the extended template.
Extended source G296.5+10.0 in ROI with RadialDisk spatial model.
Extended source HESS J1303-631 in ROI with RadialGaussian spatial model.
Extended source FGES J1409.1-6121 in ROI with RadialDisk spatial model.
Extended source HESS J1420-607 in ROI with RadialDisk spatial model.
Added 268 point sources and 5 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1338.0-4159 @ 204.522 -41.9953

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits outfile=/lscratch/kocevski/19153840/cmap_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.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=204.522 yref=-41.9953 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.50
user 0.20
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits outfile=/lscratch/kocevski/19153840/cmap_HighResolution_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.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=204.522 yref=-41.9953 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.55
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits evtable="EVENTS" scfile=/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19153840/Model_4FGL_J1338.0-4159_daily_bin2125.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 CenA Lobes
adding source EG_v02
adding source FGES J1409.1-6121
adding source G296.5+10.0
adding source GAL_V02
adding source HESS J1303-631
adding source HESS J1420-607
Working on...
/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits.....................!
real 162.09
user 159.96
sys 0.96

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits', '/lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits', expMap='/lscratch/kocevski/19153840/expmap_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits', expCube='/lscratch/kocevski/19153840/ltcube_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19153840/Model_4FGL_J1338.0-4159_daily_bin2125.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1338.0-4159'

4FGL J1338.0-4159
   Spectrum: PowerLaw
369    Prefactor:  9.822e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-15)
370        Index:  1.972e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  4.081e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19153840/ft1_filtered_4FGL_J1338.0-4159_daily_bin2125.fits
Spacecraft file(s): /lscratch/kocevski/19153840/ft2_4FGL_J1338.0-4159_daily_bin2125.fits
Exposure map: /lscratch/kocevski/19153840/expmap_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits
Exposure cube: /lscratch/kocevski/19153840/ltcube_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19153840/Model_4FGL_J1338.0-4159_daily_bin2125.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) = 23884.946177

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14486E-04   1.0000          .0000       .10000E+07
     2 'Prefactor '    7.7363       1.0000          .0000       .10000E+07
     3 'norm      '    .31210E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    .25073E-02   1.0000          .0000       .10000E+07
     5 'norm      '    9.6970       1.0000          .0000       .10000E+07
     6 'norm      '    .18718E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .12487       1.0000          .0000       .10000E+07
     8 'Prefactor '    24.065       1.0000          .0000       .10000E+07
     9 'norm      '    .16881E-02   1.0000          .0000       .10000E+07
    10 'Prefactor '    .10485E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .59576E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    .70148       1.0000          .0000       .10000E+07
    13 'Prefactor '    .10916E-01   1.0000          .0000       .10000E+07
    14 'norm      '    .24314       1.0000          .0000       .10000E+07
    15 'Prefactor '    76.256       1.0000          .0000       .10000E+07
    16 'Normalizat'    1.2770       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0397       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .9490E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23884.95     FROM MIGRAD    STATUS=CONVERGED    133 CALLS     1291 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        2.4596       -.85743E-07** at limit **
   2  Prefactor     7.5116        7.6674       -.10152E-05   -.34277E-03
   3  norm          .55511E-10    4.3507        .77679E-06** at limit **
   4  Prefactor     .22204E-09    12.038       -.77656E-06** at limit **
   5  norm          9.6876        4.2390       -.14720E-06   -.10198E-04
   6  norm          .23981E-07    12.028        .88998E-06** at limit **
   7  Prefactor      .0000        37.989        .50594E-06** at limit **
   8  Prefactor     23.945        2.7319        .58247E-07   -.22865E-01
   9  norm          .11102E-09    5.0116       -.64585E-06** at limit **
  10  Prefactor     .76272E-07    19.353        .56878E-06** at limit **
  11  Prefactor     .85154E-07    21.201        .24961E-05** at limit **
  12  Prefactor     .13474E-05    211.26        .34181E-06** at limit **
  13  Prefactor     .11102E-08    9.6465       -.22525E-06** at limit **
  14  norm          .24314        .93694E-01    .10163E-07** at limit **
  15  Prefactor     76.070        6.4342       -.98443E-07    .17887    
  16  Normalizat    1.2775        .20825       -.87309E-05   -.35904E-04
  17  Prefactor     1.0398        .58277E-01    .43081E-05   -.88448E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 7.51161
  norm       = 5.55112e-11
  Prefactor  = 2.22045e-10
  norm       = 9.68759
  norm       = 2.39808e-08
  Prefactor  = 0
  Prefactor  = 23.9452
  norm       = 1.11022e-10
  Prefactor  = 7.62723e-08
  Prefactor  = 8.51541e-08
  Prefactor  = 1.34737e-06
  Prefactor  = 1.11022e-09
  norm       = 0.243135
  Prefactor  = 76.0703
  Normalizat = 1.27752
  Prefactor  = 1.0398
 **********
 **   18 **HESSE 
 **********

 FCN=   23884.95     FROM HESSE     STATUS=OK           259 CALLS     1550 TOTAL
                     EDM=   .19E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        2.4544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     7.5116        7.6849        .36029E-03   -1.5653    
   3  norm          .55511E-10    4.3385        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .22204E-09    1.2304        .65999E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          9.6876        4.2288        .32156E-03   -1.5646    
   6  norm          .23981E-07    11.543        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor      .0000        37.998        .13304E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     23.945        42.926        .20390E-03   -1.5610    
   9  norm          .11102E-09    5.0098        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .76272E-07    19.369        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .85154E-07    21.246        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .13474E-05    212.64        .60588E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .11102E-08    9.6395        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .24314        .97808E-01    .64016E-03   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     76.070        66.433        .11452E-03   -1.5534    
  16  Normalizat    1.2775        .18682        .11266       -.84240    
  17  Prefactor     1.0398        .51615E-01    .40556E-01   -.91414    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.9329e-06
Minuit parameter uncertainties:
  1  9.37551e-06
  2  7.68489
  3  3.69647e-05
  4  3.2014e-05
  5  4.22883
  6  0.00105257
  7  7.33804e-07
  8  42.9267
  9  5.04283e-05
  10  0.00243108
  11  0.00269024
  12  0.0338539
  13  0.000208936
  14  0.0978077
  15  66.4339
  16  0.186921
  17  0.0516172
Done.

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

Extracting fit parameters...

4FGL J1338.0-4159
   Spectrum: PowerLaw
369    Prefactor:  0.000e+00  7.338e-07  0.000e+00  1.000e+06 ( 1.000e-15)
370        Index:  1.972e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  4.081e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
940    Prefactor:  1.040e+00  5.162e-02  0.000e+00  1.000e+01 ( 1.000e+00)
941        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
942        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
932   Normalization:  1.278e+00  1.869e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 204.522 -41.995
Photon Flux Upper Limit: 2.90771516128e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00217575229898 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19153840/likelihoodResults_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.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) = 23884.9579158
delta logL = -0.0125543801296

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 23884.9453615
delta logL = -7.1588146966e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11051E-05   1.0000          .0000       .10000E+07
     2 'Index     '    .65111       1.0000          .0000       10.000    
     3 'Normalizat'    1.2775       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0398       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .9490E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23884.95     FROM MIGRAD    STATUS=CONVERGED     35 CALLS      208 TOTAL
                     EDM=   .36E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        48.215        .13346E-05** at limit **
   2  Index         .91656        7.4635        .98352E-04     .0000    
   3  Normalizat    1.2775        .20502        .86893E-05    .11796E-04
   4  Prefactor     1.0398        .57898E-01   -.22413E-05    .63287E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 0.916558
  Normalizat = 1.27752
  Prefactor  = 1.0398
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   23884.95     FROM HESSE     STATUS=FAILED        11 CALLS      219 TOTAL
                     EDM=   .36E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        48.116        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .27614E-01    1.2396        .98352E-04   -.95565    
   3  Normalizat    1.2775        1.0844        .86893E-05   -.84240    
   4  Prefactor     1.0398        1.2040       -.22413E-05   -.91414    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 3.59751e-13
Minuit parameter uncertainties:
  1  3.64988e-05
  2  1.20456
  3  1.10462
  4  1.23762
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) = 23884.9453614
delta logL = 0.0

Extracting fit parameters...

4FGL J1338.0-4159
   Spectrum: PowerLaw
369    Prefactor:  0.000e+00  3.650e-05  0.000e+00  1.000e+06 ( 1.000e-15)
370        Index:  9.166e-01  1.205e+00  0.000e+00  1.000e+01 (-1.000e+00)
371        Scale:  4.081e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
940    Prefactor:  1.040e+00  1.238e+00  0.000e+00  1.000e+01 ( 1.000e+00)
941        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
942        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
932   Normalization:  1.278e+00  1.105e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 204.522 -41.995

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/19153840/cmap_HighResolution_790128001_790387201_4FGL_J1338.0-4159_daily_bin2125.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.18e-03', job_status='DONE', photon_flux_upper_limit='2.91e-08', time_completed='2026-01-18 00:46:28.742569', job_id='19153840', GAL2='1.04', fit_tolerance='1e-08', EG2='1.28', EG='1.28', time_epoch_completed='1768725988.74', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.04', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='1.97' WHERE bin_id='2125' AND source_name='4FGL J1338.0-4159' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Jan 18 00:46:28 PST 2026

