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


Performing analysis on: 4FGL_J1058.5+8115_weekly_bin858
RA = 164.626, Dec = 81.2547
tmin = 757900801, tmax = 758505601
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='61724396', job_status='RUN', time_executed='2025-01-14 02:51:24.930135', time_epoch_executed='1736851884.93' WHERE source_name='4FGL J1058.5+8115' and cadence='weekly' and bin_id='858'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/61724396

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/61724396/ft1_4FGL_J1058.5+8115_weekly_bin858.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/61724396/ft1_4FGL_J1058.5+8115_weekly_bin858.fits outfile=/lscratch/kocevski/61724396/ft1_filteredMKT_4FGL_J1058.5+8115_weekly_bin858.fits ra=164.626 dec=81.2547 rad=12.0 tmin=757900801.0 tmax=758505601.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.99
user 3.51
sys 0.34

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.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/61724396/ft1_filteredMKT_4FGL_J1058.5+8115_weekly_bin858.fits evtable="EVENTS" outfile="/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.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.45
user 0.22
sys 0.15

Number of photons that the gtmktime cut: 2834

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits" evtable="EVENTS" scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits sctable="SC_DATA" outfile=/lscratch/kocevski/61724396/ltcube_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.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/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits
.....................!
real 20.72
user 20.13
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits evtable="EVENTS" scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits sctable="SC_DATA" expcube=/lscratch/kocevski/61724396/ltcube_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits outfile=/lscratch/kocevski/61724396/expmap_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.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/61724396/ltcube_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits
.....................!
real 74.35
user 69.32
sys 4.42

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

Setting source of interest to:
4FGL J1058.5+8115 @ 164.626 81.2547

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits outfile=/lscratch/kocevski/61724396/cmap_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.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.626 yref=81.2547 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.26
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits outfile=/lscratch/kocevski/61724396/cmap_HighResolution_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.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.626 yref=81.2547 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.51
user 0.27
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits evtable="EVENTS" scfile=/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/61724396/Model_4FGL_J1058.5+8115_weekly_bin858.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/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits.....................!
real 147.41
user 145.64
sys 0.80

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits', '/lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits', expMap='/lscratch/kocevski/61724396/expmap_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits', expCube='/lscratch/kocevski/61724396/ltcube_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/61724396/Model_4FGL_J1058.5+8115_weekly_bin858.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1058.5+8115'

4FGL J1058.5+8115
   Spectrum: PowerLaw
349    Prefactor:  3.777e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  2.510e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  1.245e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/61724396/ft1_filtered_4FGL_J1058.5+8115_weekly_bin858.fits
Spacecraft file(s): /lscratch/kocevski/61724396/ft2_4FGL_J1058.5+8115_weekly_bin858.fits
Exposure map: /lscratch/kocevski/61724396/expmap_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits
Exposure cube: /lscratch/kocevski/61724396/ltcube_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/61724396/Model_4FGL_J1058.5+8115_weekly_bin858.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) = 30610.6331415

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .63067E-05   1.0000          .0000       .10000E+07
     2 'norm      '    36.613       1.0000          .0000       .10000E+07
     3 'norm      '    3.0073       1.0000          .0000       .10000E+07
     4 'Prefactor '    8.4101       1.0000          .0000       .10000E+07
     5 'Prefactor '    3.1738       1.0000          .0000       .10000E+07
     6 'Prefactor '    2.2530       1.0000          .0000       .10000E+07
     7 'Prefactor '    1.7314       1.0000          .0000       .10000E+07
     8 'Prefactor '    23.450       1.0000          .0000       .10000E+07
     9 'Prefactor '    13.266       1.0000          .0000       .10000E+07
    10 'Prefactor '    .13696E-01   1.0000          .0000       .10000E+07
    11 'norm      '    .11374E-04   1.0000          .0000       .10000E+07
    12 'Prefactor '    .27083       1.0000          .0000       .10000E+07
    13 'norm      '    .44379       1.0000          .0000       .10000E+07
    14 'norm      '    .15770E-05   1.0000          .0000       .10000E+07
    15 'Prefactor '    7.3134       1.0000          .0000       .10000E+07
    16 'Prefactor '    1.6188       1.0000          .0000       .10000E+07
    17 'Prefactor '    .98745E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .50336E-04   1.0000          .0000       .10000E+07
    19 'norm      '    .20107E-05   1.0000          .0000       .10000E+07
    20 'norm      '    .16793       1.0000          .0000       .10000E+07
    21 'Prefactor '    .24713E-01   1.0000          .0000       .10000E+07
    22 'Prefactor '    .38355E-05   1.0000          .0000       .10000E+07
    23 'Prefactor '    .22533E-01   1.0000          .0000       .10000E+07
    24 'Prefactor '    .53123E-04   1.0000          .0000       .10000E+07
    25 'Prefactor '    20.882       1.0000          .0000       .10000E+07
    26 'Prefactor '    4.4836       1.0000          .0000       .10000E+07
    27 'Normalizat'    1.0983       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .92796       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6910E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   30610.50     FROM MIGRAD    STATUS=CONVERGED    195 CALLS     2100 TOTAL
                     EDM=   .70E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .42188E-08    4.4302        .29645E-06** at limit **
   2  norm          36.641        2.8133       -.10242E-06    .14346    
   3  norm          3.0145        5.6718       -.82849E-07   -.33038E-03
   4  Prefactor     8.4105        1.3927       -.28722E-07    .95816E-02
   5  Prefactor     3.1724        1.9063       -.10030E-06   -.22068E-02
   6  Prefactor     2.3272        2.0664       -.27716E-06    .22032E-01
   7  Prefactor     1.7295        3.4175       -.89396E-07    .77351E-03
   8  Prefactor     23.436        7.6971        .16818E-06    .78698E-02
   9  Prefactor     13.291        5.4265       -.69238E-07   -.17628E-02
  10  Prefactor     .12768E-08    92.427       -.43015E-06** at limit **
  11  norm          .35139E-07    15.059        .18268E-05** at limit **
  12  Prefactor     .25078        6.2147        .43938E-06    .10717E-03
  13  norm          .44518        .32442       -.67714E-08   -.30196E-02
  14  norm           .0000        .80681        .81111E-07** at limit **
  15  Prefactor     7.2978        4.3043        .31411E-07   -.46511E-02
  16  Prefactor     1.6194        1.1084        .50373E-07   -.20498E-02
  17  Prefactor     .62172E-08    4.3191        .44878E-06** at limit **
  18  Prefactor      .0000        19.194       -.43414E-06** at limit **
  19  norm           .0000        1.0237        .13510E-06** at limit **
  20  norm          .16783        2.0781       -.25642E-06** at limit **
  21  Prefactor     .31669E-06    51.846       -.29100E-05** at limit **
  22  Prefactor      .0000        1.5884        .33861E-06** at limit **
  23  Prefactor     .63838E-08    38.989       -.39227E-07** at limit **
  24  Prefactor     .59952E-08    11.136        .14464E-05** at limit **
  25  Prefactor     20.778        1.2312       -.15683E-07   -.41921E-02
  26  Prefactor     4.4940        1.5458       -.12887E-06    .24476E-01
  27  Normalizat    1.0983        .89277E-01   -.24900E-05   -.11676E-03
  28  Prefactor     .92793        .57234E-01    .10647E-05   -.19326E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.21885e-09
  norm       = 36.6406
  norm       = 3.01448
  Prefactor  = 8.41047
  Prefactor  = 3.17244
  Prefactor  = 2.3272
  Prefactor  = 1.72954
  Prefactor  = 23.4363
  Prefactor  = 13.2906
  Prefactor  = 1.27676e-09
  norm       = 3.51386e-08
  Prefactor  = 0.250779
  norm       = 0.445177
  norm       = 0
  Prefactor  = 7.29785
  Prefactor  = 1.61935
  Prefactor  = 6.21725e-09
  Prefactor  = 0
  norm       = 0
  norm       = 0.167825
  Prefactor  = 3.16691e-07
  Prefactor  = 0
  Prefactor  = 6.38378e-09
  Prefactor  = 5.9952e-09
  Prefactor  = 20.7785
  Prefactor  = 4.49404
  Normalizat = 1.09834
  Prefactor  = 0.927927
 **********
 **   18 **HESSE 
 **********

 FCN=   30610.50     FROM HESSE     STATUS=OK           613 CALLS     2713 TOTAL
                     EDM=   .26E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .42188E-08    4.4860        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          36.641        11.334        .16528E-03   -1.5587    
   3  norm          3.0145        5.7337        .58503E-03   -1.5673    
   4  Prefactor     8.4105        19.273        .34544E-03   -1.5650    
   5  Prefactor     3.1724        1.9225        .56861E-03   -1.5672    
   6  Prefactor     2.3272        14.358        .68424E-03   -1.5677    
   7  Prefactor     1.7295        3.4382        .79748E-03   -1.5682    
   8  Prefactor     23.436        7.8382        .20655E-03   -1.5611    
   9  Prefactor     13.291        5.4611        .27476E-03   -1.5635    
  10  Prefactor     .12768E-08    91.151        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .35139E-07    1.2041        .51839E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .25078        .92029        .76153E-02   -1.5698    
  13  norm          .44518        .37333        .16449E-02   -1.5695    
  14  norm           .0000        .79247        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     7.2978        5.1057        .37065E-03   -1.5654    
  16  Prefactor     1.6194        1.0942        .83164E-03   -1.5683    
  17  Prefactor     .62172E-08    4.3545        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor      .0000        19.489        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        1.0177        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .16783        .50673        .59008E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .31669E-06    6.3016        .16744E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor      .0000        1.5923        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .63838E-08    3.5520        .10499E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .59952E-08    11.179        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     20.778        21.066        .21890E-03   -1.5617    
  26  Prefactor     4.4940        12.012        .47527E-03   -1.5666    
  27  Normalizat    1.0983        .83770E-01    .62289E-01   -.89805    
  28  Prefactor     .92793        .51324E-01    .45360E-01   -.95172    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.62056e-07
Minuit parameter uncertainties:
  1  0.000274607
  2  11.3337
  3  5.73372
  4  19.2734
  5  1.92245
  6  11.5609
  7  3.43819
  8  7.83821
  9  5.46107
  10  0.000681062
  11  0.00041148
  12  0.920288
  13  0.373326
  14  5.10558e-07
  15  5.10568
  16  1.09421
  17  0.000328484
  18  1.55834e-05
  19  7.10022e-06
  20  0.50673
  21  0.00282537
  22  4.66855e-06
  23  0.000300556
  24  0.000516971
  25  21.0664
  26  12.012
  27  0.0837806
  28  0.051327
Done.

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

Extracting fit parameters...

4FGL J1058.5+8115
   Spectrum: PowerLaw
349    Prefactor:  7.298e+00  5.106e+00  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  2.510e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  1.245e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
688    Prefactor:  9.279e-01  5.133e-02  0.000e+00  1.000e+01 ( 1.000e+00)
689        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
690        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
687   Normalization:  1.098e+00  8.378e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.20
Ra Dec: 164.626 81.255
Photon Index (Fixed Index): 2.51 +/- 0.00
Photon Flux (Fixed Index): 2.72e-08 +/- 1.90e-08
Energy Flux (Fixed Index): 7.80e-06 +/- 5.45e-06

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) = 30610.3417055
delta logL = 0.159308286064

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 30610.309661
delta logL = 0.191352766906

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   30610.31     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      272 TOTAL
                     EDM=   .32E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.5587        6.5126        .12955E-04    .53915E-02
   2  Index         2.2340        .45073        .91203E-02    .13885E-03
   3  Normalizat    1.1042        .86894E-01    .27488E-03   -.51913E-03
   4  Prefactor     .92594        .56450E-01    .19407E-03   -.72850E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.55868
  Index      = 2.23404
  Normalizat = 1.10415
  Prefactor  = 0.925939
 **********
 **   18 **HESSE 
 **********

 FCN=   30610.31     FROM HESSE     STATUS=OK            25 CALLS      297 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.5587        6.3014        .51821E-06   -1.5646    
   2  Index         2.2340        .43597        .36481E-03   -.58619    
   3  Normalizat    1.1042        .86901E-01    .10995E-04   -.89619    
   4  Prefactor     .92594        .56469E-01    .38814E-04   -.95241    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.57498e-10
Minuit parameter uncertainties:
  1  6.30145
  2  0.436773
  3  0.0869126
  4  0.0564724
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) = 30610.3096603
delta logL = 0.191353440852

Extracting fit parameters...

4FGL J1058.5+8115
   Spectrum: PowerLaw
349    Prefactor:  9.559e+00  6.301e+00  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  2.234e+00  4.368e-01  0.000e+00  1.000e+01 (-1.000e+00)
351        Scale:  1.245e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
688    Prefactor:  9.259e-01  5.647e-02  0.000e+00  1.000e+01 ( 1.000e+00)
689        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
690        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
687   Normalization:  1.104e+00  8.691e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.58
Ra Dec: 164.626 81.255
Photon Index (Free Index): 2.23 +/- 0.44
Photon Flux (Free Index): 2.17e-08 +/- 1.65e-08
Energy Flux (Free Index): 9.16e-06 +/- 6.11e-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/61724396/cmap_HighResolution_757900801_758505601_4FGL_J1058.5+8115_weekly_bin858.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='2.72e-08', energy_flux2='9.16e-06', photon_flux_error='1.90e-08', dlogl='1.91e-01', energy_flux='7.80e-06', photon_flux2='2.17e-08', job_status='DONE', time_completed='2025-01-14 03:08:38.924478', photon_index_error2='0.44', photon_index2='2.23', ts='5.20', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', energy_flux_error2='6.11e-06', EG='1.10', time_epoch_completed='1736852918.92', return_code='0', job_id='61724396', GAL2='0.93', EG2='1.10', return_code2='0', energy_flux_error='5.45e-06', photon_flux_error2='1.65e-08', ts2='5.58', photon_index='2.51' WHERE bin_id='858' AND source_name='4FGL J1058.5+8115' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 14 03:08:38 PST 2025

