/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 123 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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 = 7379
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1058.0+4305_daily_bin1594
RA = 164.518, Dec = 43.0938
tmin = 652492801, tmax = 652752001
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='716250', job_status='RUN', time_executed='2021-09-08 00:22:59.273443', time_epoch_executed='1631085779.27' WHERE source_name='4FGL J1058.0+4305' and cadence='daily' and bin_id='1594'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/716250

Creating custom pfile directory:
/scratch/kocevski/716250/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=652492801.0 && nMetStart<652752001.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=652492801.0 && nMetStart<652752001.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/716250/ft1_4FGL_J1058.0+4305_daily_bin1594.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=652492801.0 && nMetStart<652752001.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/716250/ft1_4FGL_J1058.0+4305_daily_bin1594.fits outfile=/scratch/kocevski/716250/ft1_filteredMKT_4FGL_J1058.0+4305_daily_bin1594.fits ra=164.518 dec=43.0938 rad=12.0 tmin=652492801.0 tmax=652752001.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.57
user 3.32
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/716250/ft1_filteredMKT_4FGL_J1058.0+4305_daily_bin1594.fits evtable="EVENTS" outfile="/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.43
user 0.28
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits" evtable="EVENTS" scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits sctable="SC_DATA" outfile=/scratch/kocevski/716250/ltcube_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.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 /scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits
.....................!
real 9.99
user 9.65
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits evtable="EVENTS" scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits sctable="SC_DATA" expcube=/scratch/kocevski/716250/ltcube_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits outfile=/scratch/kocevski/716250/expmap_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.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 /scratch/kocevski/716250/ltcube_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits
.....................!
real 156.20
user 150.86
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 226 point sources and 0 extended sources

Setting source of interest to:
4FGL J1058.0+4305 @ 164.518 43.0938

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits outfile=/scratch/kocevski/716250/cmap_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.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.518 yref=43.0938 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.48
user 0.32
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits outfile=/scratch/kocevski/716250/cmap_HighResolution_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.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.518 yref=43.0938 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.49
user 0.32
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits evtable="EVENTS" scfile=/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/716250/Model_4FGL_J1058.0+4305_daily_bin1594.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...
/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits.....................!
real 36.45
user 34.87
sys 1.12

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits', '/scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits', expMap='/scratch/kocevski/716250/expmap_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits', expCube='/scratch/kocevski/716250/ltcube_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/716250/Model_4FGL_J1058.0+4305_daily_bin1594.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1058.0+4305'

4FGL J1058.0+4305
   Spectrum: PowerLaw
355    Prefactor:  7.092e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
356        Index:  2.346e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
357        Scale:  1.363e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/716250/ft1_filtered_4FGL_J1058.0+4305_daily_bin1594.fits
Spacecraft file(s): /scratch/kocevski/716250/ft2_4FGL_J1058.0+4305_daily_bin1594.fits
Exposure map: /scratch/kocevski/716250/expmap_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits
Exposure cube: /scratch/kocevski/716250/ltcube_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/716250/Model_4FGL_J1058.0+4305_daily_bin1594.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) = 4708.90257221

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    15.731       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .40406       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    3.2949       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.4944       1.0000         .10000E-03   10000.    
     6 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.3326       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .12205E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    25.931       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    15.076       1.0000         .10000E-03   10000.    
    13 'Prefactor '    125.75       1.0000         .10000E-03   10000.    
    14 'Prefactor '    31.709       1.0000         .10000E-03   10000.    
    15 'norm      '    1.6587       1.0000         .10000E-03   10000.    
    16 'Prefactor '    25.638       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10137E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    47.070       1.0000         .10000E-03   10000.    
    19 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.9846       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    4.6902       1.0000         .10000E-03   10000.    
    24 'Prefactor '    15.307       1.0000         .10000E-03   10000.    
    25 'Prefactor '    52.601       1.0000         .10000E-03   10000.    
    26 'norm      '    .77494       1.0000         .10000E-03   10000.    
    27 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    1.6071       1.0000         .10000E-03   10000.    
    29 'Prefactor '    54.415       1.0000         .10000E-03   10000.    
    30 'Prefactor '    64.018       1.0000         .10000E-03   10000.    
    31 'Normalizat'    1.0732       1.0000         .10000E-01   10.000    
    32 'Prefactor '    .62922       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7170E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4708.900     FROM MIGRAD    STATUS=CONVERGED    820 CALLS     4413 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          15.733        11.185        .51897E-07   -.19223E-04
   2  Prefactor     .41796        6.1020       -.24208E-05   -.55004E-03
   3  Prefactor     .10000E-03    12.803        .12879E-05** at limit **
   4  norm          3.2955        2.7217        .23752E-06   -.11775E-03
   5  Prefactor     7.4794        7.0407        .54631E-05    .48512E-03
   6  norm          .10000E-03    2.8217       -.15835E-07** at limit **
   7  Prefactor     .10000E-03    25.490        .36532E-05** at limit **
   8  Prefactor     1.3332        1.9817        .32331E-06    .52798E-04
   9  Prefactor     .10002E-03    6.1119        .70379E-06** at limit **
  10  Prefactor     25.907        28.012       -.22346E-04   -.34793E-04
  11  Prefactor     .10000E-03    33.529        .36587E-05** at limit **
  12  Prefactor     15.077        32.425       -.11705E-07   -.18965E-03
  13  Prefactor     125.78        102.20        .25173E-04   -.13329E-04
  14  Prefactor     31.724        41.935        .18816E-04   -.17975E-04
  15  norm          1.6588        .41951       -.18884E-07   -.21156E-03
  16  Prefactor     25.639        19.013        .99761E-06   -.33916E-04
  17  Prefactor     .10000E-03    17.748        .50821E-06** at limit **
  18  Prefactor     47.074        53.878        .51347E-05   -.87325E-05
  19  norm          .10000E-03    5.3521       -.27236E-06** at limit **
  20  norm          .10000E-03    19.620       -.28484E-05** at limit **
  21  Prefactor     1.9850        3.2322        .11101E-05   -.44021E-03
  22  Prefactor     .10000E-03    23.360       -.53339E-06** at limit **
  23  norm          4.6905        2.9115       -.87538E-06   -.13223E-03
  24  Prefactor     15.311        11.698       -.23324E-07   -.87864E-04
  25  Prefactor     52.613        44.294        .12230E-04   -.17030E-04
  26  norm          .77500        1.1529       -.69198E-06   -.34338E-03
  27  norm          .10000E-03    3.2926       -.84279E-08** at limit **
  28  Prefactor     1.6127        5.1414        .13413E-04    .16239E-03
  29  Prefactor     54.420        53.043        .57215E-05   -.73635E-05
  30  Prefactor     63.986        42.728       -.30089E-04   -.32626E-03
  31  Normalizat    1.0727        .18950       -.32124E-05    .37234E-04
  32  Prefactor     .62958        .22849       -.24056E-06   -.15100E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 15.7329
  Prefactor  = 0.417963
  Prefactor  = 0.0001
  norm       = 3.2955
  Prefactor  = 7.47945
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.33318
  Prefactor  = 0.000100019
  Prefactor  = 25.9067
  Prefactor  = 0.0001
  Prefactor  = 15.0765
  Prefactor  = 125.783
  Prefactor  = 31.724
  norm       = 1.65876
  Prefactor  = 25.6393
  Prefactor  = 0.0001
  Prefactor  = 47.0744
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 1.98499
  Prefactor  = 0.0001
  norm       = 4.69052
  Prefactor  = 15.3111
  Prefactor  = 52.6131
  norm       = 0.774997
  norm       = 0.0001
  Prefactor  = 1.61274
  Prefactor  = 54.4203
  Prefactor  = 63.9859
  Normalizat = 1.07275
  Prefactor  = 0.629584
 **********
 **   18 **HESSE 
 **********

 FCN=   4708.900     FROM HESSE     STATUS=OK           665 CALLS     5078 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          15.733        11.186        .10098E-03   -1.4914    
   2  Prefactor     .41796        34.263        .26851E-02   -1.5579    
   3  Prefactor     .10000E-03    12.824        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          3.2955        2.7175        .99031E-04   -1.5345    
   5  Prefactor     7.4794        7.9684        .13887E-03   -1.5161    
   6  norm          .10000E-03    2.8243        .11257E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.517        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.3332        1.9468        .11439E-03   -1.5477    
   9  Prefactor     .10002E-03    18.926        .31623E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     25.907        27.807        .78667E-04   -1.4690    
  11  Prefactor     .10000E-03    33.541        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     15.077        32.435        .51576E-03   -1.4931    
  13  Prefactor     125.78        102.17        .17948E-03   -1.3460    
  14  Prefactor     31.724        41.935        .71156E-04   -1.4581    
  15  norm          1.6588        .42095        .21034E-04   -1.5450    
  16  Prefactor     25.639        19.038        .79116E-04   -1.4695    
  17  Prefactor     .10000E-03    17.981        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     47.074        53.870        .58444E-04   -1.4335    
  19  norm          .10000E-03    5.3573        .15503E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    19.621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     1.9850        3.1705        .13881E-03   -1.5426    
  22  Prefactor     .10000E-03    23.364        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          4.6905        2.9023        .86691E-04   -1.5275    
  24  Prefactor     15.311        11.594        .10237E-03   -1.4925    
  25  Prefactor     52.613        44.243        .55300E-04   -1.4256    
  26  norm          .77500        1.1506        .49385E-04   -1.5532    
  27  norm          .10000E-03    3.2927        .12161E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     1.6127        5.0013        .22380E-03   -1.5454    
  29  Prefactor     54.420        53.020        .54376E-04   -1.4231    
  30  Prefactor     63.986        42.058        .50155E-04   -1.4106    
  31  Normalizat    1.0727        .21755        .21418E-03   -.90632    
  32  Prefactor     .62958        .26103        .34022E-03   -1.0635    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.78757e-09
Minuit parameter uncertainties:
  1  11.1877
  2  7.57206
  3  2.09025e-05
  4  2.71764
  5  7.96953
  6  4.94562e-06
  7  9.03628e-05
  8  1.94693
  9  0.00119203
  10  27.821
  11  2.59995e-05
  12  32.473
  13  102.312
  14  41.9737
  15  0.420953
  16  19.0421
  17  1.65757e-05
  18  53.9257
  19  1.0521e-06
  20  8.52951e-07
  21  3.17075
  22  2.57659e-05
  23  2.90237
  24  11.5955
  25  44.2707
  26  1.15067
  27  2.43386e-06
  28  5.00262
  29  53.0655
  30  42.0777
  31  0.217728
  32  0.261533
Done.

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

Extracting fit parameters...

4FGL J1058.0+4305
   Spectrum: PowerLaw
355    Prefactor:  1.258e+02  1.023e+02  1.000e-04  1.000e+04 ( 1.000e-14)
356        Index:  2.346e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
357        Scale:  1.363e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
714    Prefactor:  6.296e-01  2.615e-01  0.000e+00  1.000e+01 ( 1.000e+00)
715        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
716        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
713   Normalization:  1.073e+00  2.177e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.23
Ra Dec: 164.518 43.094
Photon Index (Fixed Index): 2.35 +/- 0.00
Photon Flux (Fixed Index): 4.29e-08 +/- 3.49e-08
Energy Flux (Fixed Index): 1.52e-05 +/- 1.23e-05

TS (Fixed Index): 2.23
Ra Dec: 164.518 43.094
Photon Flux Upper Limit: 1.18e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.07e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/716250/likelihoodResults_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.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) = 4708.78520597
delta logL = 0.114881381503

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4708.77880145
delta logL = 0.121285900935

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    80.743       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6742       1.0000          .0000       10.000    
     3 'Normalizat'    1.0598       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .64033       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7170E+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=   4708.779     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      285 TOTAL
                     EDM=   .98E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     80.609        130.31        .22348E-03   -.29669E-03
   2  Index         2.6763        .82406        .46837E-02   -.25934E-03
   3  Normalizat    1.0601        .21145        .21523E-03    .43179E-03
   4  Prefactor     .64063        .26119        .33752E-03    .16229E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 80.6091
  Index      = 2.67631
  Normalizat = 1.0601
  Prefactor  = 0.640629
 **********
 **   18 **HESSE 
 **********

 FCN=   4708.779     FROM HESSE     STATUS=OK            25 CALLS      310 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     80.609        112.48        .44697E-04   -1.3910    
   2  Index         2.6763        .71138        .18735E-03   -.48334    
   3  Normalizat    1.0601        .21141        .43047E-04   -.91043    
   4  Prefactor     .64063        .26108        .13501E-04   -1.0590    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05584e-09
Minuit parameter uncertainties:
  1  112.781
  2  0.71448
  3  0.21158
  4  0.261578
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/716250': No such file or directory
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) = 4708.77877791
delta logL = 0.121309435553

Extracting fit parameters...

4FGL J1058.0+4305
   Spectrum: PowerLaw
355    Prefactor:  8.061e+01  1.128e+02  1.000e-04  1.000e+04 ( 1.000e-14)
356        Index:  2.676e+00  7.145e-01  0.000e+00  1.000e+01 (-1.000e+00)
357        Scale:  1.363e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
714    Prefactor:  6.406e-01  2.616e-01  0.000e+00  1.000e+01 ( 1.000e+00)
715        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
716        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
713   Normalization:  1.060e+00  2.116e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.46
Ra Dec: 164.518 43.094
Photon Index (Free Index): 2.68 +/- 0.71
Photon Flux (Free Index): 5.24e-08 +/- 4.23e-08
Energy Flux (Free Index): 1.28e-05 +/- 1.06e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/716250/cmap_HighResolution_652492801_652752001_4FGL_J1058.0+4305_daily_bin1594.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/716250

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.07e-03', comment='SUCCESS', photon_flux='4.29e-08', energy_flux2='1.28e-05', photon_flux_error='3.49e-08', dlogl='1.21e-01', energy_flux='1.52e-05', photon_flux2='5.24e-08', job_status='DONE', time_completed='2021-09-08 00:35:31.585701', photon_index_error2='0.71', photon_index2='2.68', ts='2.23', fit_tolerance='1e-08', GAL='0.63', photon_index_error='0.00', photon_flux_upper_limit='1.18e-07', energy_flux_error2='1.06e-05', EG='1.07', time_epoch_completed='1631086531.59', return_code='0', job_id='716250', GAL2='0.64', EG2='1.06', return_code2='0', energy_flux_error='1.23e-05', photon_flux_error2='4.23e-08', ts2='2.46', photon_index='2.35' WHERE bin_id='1594' AND source_name='4FGL J1058.0+4305' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 00:35:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0023>
Subject: Job 716250: <4FGL_J1058.0+4305_daily_bin1594> in cluster <slac> Done

Job <4FGL_J1058.0+4305_daily_bin1594> was submitted from host <rhel6-64a> by user <kocevski> in cluster <slac> at Wed Sep  8 00:20:29 2021
Job was executed on host(s) <bullet0023>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 00:20:48 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 00:20:48 2021
Terminated at Wed Sep  8 00:35:32 2021
Results reported at Wed Sep  8 00:35:32 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1058.0+4305_daily_bin1594 164.518 43.0938 652492801 652752001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1058.0+4305 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   747.45 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             288.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   883 sec.
    Turnaround time :                            903 sec.

The output (if any) is above this job summary.

