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


Performing analysis on: 4FGL_J1159.0+0939_weekly_bin921
RA = 179.751, Dec = 9.6603
tmin = 796003201, tmax = 796608001
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='24575354', job_status='RUN', time_executed='2026-03-31 02:04:45.253234', time_epoch_executed='1774947885.25' WHERE source_name='4FGL J1159.0+0939' and cadence='weekly' and bin_id='921'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/24575354

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/24575354/ft1_4FGL_J1159.0+0939_weekly_bin921.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/24575354/ft1_4FGL_J1159.0+0939_weekly_bin921.fits outfile=/lscratch/kocevski/24575354/ft1_filteredMKT_4FGL_J1159.0+0939_weekly_bin921.fits ra=179.751 dec=9.6603 rad=12.0 tmin=796003201.0 tmax=796608001.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 6.65
user 5.83
sys 0.28

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.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/24575354/ft1_filteredMKT_4FGL_J1159.0+0939_weekly_bin921.fits evtable="EVENTS" outfile="/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.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.89
user 0.27
sys 0.13

Number of photons that the gtmktime cut: 921

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits" evtable="EVENTS" scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits sctable="SC_DATA" outfile=/lscratch/kocevski/24575354/ltcube_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.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/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits
.....................!
real 23.18
user 21.85
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits evtable="EVENTS" scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits sctable="SC_DATA" expcube=/lscratch/kocevski/24575354/ltcube_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits outfile=/lscratch/kocevski/24575354/expmap_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.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/24575354/ltcube_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits
.....................!
real 70.36
user 65.24
sys 4.10

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

Setting source of interest to:
4FGL J1159.0+0939 @ 179.751 9.6603

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits outfile=/lscratch/kocevski/24575354/cmap_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.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=179.751 yref=9.6603 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.90
user 0.26
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits outfile=/lscratch/kocevski/24575354/cmap_HighResolution_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.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=179.751 yref=9.6603 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.99
user 0.25
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits evtable="EVENTS" scfile=/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/24575354/Model_4FGL_J1159.0+0939_weekly_bin921.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/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits.....................!
real 37.05
user 34.86
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits', '/lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits', expMap='/lscratch/kocevski/24575354/expmap_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits', expCube='/lscratch/kocevski/24575354/ltcube_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/24575354/Model_4FGL_J1159.0+0939_weekly_bin921.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1159.0+0939'

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  2.838e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/24575354/ft1_filtered_4FGL_J1159.0+0939_weekly_bin921.fits
Spacecraft file(s): /lscratch/kocevski/24575354/ft2_4FGL_J1159.0+0939_weekly_bin921.fits
Exposure map: /lscratch/kocevski/24575354/expmap_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits
Exposure cube: /lscratch/kocevski/24575354/ltcube_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/24575354/Model_4FGL_J1159.0+0939_weekly_bin921.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) = 10491.2846905

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    17.274       1.0000          .0000       .10000E+07
     2 'Prefactor '    .85682       1.0000          .0000       .10000E+07
     3 'Prefactor '    .11384E-02   1.0000          .0000       .10000E+07
     4 'Prefactor '    59.238       1.0000          .0000       .10000E+07
     5 'Prefactor '    .15737E-06   1.0000          .0000       .10000E+07
     6 'Prefactor '    .48786E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .34493E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    .12291E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    21.142       1.0000          .0000       .10000E+07
    10 'Prefactor '    .11879E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .12166E-01   1.0000          .0000       .10000E+07
    12 'Prefactor '    .67752E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    .68911       1.0000          .0000       .10000E+07
    14 'Prefactor '    .11064E-01   1.0000          .0000       .10000E+07
    15 'Prefactor '    .50327E-03   1.0000          .0000       .10000E+07
    16 'norm      '    .15103E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    1.2845       1.0000          .0000       .10000E+07
    18 'norm      '    .56511E-01   1.0000          .0000       .10000E+07
    19 'norm      '    3.7242       1.0000          .0000       .10000E+07
    20 'Prefactor '    12.113       1.0000          .0000       .10000E+07
    21 'norm      '    .39857E-07   1.0000          .0000       .10000E+07
    22 'Normalizat'    .88376       1.0000         .10000E-01   10.000    
    23 'Prefactor '    .96094       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10491.28     FROM MIGRAD    STATUS=CONVERGED    175 CALLS     1928 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          17.300        8.1474        .71662E-07    .17826E-02
   2  Prefactor     .85707        .83952        .11161E-07    .25990E-03
   3  Prefactor     .22204E-09    6.5656       -.58900E-08** at limit **
   4  Prefactor     59.303        2.9838        .28065E-07    .30332E-01
   5  Prefactor      .0000        2.2519        .42959E-07** at limit **
   6  Prefactor     .78271E-08    11.145        .17648E-07** at limit **
   7  Prefactor     .14988E-08    6.5800       -.32853E-06** at limit **
   8  Prefactor     .38411E-04    207.59       -.20816E-05** at limit **
   9  Prefactor     21.407        23.078        .35333E-06    .59225E-01
  10  Prefactor     .56066E-08    22.636        .24601E-06** at limit **
  11  Prefactor     .13878E-08    29.571       -.59320E-06** at limit **
  12  Prefactor      .0000        2.5848        .15253E-07** at limit **
  13  Prefactor     .68922        1.1333       -.18193E-08    .10013E-02
  14  Prefactor     .27756E-09    12.106       -.25012E-06** at limit **
  15  Prefactor      .0000        2.0619       -.32566E-08** at limit **
  16  norm          .10547E-08    9.6839        .12646E-06** at limit **
  17  Prefactor     1.2803        1.2221       -.30527E-07   -.35019E-03
  18  norm           .0000        36.236       -.71548E-07** at limit **
  19  norm          3.7251        .58927        .90085E-08    .78085E-02
  20  Prefactor     12.107        9.0581       -.27196E-07   -.10686E-02
  21  norm           .0000        .45828        .26778E-08** at limit **
  22  Normalizat    .88360        .15984       -.25826E-05   -.61046E-04
  23  Prefactor     .96096        .14280       -.11214E-06   -.10119E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 17.3003
  Prefactor  = 0.857068
  Prefactor  = 2.22045e-10
  Prefactor  = 59.3033
  Prefactor  = 0
  Prefactor  = 7.82707e-09
  Prefactor  = 1.4988e-09
  Prefactor  = 3.84107e-05
  Prefactor  = 21.4072
  Prefactor  = 5.60663e-09
  Prefactor  = 1.38778e-09
  Prefactor  = 0
  Prefactor  = 0.689219
  Prefactor  = 2.77556e-10
  Prefactor  = 0
  norm       = 1.05471e-09
  Prefactor  = 1.28032
  norm       = 0
  norm       = 3.72507
  Prefactor  = 12.1066
  norm       = 0
  Normalizat = 0.883603
  Prefactor  = 0.960961
 **********
 **   18 **HESSE 
 **********

 FCN=   10491.28     FROM HESSE     STATUS=OK           422 CALLS     2350 TOTAL
                     EDM=   .82E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          17.300        8.1697        .24071E-03   -1.5625    
   2  Prefactor     .85707        .84492        .48792E-03   -1.5689    
   3  Prefactor     .22204E-09    6.5492        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     59.303        50.101        .12994E-03   -1.5554    
   5  Prefactor      .0000        2.2576        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .78271E-08    11.080        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .14988E-08    6.7177        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .38411E-04    2.3477        .48819E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     21.407        53.323        .21755E-03   -1.5615    
  10  Prefactor     .56066E-08    22.667        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .13878E-08    29.502        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor      .0000        2.5397        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .68922        1.1529        .61597E-03   -1.5691    
  14  Prefactor     .27756E-09    12.121        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        2.0625        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10547E-08    1.8498        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     1.2803        48.937        .97809E-03   -1.5685    
  18  norm           .0000        35.599        .15290E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          3.7251        .61991        .52301E-03   -1.5669    
  20  Prefactor     12.107        9.0953        .28757E-03   -1.5638    
  21  norm           .0000        .45549        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    .88360        .13953        .44694E-01   -.97039    
  23  Prefactor     .96096        .12242        .45777E-01   -.94042    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.15341e-07
Minuit parameter uncertainties:
  1  8.1697
  2  0.844921
  3  7.40251e-05
  4  50.1018
  5  6.71865e-07
  6  0.00058855
  7  0.000201548
  8  0.0189924
  9  53.3239
  10  0.000711914
  11  0.000408192
  12  1.15576e-05
  13  1.15288
  14  0.000115067
  15  9.57338e-06
  16  8.75346e-05
  17  15.8312
  18  3.38241e-05
  19  0.619914
  20  9.09534
  21  1.08981e-07
  22  0.139588
  23  0.122457
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  0.000e+00  6.719e-07  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
616    Prefactor:  9.610e-01  1.225e-01  0.000e+00  1.000e+01 ( 1.000e+00)
617        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
618        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
615   Normalization:  8.836e-01  1.396e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 179.751 9.660
Photon Flux Upper Limit: 3.18718204454e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00241586692924 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/24575354/likelihoodResults_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.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) = 10491.2888825
delta logL = -0.00888171017868

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10491.2800008
delta logL = -1.55196175911e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   10491.28     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      217 TOTAL
                     EDM=   .28E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.3400        .42118E-03** at limit **
   2  Index         1.0608        .74011        .14031E-05     .0000    
   3  Normalizat    .88360        1.2197       -.17302E-05   -.51909E-04
   4  Prefactor     .96096        1.3025        .36313E-05   -.86950E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.06077
  Normalizat = 0.883603
  Prefactor  = 0.960961
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   10491.28     FROM HESSE     STATUS=FAILED         9 CALLS      226 TOTAL
                     EDM=   .28E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.3400        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .58783E-01    1.1175        .14031E-05   -.90731    
   3  Normalizat    .88360        1.2197       -.17302E-05   -.97039    
   4  Prefactor     .96096        1.3025        .36313E-05   -.94042    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.76822e-12
Minuit parameter uncertainties:
  1  1.77992e-07
  2  0.747431
  3  1.26123
  4  1.34917
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) = 10491.2800008
delta logL = 0.0

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  0.000e+00  1.780e-07  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  1.061e+00  7.474e-01  0.000e+00  1.000e+01 (-1.000e+00)
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
616    Prefactor:  9.610e-01  1.349e+00  0.000e+00  1.000e+01 ( 1.000e+00)
617        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
618        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
615   Normalization:  8.836e-01  1.261e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 179.751 9.660

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/24575354/cmap_HighResolution_796003201_796608001_4FGL_J1159.0+0939_weekly_bin921.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.42e-03', job_status='DONE', photon_flux_upper_limit='3.19e-08', time_completed='2026-03-31 02:16:52.332986', job_id='24575354', GAL2='0.96', fit_tolerance='1e-08', EG2='0.88', EG='0.88', time_epoch_completed='1774948612.33', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='921' AND source_name='4FGL J1159.0+0939' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Mar 31 02:16:52 PDT 2026

