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


Performing analysis on: 4FGL_J1358.1+7642_weekly_bin801
RA = 209.528, Dec = 76.7064
tmin = 723427201, tmax = 724032001
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='35830137', job_status='RUN', time_executed='2023-12-12 01:51:00.717810', time_epoch_executed='1702374660.72' WHERE source_name='4FGL J1358.1+7642' and cadence='weekly' and bin_id='801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/35830137

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/35830137/ft1_4FGL_J1358.1+7642_weekly_bin801.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/35830137/ft1_4FGL_J1358.1+7642_weekly_bin801.fits outfile=/lscratch/kocevski/35830137/ft1_filteredMKT_4FGL_J1358.1+7642_weekly_bin801.fits ra=209.528 dec=76.7064 rad=12.0 tmin=723427201.0 tmax=724032001.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 4.47
user 4.19
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.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/35830137/ft1_filteredMKT_4FGL_J1358.1+7642_weekly_bin801.fits evtable="EVENTS" outfile="/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.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.46
user 0.21
sys 0.11

Number of photons that the gtmktime cut: 2099

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/35830137/ltcube_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.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/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits
.....................!
real 18.70
user 18.26
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/35830137/ltcube_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits outfile=/lscratch/kocevski/35830137/expmap_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.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/35830137/ltcube_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits
.....................!
real 66.54
user 62.38
sys 3.74

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

Setting source of interest to:
4FGL J1358.1+7642 @ 209.528 76.7064

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits outfile=/lscratch/kocevski/35830137/cmap_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.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=209.528 yref=76.7064 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.41
user 0.23
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits outfile=/lscratch/kocevski/35830137/cmap_HighResolution_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.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=209.528 yref=76.7064 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.44
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/35830137/Model_4FGL_J1358.1+7642_weekly_bin801.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/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits.....................!
real 85.78
user 84.56
sys 0.64

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits', '/lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits', expMap='/lscratch/kocevski/35830137/expmap_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits', expCube='/lscratch/kocevski/35830137/ltcube_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/35830137/Model_4FGL_J1358.1+7642_weekly_bin801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1358.1+7642'

4FGL J1358.1+7642
   Spectrum: PowerLaw
386    Prefactor:  5.684e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
387        Index:  2.373e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
388        Scale:  9.780e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/35830137/ft1_filtered_4FGL_J1358.1+7642_weekly_bin801.fits
Spacecraft file(s): /lscratch/kocevski/35830137/ft2_4FGL_J1358.1+7642_weekly_bin801.fits
Exposure map: /lscratch/kocevski/35830137/expmap_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits
Exposure cube: /lscratch/kocevski/35830137/ltcube_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/35830137/Model_4FGL_J1358.1+7642_weekly_bin801.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) = 22471.3655593

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.1085       1.0000          .0000       .10000E+07
     2 'norm      '    14.826       1.0000          .0000       .10000E+07
     3 'Prefactor '    9.7678       1.0000          .0000       .10000E+07
     4 'Prefactor '    3.4728       1.0000          .0000       .10000E+07
     5 'Prefactor '    .18489       1.0000          .0000       .10000E+07
     6 'Prefactor '    6.2526       1.0000          .0000       .10000E+07
     7 'norm      '    1.4752       1.0000          .0000       .10000E+07
     8 'norm      '    .85876E-07   1.0000          .0000       .10000E+07
     9 'Prefactor '    .47140E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .90893E-01   1.0000          .0000       .10000E+07
    11 'Prefactor '    .74566E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    .24918E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    .21664       1.0000          .0000       .10000E+07
    14 'Prefactor '    5.4376       1.0000          .0000       .10000E+07
    15 'Prefactor '    8.8335       1.0000          .0000       .10000E+07
    16 'Prefactor '    .68834E-07   1.0000          .0000       .10000E+07
    17 'Prefactor '    22.603       1.0000          .0000       .10000E+07
    18 'Prefactor '    7.1139       1.0000          .0000       .10000E+07
    19 'Prefactor '    2.8022       1.0000          .0000       .10000E+07
    20 'Prefactor '    6.4106       1.0000          .0000       .10000E+07
    21 'norm      '    .10830E-05   1.0000          .0000       .10000E+07
    22 'Prefactor '    21.236       1.0000          .0000       .10000E+07
    23 'Prefactor '    .70610E-07   1.0000          .0000       .10000E+07
    24 'Prefactor '    9.4120       1.0000          .0000       .10000E+07
    25 'Prefactor '    11.186       1.0000          .0000       .10000E+07
    26 'Normalizat'    1.0106       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .95988       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7000E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   22471.36     FROM MIGRAD    STATUS=CONVERGED    166 CALLS     2407 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.1104        7.5442        .11632E-06    .18210E-02
   2  norm          14.838        4.8689        .84417E-07    .34072E-01
   3  Prefactor     9.7446        9.1421       -.15360E-06   -.72605E-01
   4  Prefactor     3.4731        2.0243        .32430E-07    .17051E-02
   5  Prefactor     .19752        37.680       -.24584E-06** at limit **
   6  Prefactor     6.2522        1.1354        .80523E-08    .17824E-02
   7  norm          1.4759        1.6607        .48148E-07    .15680E-02
   8  norm           .0000        .47112        .58107E-07** at limit **
   9  Prefactor     .28866E-08    11.035       -.33543E-06** at limit **
  10  Prefactor     .22204E-09    24.354        .34241E-06** at limit **
  11  Prefactor     .63283E-08    9.1650       -.37880E-06** at limit **
  12  Prefactor     .55511E-10    4.2637        .20032E-06** at limit **
  13  Prefactor     .22660        4.6981        .56668E-08** at limit **
  14  Prefactor     5.4890        6.7835       -.97684E-07   -.21118E-02
  15  Prefactor     8.8353        8.4816        .24249E-07   -.92871E-01
  16  Prefactor     .25535E-08    45.687        .15850E-05** at limit **
  17  Prefactor     22.602        2.0927        .70318E-08    .21069E-01
  18  Prefactor     7.1247        2.2143       -.79911E-08   -.76071E-02
  19  Prefactor     2.7945        9.2566       -.10537E-07    .40229E-01
  20  Prefactor     6.3913        5.3794       -.27668E-09    .36723E-01
  21  norm           .0000        1.9781        .47124E-07** at limit **
  22  Prefactor     21.901        62.296        .76779E-06   -.93415E-02
  23  Prefactor      .0000        .82801       -.31750E-07** at limit **
  24  Prefactor     9.4124        3.2563        .39876E-07   -.40159E-02
  25  Prefactor     11.218        4.8519        .26751E-07   -.36693E-01
  26  Normalizat    1.0104        .98467E-01    .14127E-05   -.12359E-03
  27  Prefactor     .95987        .77992E-01   -.21050E-05   -.29107E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.11042
  norm       = 14.8376
  Prefactor  = 9.74461
  Prefactor  = 3.47311
  Prefactor  = 0.197523
  Prefactor  = 6.25224
  norm       = 1.47586
  norm       = 0
  Prefactor  = 2.88658e-09
  Prefactor  = 2.22045e-10
  Prefactor  = 6.32827e-09
  Prefactor  = 5.55112e-11
  Prefactor  = 0.226605
  Prefactor  = 5.48901
  Prefactor  = 8.83534
  Prefactor  = 2.55351e-09
  Prefactor  = 22.6016
  Prefactor  = 7.12473
  Prefactor  = 2.79448
  Prefactor  = 6.39126
  norm       = 0
  Prefactor  = 21.9006
  Prefactor  = 0
  Prefactor  = 9.41244
  Prefactor  = 11.2181
  Normalizat = 1.0104
  Prefactor  = 0.95987
 **********
 **   18 **HESSE 
 **********

 FCN=   22471.36     FROM HESSE     STATUS=OK           560 CALLS     2967 TOTAL
                     EDM=   .65E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.1104        7.5677        .33185E-03   -1.5648    
   2  norm          14.838        5.0478        .25986E-03   -1.5631    
   3  Prefactor     9.7446        9.9827        .32039E-03   -1.5646    
   4  Prefactor     3.4731        2.0238        .54239E-03   -1.5671    
   5  Prefactor     .19752        3.0185        .75385E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     6.2522        15.766        .40121E-03   -1.5658    
   7  norm          1.4759        1.6839        .88393E-03   -1.5684    
   8  norm           .0000        .46991        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .28866E-08    11.187        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .22204E-09    23.563        .14181E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .63283E-08    9.1591        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .55511E-10    4.3049        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .22660        .77545        .71302E-02   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     5.4890        6.8261        .43068E-03   -1.5661    
  15  Prefactor     8.8353        9.3299        .33700E-03   -1.5649    
  16  Prefactor     .25535E-08    45.095        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     22.602        24.523        .21039E-03   -1.5613    
  18  Prefactor     7.1247        12.563        .37586E-03   -1.5655    
  19  Prefactor     2.7945        43.563        .60746E-03   -1.5675    
  20  Prefactor     6.3913        22.597        .39617E-03   -1.5657    
  21  norm           .0000        1.9833        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     21.901        62.729        .21706E-03   -1.5614    
  23  Prefactor      .0000        .81753        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     9.4124        16.133        .32642E-03   -1.5647    
  25  Prefactor     11.218        19.195        .29929E-03   -1.5641    
  26  Normalizat    1.0104        .89918E-01    .45610E-01   -.92683    
  27  Prefactor     .95987        .69433E-01    .45764E-01   -.94079    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.54943e-07
Minuit parameter uncertainties:
  1  7.56766
  2  5.04784
  3  9.98274
  4  2.02383
  5  1.54432
  6  15.7663
  7  1.68387
  8  1.86935e-06
  9  0.000360818
  10  0.000135712
  11  0.000480513
  12  2.49049e-05
  13  0.775453
  14  6.82615
  15  9.32996
  16  0.00068171
  17  24.5231
  18  12.563
  19  22.0669
  20  22.5977
  21  4.41233e-07
  22  62.7305
  23  2.67676e-06
  24  16.133
  25  19.1952
  26  0.0899313
  27  0.0694395
Done.

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

Extracting fit parameters...

4FGL J1358.1+7642
   Spectrum: PowerLaw
386    Prefactor:  8.835e+00  9.330e+00  0.000e+00  1.000e+06 ( 1.000e-13)
387        Index:  2.373e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
388        Scale:  9.780e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
697    Prefactor:  9.599e-01  6.944e-02  0.000e+00  1.000e+01 ( 1.000e+00)
698        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
699        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
696   Normalization:  1.010e+00  8.993e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.15
Ra Dec: 209.528 76.706
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.44e-08 +/- 1.52e-08
Energy Flux (Fixed Index): 4.90e-06 +/- 5.18e-06

TS (Fixed Index): 1.15
Ra Dec: 209.528 76.706
Photon Flux Upper Limit: 4.62802676447e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00356967681049 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/35830137/likelihoodResults_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.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) = 22470.9445496
delta logL = 0.416379803894

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 22470.9413636
delta logL = 0.419565830824

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.9277       1.0000          .0000       .10000E+07
     2 'Index     '    3.7149       1.0000          .0000       10.000    
     3 'Normalizat'    .98339       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97369       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7000E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   22470.94     FROM MIGRAD    STATUS=FAILED        85 CALLS      331 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.9276        50.573        .14748E-04   -.44481E-01
   2  Index         3.7160        6.8263        .83717E-02   -.69105E-03
   3  Normalizat    .98345        .83347E-01    .25511E-03   -.14823E-02
   4  Prefactor     .97367        .65842E-01    .20917E-03   -.12690E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   22470.94     FROM SIMPLEX   STATUS=UNCHANGED     86 CALLS      417 TOTAL
                     EDM=   .83E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.9276        50.573        .17766E-04   -.44481E-01
   2  Index         3.7160        6.8263        .17532E-02   -.69105E-03
   3  Normalizat    .98345        .83347E-01    .62860E-04   -.14823E-02
   4  Prefactor     .97367        .65842E-01    .27352E-04   -.12690E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   22470.94     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      446 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.9267        13.241        .58994E-06   -.45776E-01
   2  Index         3.7163        2.6900        .33487E-03   -.56017E-03
   3  Normalizat    .98344        .10019        .51023E-04   -.14201E-02
   4  Prefactor     .97367        .79836E-01    .41834E-04   -.14468E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.92674
  Index      = 3.7163
  Normalizat = 0.983444
  Prefactor  = 0.973674
 **********
 **   18 **HESSE 
 **********

 FCN=   22470.94     FROM HESSE     STATUS=OK            23 CALLS      469 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.9267        9.4480        .37385E-06   -1.5680    
   2  Index         3.7163        2.3111        .13395E-04   -.25965    
   3  Normalizat    .98344        .99658E-01    .10205E-04   -.93587    
   4  Prefactor     .97367        .79349E-01    .83667E-05   -.93612    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.27221e-09
Minuit parameter uncertainties:
  1  8.53319
  2  2.40971
  3  0.0996765
  4  0.0793588
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) = 22470.9413586
delta logL = 0.419570825703

Extracting fit parameters...

4FGL J1358.1+7642
   Spectrum: PowerLaw
386    Prefactor:  1.927e+00  8.533e+00  0.000e+00  1.000e+06 ( 1.000e-13)
387        Index:  3.716e+00  2.410e+00  0.000e+00  1.000e+01 (-1.000e+00)
388        Scale:  9.780e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
697    Prefactor:  9.737e-01  7.936e-02  0.000e+00  1.000e+01 ( 1.000e+00)
698        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
699        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
696   Normalization:  9.834e-01  9.968e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.09
Ra Dec: 209.528 76.706
Photon Index (Free Index): 3.72 +/- 2.41
Photon Flux (Free Index): 3.41e-08 +/- 2.74e-08
Energy Flux (Free Index): 5.39e-06 +/- 4.37e-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/35830137/cmap_HighResolution_723427201_724032001_4FGL_J1358.1+7642_weekly_bin801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.57e-03', comment='SUCCESS', photon_flux='1.44e-08', energy_flux2='5.39e-06', photon_flux_error='1.52e-08', dlogl='4.20e-01', energy_flux='4.90e-06', photon_flux2='3.41e-08', job_status='DONE', time_completed='2023-12-12 02:07:47.662192', photon_index_error2='2.41', photon_index2='3.72', ts='1.15', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='4.63e-08', energy_flux_error2='4.37e-06', EG='1.01', time_epoch_completed='1702375667.66', return_code='0', job_id='35830137', GAL2='0.97', EG2='0.98', return_code2='0', energy_flux_error='5.18e-06', photon_flux_error2='2.74e-08', ts2='2.09', photon_index='2.37' WHERE bin_id='801' AND source_name='4FGL J1358.1+7642' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 12 02:07:47 PST 2023

