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


Performing analysis on: 4FGL_J1058.6+5627_weekly_bin906
RA = 164.665, Dec = 56.4634
tmin = 786931201, tmax = 787536001
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='17378266', job_status='RUN', time_executed='2025-12-16 02:10:15.236753', time_epoch_executed='1765879815.24' WHERE source_name='4FGL J1058.6+5627' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17378266

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17378266/ft1_4FGL_J1058.6+5627_weekly_bin906.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17378266/ft1_4FGL_J1058.6+5627_weekly_bin906.fits outfile=/lscratch/kocevski/17378266/ft1_filteredMKT_4FGL_J1058.6+5627_weekly_bin906.fits ra=164.665 dec=56.4634 rad=12.0 tmin=786931201.0 tmax=787536001.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 5.36
user 4.39
sys 0.39

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.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/17378266/ft1_filteredMKT_4FGL_J1058.6+5627_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.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.80
user 0.19
sys 0.15

Number of photons that the gtmktime cut: 1461

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17378266/ltcube_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.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/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits
.....................!
real 15.95
user 15.08
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17378266/ltcube_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits outfile=/lscratch/kocevski/17378266/expmap_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.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/17378266/ltcube_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits
.....................!
real 60.26
user 56.03
sys 3.50

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

Setting source of interest to:
4FGL J1058.6+5627 @ 164.665 56.4634

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits outfile=/lscratch/kocevski/17378266/cmap_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.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=164.665 yref=56.4634 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.95
user 0.21
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits outfile=/lscratch/kocevski/17378266/cmap_HighResolution_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.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=164.665 yref=56.4634 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.21
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17378266/Model_4FGL_J1058.6+5627_weekly_bin906.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/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits.....................!
real 45.81
user 44.00
sys 0.92

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits', '/lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits', expMap='/lscratch/kocevski/17378266/expmap_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits', expCube='/lscratch/kocevski/17378266/ltcube_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17378266/Model_4FGL_J1058.6+5627_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1058.6+5627'

4FGL J1058.6+5627
   Spectrum: LogParabola
399         norm:  2.525e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
400        alpha:  1.858e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
401         beta:  4.581e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
402           Eb:  1.103e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17378266/ft1_filtered_4FGL_J1058.6+5627_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17378266/ft2_4FGL_J1058.6+5627_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17378266/expmap_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17378266/ltcube_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17378266/Model_4FGL_J1058.6+5627_weekly_bin906.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) = 16075.0737759

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14659       1.0000          .0000       .10000E+07
     2 'Prefactor '    10.825       1.0000          .0000       .10000E+07
     3 'norm      '    .32030E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    24.059       1.0000          .0000       .10000E+07
     5 'norm      '    1.7293       1.0000          .0000       .10000E+07
     6 'Prefactor '    .12342E-05   1.0000          .0000       .10000E+07
     7 'norm      '    2.2944       1.0000          .0000       .10000E+07
     8 'norm      '    2.6287       1.0000          .0000       .10000E+07
     9 'Prefactor '    7.8080       1.0000          .0000       .10000E+07
    10 'norm      '    9.7541       1.0000          .0000       .10000E+07
    11 'Prefactor '    .22238E-03   1.0000          .0000       .10000E+07
    12 'norm      '    .70665       1.0000          .0000       .10000E+07
    13 'norm      '    1.5121       1.0000          .0000       .10000E+07
    14 'Prefactor '    .14888E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    .13120E-04   1.0000          .0000       .10000E+07
    16 'norm      '    1.1847       1.0000          .0000       .10000E+07
    17 'Prefactor '    .19818E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    13.037       1.0000          .0000       .10000E+07
    19 'Prefactor '    .11295E-02   1.0000          .0000       .10000E+07
    20 'norm      '    15.912       1.0000          .0000       .10000E+07
    21 'Prefactor '    .51061E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    7.6697       1.0000          .0000       .10000E+07
    23 'Prefactor '    19.410       1.0000          .0000       .10000E+07
    24 'norm      '    .15687E-03   1.0000          .0000       .10000E+07
    25 'Prefactor '    2.8922       1.0000          .0000       .10000E+07
    26 'norm      '    1.8688       1.0000          .0000       .10000E+07
    27 'Prefactor '    2.3646       1.0000          .0000       .10000E+07
    28 'Prefactor '    .22453E-02   1.0000          .0000       .10000E+07
    29 'norm      '    .46835       1.0000          .0000       .10000E+07
    30 'Normalizat'    .97240       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .88544       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7560E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16074.96     FROM MIGRAD    STATUS=CONVERGED    158 CALLS     2883 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .13884        13.095       -.30854E-06** at limit **
   2  Prefactor     10.837        5.0655        .15115E-07    .14426E-02
   3  norm           .0000        1.3321       -.79127E-08** at limit **
   4  Prefactor     24.568        12.537       -.11919E-07    .11976    
   5  norm          1.7285        .35239       -.17736E-08   -.96931E-02
   6  Prefactor     .11102E-09    3.0076        .17970E-08** at limit **
   7  norm          2.2940        .54992       -.79004E-09   -.54846E-02
   8  norm          2.6282        1.2788        .22482E-07    .11677E-01
   9  Prefactor     7.7058        1.2819       -.20916E-08    .95140E-02
  10  norm          9.7615        1.0462       -.19980E-08    .99113E-02
  11  Prefactor     .55511E-10    4.7737        .26175E-07** at limit **
  12  norm          .70613        .74592       -.70117E-08   -.38092E-02
  13  norm          1.5123        .79559       -.62978E-08   -.54798E-02
  14  Prefactor     .10475E-05    25.052       -.29653E-07** at limit **
  15  Prefactor     .29526E-06    7.1172       -.56611E-07** at limit **
  16  norm          1.1842        1.0370       -.15455E-07   -.65819E-02
  17  Prefactor     .53720E-05    11.015       -.46270E-07** at limit **
  18  Prefactor     13.071        2.3878       -.45005E-08    .34100E-01
  19  Prefactor     .91666E-06    8.6815       -.54281E-07** at limit **
  20  norm          15.699        1.3902       -.10019E-08    .11534E-02
  21  Prefactor      .0000        1.8852       -.39058E-08** at limit **
  22  Prefactor     7.6624        8.0834        .14797E-09   -.14376E-01
  23  Prefactor     19.192        3.8559        .36227E-08   -.33462E-01
  24  norm          .55511E-10    1.7587        .26715E-07** at limit **
  25  Prefactor     2.8926        1.8886        .75161E-08    .23957E-02
  26  norm          1.8561        2.7092       -.45614E-08    .38242E-02
  27  Prefactor     2.3931        3.5429        .10527E-06    .78765E-02
  28  Prefactor     .16653E-09    7.1028       -.10290E-06** at limit **
  29  norm          .46834        .57761       -.17692E-07   -.82813E-02
  30  Normalizat    .97226        .10868        .21599E-06   -.67248E-04
  31  Prefactor     .88551        .13713       -.39209E-06   -.11437E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.138842
  Prefactor  = 10.8367
  norm       = 0
  Prefactor  = 24.568
  norm       = 1.72848
  Prefactor  = 1.11022e-10
  norm       = 2.29397
  norm       = 2.62817
  Prefactor  = 7.7058
  norm       = 9.7615
  Prefactor  = 5.55112e-11
  norm       = 0.706135
  norm       = 1.51234
  Prefactor  = 1.0475e-06
  Prefactor  = 2.95264e-07
  norm       = 1.18415
  Prefactor  = 5.37204e-06
  Prefactor  = 13.0707
  Prefactor  = 9.16656e-07
  norm       = 15.6985
  Prefactor  = 0
  Prefactor  = 7.66236
  Prefactor  = 19.1916
  norm       = 5.55112e-11
  Prefactor  = 2.89256
  norm       = 1.85609
  Prefactor  = 2.39313
  Prefactor  = 1.66533e-10
  norm       = 0.468344
  Normalizat = 0.972262
  Prefactor  = 0.885514
 **********
 **   18 **HESSE 
 **********

 FCN=   16074.96     FROM HESSE     STATUS=OK           696 CALLS     3579 TOTAL
                     EDM=   .56E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .13884        1.3216        .79324E-02   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10.837        5.0765        .30426E-03   -1.5642    
   3  norm           .0000        1.3277        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     24.568        16.585        .20392E-03   -1.5609    
   5  norm          1.7285        .35744        .74232E-03   -1.5682    
   6  Prefactor     .11102E-09    2.9503        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.2940        .55142        .67733E-03   -1.5678    
   8  norm          2.6282        1.2777        .62871E-03   -1.5676    
   9  Prefactor     7.7058        15.941        .35861E-03   -1.5652    
  10  norm          9.7615        7.8371        .32061E-03   -1.5645    
  11  Prefactor     .55511E-10    4.7673        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .70613        .75735        .60170E-03   -1.5691    
  13  norm          1.5123        .80045        .86934E-03   -1.5683    
  14  Prefactor     .10475E-05    26.947        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .29526E-06    17.722        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.1842        1.1171        .10483E-02   -1.5686    
  17  Prefactor     .53720E-05    21.300        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     13.071        13.678        .27716E-03   -1.5636    
  19  Prefactor     .91666E-06    17.097        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          15.699        19.017        .25082E-03   -1.5629    
  21  Prefactor      .0000        1.8720        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     7.6624        8.1613        .36186E-03   -1.5653    
  23  Prefactor     19.192        16.615        .22706E-03   -1.5620    
  24  norm          .55511E-10    1.7592        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     2.8926        1.8848        .59729E-03   -1.5674    
  26  norm          1.8561        2.8019        .76167E-03   -1.5681    
  27  Prefactor     2.3931        3.6480        .66613E-03   -1.5677    
  28  Prefactor     .16653E-09    7.0734        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .46834        .57591        .81959E-04   -1.5694    
  30  Normalizat    .97226        .93975E-01    .45820E-01   -.93966    
  31  Prefactor     .88551        .11665        .64755E-01   -.96649    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.62801e-07
Minuit parameter uncertainties:
  1  0.856731
  2  5.07654
  3  4.4059e-06
  4  16.5848
  5  0.357442
  6  3.42406e-05
  7  0.551424
  8  1.27769
  9  15.9409
  10  7.83708
  11  2.88716e-05
  12  0.757351
  13  0.800446
  14  0.0106258
  15  0.00457503
  16  1.11706
  17  0.0213941
  18  13.6776
  19  0.00791763
  20  19.0175
  21  1.11093e-05
  22  8.16134
  23  16.6148
  24  1.51963e-05
  25  1.88482
  26  2.80186
  27  3.64801
  28  7.00019e-05
  29  0.575914
  30  0.0939908
  31  0.116686
Done.

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

Extracting fit parameters...

4FGL J1058.6+5627
   Spectrum: LogParabola
399         norm:  1.184e+00  1.117e+00  0.000e+00  1.000e+06 ( 1.000e-12)
400        alpha:  1.858e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
401         beta:  4.581e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
402           Eb:  1.103e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
753    Prefactor:  8.855e-01  1.167e-01  0.000e+00  1.000e+01 ( 1.000e+00)
754        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
755        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
752   Normalization:  9.723e-01  9.399e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.91
Ra Dec: 164.665 56.463
Photon Index (Fixed Index): 1.86 +/- 0.00
Photon Flux (Fixed Index): 1.05e-08 +/- 9.93e-09
Energy Flux (Fixed Index): 9.31e-06 +/- 8.79e-06

TS (Fixed Index): 1.91
Ra Dec: 164.665 56.463
Photon Flux Upper Limit: 3.11749962443e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.75883966965e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17378266/likelihoodResults_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.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) = 16074.2885389
delta logL = 0.666730975065

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16074.2873551
delta logL = 0.667914778034

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .98675       1.0000          .0000       .10000E+07
     2 'alpha     '    2.5081       1.0000          .0000       5.0000    
     3 'Normalizat'    .95675       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89623       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7560E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16074.29     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      273 TOTAL
                     EDM=   .42E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .98682        9.8172        .43296E-03    .18360E-01
   2  alpha         2.5080        3.6260        .41152        .10012E-03
   3  Normalizat    .95674        .26712E-01    .45623E-01    .22180E-04
   4  Prefactor     .89619        .31506E-01    .64391E-01    .38752E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.986816
  alpha      = 2.50803
  Normalizat = 0.956738
  Prefactor  = 0.896195
 **********
 **   18 **HESSE 
 **********

 FCN=   16074.29     FROM HESSE     STATUS=OK            33 CALLS      306 TOTAL
                     EDM=   .12E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .98682        .98730        .81817E-05   -1.5688    
   2  alpha         2.5080        .62867        .14573E-01    .32128E-02
   3  Normalizat    .95674        .10799        .21741E-03   -.94494    
   4  Prefactor     .89619        .13661        .28480E-03   -.96274    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.23531e-11
Minuit parameter uncertainties:
  1  0.987302
  2  0.635491
  3  0.108011
  4  0.136667
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16074.2873549
delta logL = 0.667915030041

Extracting fit parameters...

4FGL J1058.6+5627
   Spectrum: LogParabola
399         norm:  9.868e-01  9.873e-01  0.000e+00  1.000e+06 ( 1.000e-12)
400        alpha:  2.508e+00  6.355e-01  0.000e+00  5.000e+00 ( 1.000e+00)
401         beta:  4.581e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
402           Eb:  1.103e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
753    Prefactor:  8.962e-01  1.367e-01  0.000e+00  1.000e+01 ( 1.000e+00)
754        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
755        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
752   Normalization:  9.567e-01  1.080e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.25
Ra Dec: 164.665 56.463
Photon Index (Free Index): 2.51 +/- 0.64
Photon Flux (Free Index): 2.31e-08 +/- 1.74e-08
Energy Flux (Free Index): 6.90e-06 +/- 5.12e-06

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/17378266/cmap_HighResolution_786931201_787536001_4FGL_J1058.6+5627_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.76e-05', comment='SUCCESS', photon_flux='1.05e-08', energy_flux2='6.90e-06', photon_flux_error='9.93e-09', dlogl='6.68e-01', energy_flux='9.31e-06', photon_flux2='2.31e-08', job_status='DONE', time_completed='2025-12-16 02:26:44.620295', photon_index_error2='0.64', photon_index2='2.51', ts='1.91', fit_tolerance='1e-08', GAL='0.89', photon_index_error='0.00', photon_flux_upper_limit='3.12e-08', energy_flux_error2='5.12e-06', EG='0.97', time_epoch_completed='1765880804.62', return_code='0', job_id='17378266', GAL2='0.90', EG2='0.96', return_code2='0', energy_flux_error='8.79e-06', photon_flux_error2='1.74e-08', ts2='3.25', photon_index='1.86' WHERE bin_id='906' AND source_name='4FGL J1058.6+5627' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 02:26:45 PST 2025

