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


Performing analysis on: 4FGL_J1657.0+6010_monthly_bin147
RA = 254.258, Dec = 60.1676
tmin = 618019201, tmax = 620611201
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='112848', job_status='RUN', time_executed='2021-10-29 18:15:15.660498', time_epoch_executed='1635556515.66' WHERE source_name='4FGL J1657.0+6010' and cadence='monthly' and bin_id='147'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/112848

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

Retrieving the FT1 file...

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

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

Retrieving 458 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/112848/ft1_4FGL_J1657.0+6010_monthly_bin147.fits


Retrieving the FT1 file...

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

Retrieving 458 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/112848/ft1_4FGL_J1657.0+6010_monthly_bin147.fits outfile=/scratch/kocevski/112848/ft1_filteredMKT_4FGL_J1657.0+6010_monthly_bin147.fits ra=254.258 dec=60.1676 rad=12.0 tmin=618019201.0 tmax=620611201.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 33.93
user 33.10
sys 0.75

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.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/112848/ft1_filteredMKT_4FGL_J1657.0+6010_monthly_bin147.fits evtable="EVENTS" outfile="/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.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.84
user 0.61
sys 0.21

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits" evtable="EVENTS" scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits sctable="SC_DATA" outfile=/scratch/kocevski/112848/ltcube_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.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/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits
.....................!
real 114.30
user 113.75
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits evtable="EVENTS" scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits sctable="SC_DATA" expcube=/scratch/kocevski/112848/ltcube_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits outfile=/scratch/kocevski/112848/expmap_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.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/112848/ltcube_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits
.....................!
real 191.57
user 185.97
sys 5.24

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

Setting source of interest to:
4FGL J1657.0+6010 @ 254.258 60.1676

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits outfile=/scratch/kocevski/112848/cmap_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.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=254.258 yref=60.1676 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.77
user 0.61
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits outfile=/scratch/kocevski/112848/cmap_HighResolution_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.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=254.258 yref=60.1676 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.81
user 0.62
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits evtable="EVENTS" scfile=/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/112848/Model_4FGL_J1657.0+6010_monthly_bin147.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/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits.....................!
real 592.75
user 589.60
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits', '/scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits', expMap='/scratch/kocevski/112848/expmap_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits', expCube='/scratch/kocevski/112848/ltcube_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/112848/Model_4FGL_J1657.0+6010_monthly_bin147.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1657.0+6010'

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  3.318e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/112848/ft1_filtered_4FGL_J1657.0+6010_monthly_bin147.fits
Spacecraft file(s): /scratch/kocevski/112848/ft2_4FGL_J1657.0+6010_monthly_bin147.fits
Exposure map: /scratch/kocevski/112848/expmap_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits
Exposure cube: /scratch/kocevski/112848/ltcube_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/112848/Model_4FGL_J1657.0+6010_monthly_bin147.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) = 81256.1742944

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.3574       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.1196       1.0000         .10000E-03   10000.    
     4 'norm      '    7.4618       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10343       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12929       1.0000         .10000E-03   10000.    
     7 'norm      '    34.724       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.5403       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.0880       1.0000         .10000E-03   10000.    
    10 'norm      '    6.0857       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .71043       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.7859       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .61447       1.0000         .10000E-03   10000.    
    14 'norm      '    .32902       1.0000         .10000E-03   10000.    
    15 'Prefactor '    12.193       1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.9842       1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.0987       1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.9785       1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.9148       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10058E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    4.8377       1.0000         .10000E-03   10000.    
    22 'Prefactor '    7.1379       1.0000         .10000E-03   10000.    
    23 'Prefactor '    5.8860       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .71779       1.0000         .10000E-03   10000.    
    25 'norm      '    3.6225       1.0000         .10000E-03   10000.    
    26 'Prefactor '    2.9340       1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.2155       1.0000         .10000E-03   10000.    
    28 'Prefactor '    1.8543       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    6.8682       1.0000         .10000E-03   10000.    
    31 'norm      '    5.0377       1.0000         .10000E-03   10000.    
    32 'Normalizat'    1.0130       1.0000         .10000E-01   10.000    
    33 'Prefactor '    .95363       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7220E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   81256.13     FROM MIGRAD    STATUS=CONVERGED    108 CALLS     3240 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3573        .58357        .18200E-07    .12891E-03
   2  Prefactor     .10000E-03    7.7952        .26939E-05** at limit **
   3  Prefactor     3.1203        1.9352        .19411E-06   -.19734E-03
   4  norm          7.4534        2.3813       -.79731E-07    .87823E-03
   5  Prefactor     .30457        53.868       -.67876E-06   -.44647E-04
   6  Prefactor     .12925        1.1400       -.84588E-06    .61312E-03
   7  norm          34.724        1.0264        .39081E-08    .38321E-03
   8  Prefactor     4.5406        1.5594       -.56894E-06   -.23112E-02
   9  Prefactor     2.0906        1.9423       -.48713E-06   -.18171E-02
  10  norm          6.0863        2.0299       -.38913E-06    .63115E-03
  11  Prefactor     .71070        .54338        .20885E-07    .20641E-03
  12  Prefactor     1.7867        1.6857        .13472E-06    .28132E-03
  13  Prefactor     .61689        5.1513        .59032E-05    .38636E-03
  14  norm          .32904        .14398       -.24134E-08   -.71682E-03
  15  Prefactor     12.194        1.6251       -.30526E-06   -.42823E-03
  16  Prefactor     6.9854        1.0597        .14582E-06    .10887E-03
  17  Prefactor     4.0993        1.5730       -.72804E-06   -.25945E-02
  18  Prefactor     1.9787        1.6300        .42973E-07    .25625E-03
  19  Prefactor     2.9149        .91748        .66572E-08   -.34968E-04
  20  Prefactor     .10000E-03    8.0328       -.13899E-05** at limit **
  21  norm          4.8381        1.1004       -.12658E-06    .61294E-03
  22  Prefactor     7.1386        1.4899       -.11977E-06   -.18055E-03
  23  Prefactor     5.8841        7.2561        .38264E-05    .37866E-02
  24  Prefactor     .70850        27.874        .16863E-04   -.11997E-02
  25  norm          3.6227        .71547       -.72094E-08   -.17511E-03
  26  Prefactor     2.9342        1.0197        .57233E-07    .43683E-03
  27  Prefactor     4.2171        3.1903       -.40079E-06   -.36400E-03
  28  Prefactor     1.8560        1.0768       -.12559E-07   -.31981E-03
  29  Prefactor     .10000E-03    2.5162       -.86602E-06** at limit **
  30  Prefactor     6.8694        1.0150        .92648E-07   -.78159E-04
  31  norm          5.0383        1.9452        .79788E-06   -.27581E-02
  32  Normalizat    1.0129        .63884E-01    .49908E-06   -.17126E-04
  33  Prefactor     .95365        .52117E-01   -.25114E-06    .21118E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.35726
  Prefactor  = 0.0001
  Prefactor  = 3.12032
  norm       = 7.45343
  Prefactor  = 0.304569
  Prefactor  = 0.129251
  norm       = 34.7242
  Prefactor  = 4.54055
  Prefactor  = 2.09063
  norm       = 6.08632
  Prefactor  = 0.710703
  Prefactor  = 1.78666
  Prefactor  = 0.616892
  norm       = 0.329035
  Prefactor  = 12.1942
  Prefactor  = 6.98538
  Prefactor  = 4.0993
  Prefactor  = 1.97871
  Prefactor  = 2.91494
  Prefactor  = 0.0001
  norm       = 4.8381
  Prefactor  = 7.13865
  Prefactor  = 5.88414
  Prefactor  = 0.708504
  norm       = 3.62269
  Prefactor  = 2.93422
  Prefactor  = 4.21715
  Prefactor  = 1.85598
  Prefactor  = 0.0001
  Prefactor  = 6.8694
  norm       = 5.03827
  Normalizat = 1.01289
  Prefactor  = 0.953652
 **********
 **   18 **HESSE 
 **********

 FCN=   81256.13     FROM HESSE     STATUS=OK           807 CALLS     4047 TOTAL
                     EDM=   .47E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3573        .58697        .93766E-02   -1.5475    
   2  Prefactor     .10000E-03    7.9514        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.1203        1.9695        .57390E-02   -1.5355    
   4  norm          7.4534        2.4271        .36705E-02   -1.5162    
   5  Prefactor     .30457        2.4396        .14195       -1.5598    
   6  Prefactor     .12925        .40260        .52532E-01   -1.5636    
   7  norm          34.724        6.2023        .17001E-02   -1.4529    
   8  Prefactor     4.5406        1.8645        .47233E-02   -1.5282    
   9  Prefactor     2.0906        5.6470        .71428E-02   -1.5419    
  10  norm          6.0863        2.2125        .40688E-02   -1.5215    
  11  Prefactor     .71070        .60178        .41718E-01   -1.5539    
  12  Prefactor     1.7867        1.7061        .78269E-02   -1.5441    
  13  Prefactor     .61689        1.5048        .11730       -1.5551    
  14  norm          .32904        .18452        .16282E-01   -1.5593    
  15  Prefactor     12.194        2.4236        .28680E-02   -1.5009    
  16  Prefactor     6.9854        3.6006        .37951E-02   -1.5179    
  17  Prefactor     4.0993        1.8235        .49782E-02   -1.5303    
  18  Prefactor     1.9787        1.7090        .73673E-02   -1.5427    
  19  Prefactor     2.9149        .92424        .59492E-02   -1.5366    
  20  Prefactor     .10000E-03    8.1375        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          4.8381        2.0704        .45724E-02   -1.5268    
  22  Prefactor     7.1386        1.6126        .37536E-02   -1.5174    
  23  Prefactor     5.8841        8.9983        .41381E-02   -1.5223    
  24  Prefactor     .70850        5.3749        .20344       -1.5540    
  25  norm          3.6227        .71684        .53069E-02   -1.5327    
  26  Prefactor     2.9342        2.6689        .59284E-02   -1.5365    
  27  Prefactor     4.2171        3.2218        .49068E-02   -1.5297    
  28  Prefactor     1.8560        4.0118        .76527E-02   -1.5435    
  29  Prefactor     .10000E-03    2.4454        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     6.8694        12.899        .38273E-02   -1.5184    
  31  norm          5.0383        2.0773        .44789E-02   -1.5259    
  32  Normalizat    1.0129        .57210E-01    .44688E-01   -.92600    
  33  Prefactor     .95365        .45300E-01    .45685E-01   -.94291    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.69157e-06
Minuit parameter uncertainties:
  1  0.586976
  2  0.000123461
  3  1.96958
  4  2.42712
  5  1.7238
  6  0.402613
  7  6.20241
  8  1.86457
  9  5.64845
  10  2.21249
  11  0.601787
  12  1.70616
  13  1.50494
  14  0.184515
  15  2.42366
  16  3.6007
  17  1.82351
  18  1.70908
  19  0.924244
  20  3.13731e-05
  21  2.07043
  22  1.61258
  23  9.00036
  24  3.90309
  25  0.716844
  26  2.669
  27  3.22188
  28  4.01234
  29  3.73442e-05
  30  12.9038
  31  2.0773
  32  0.0572136
  33  0.0453017
Done.

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

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  6.169e-01  1.505e+00  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  9.537e-01  4.530e-02  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  1.013e+00  5.721e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.03
Ra Dec: 254.258 60.168
Photon Flux Upper Limit: 1.74e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.35e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/112848/likelihoodResults_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.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): 102
logL (Free Index) = 81254.1471216
delta logL = 1.97885655558

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 81254.0921234
delta logL = 2.03385475671

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .24643E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    5.7600       1.0000          .0000       10.000    
     3 'Normalizat'    .97398       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97485       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7220E+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=   81254.09     FROM MIGRAD    STATUS=FAILED        97 CALLS      305 TOTAL
                     EDM=   .79E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .24613E-01    .30962        .21165E-04    .34550E-02
   2  Index         5.7611        3.0946        .72082E-02    .41980E-02
   3  Normalizat    .97401        .46041E-01    .27391E-03   -.16934E-03
   4  Prefactor     .97484        .38556E-01    .23328E-03   -.44680E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   81254.09     FROM SIMPLEX   STATUS=UNCHANGED     81 CALLS      386 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .24613E-01    .30962        .19381E-04    .34550E-02
   2  Index         5.7611        3.0946        .12834E-02    .41980E-02
   3  Normalizat    .97401        .46041E-01    .73178E-04   -.16934E-03
   4  Prefactor     .97484        .38556E-01    .66348E-04   -.44680E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   81254.09     FROM MIGRAD    STATUS=CONVERGED     32 CALLS      418 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .24614E-01    .31835        .42329E-05    .12892E-03
   2  Index         5.7611        3.1289        .14416E-02    .16640E-03
   3  Normalizat    .97401        .59180E-01    .10956E-04    .43165E-04
   4  Prefactor     .97484        .49292E-01    .93310E-05   -.66279E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0246135
  Index      = 5.76111
  Normalizat = 0.974006
  Prefactor  = 0.974838
 **********
 **   18 **HESSE 
 **********

 FCN=   81254.09     FROM HESSE     STATUS=OK            25 CALLS      443 TOTAL
                     EDM=   .92E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .24614E-01    .17152        .16932E-06   -1.5677    
   2  Index         5.7611        2.3817        .28833E-03    .15282    
   3  Normalizat    .97401        .63177E-01    .21913E-05   -.93906    
   4  Prefactor     .97484        .52536E-01    .18662E-05   -.93573    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.1563e-12
Minuit parameter uncertainties:
  1  0.129686
  2  2.48508
  3  0.0631819
  4  0.0525383
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/112848': 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) = 81254.0921203
delta logL = 2.03385781076

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  2.461e-02  1.297e-01  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  5.761e+00  2.485e+00  0.000e+00  1.000e+01 (-1.000e+00)
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  9.748e-01  5.254e-02  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  9.740e-01  6.318e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.43
Ra Dec: 254.258 60.168
Photon Index (Free Index): 5.76 +/- 2.49
Photon Flux (Free Index): 2.88e-08 +/- 1.51e-08
Energy Flux (Free Index): 3.63e-06 +/- 2.03e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/112848/cmap_HighResolution_618019201_620611201_4FGL_J1657.0+6010_monthly_bin147.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.35e-03', comment='SUCCESS', energy_flux2='3.63e-06', dlogl='2.03e+00', photon_flux2='2.88e-08', job_status='DONE', time_completed='2021-10-29 21:00:45.529842', photon_index_error2='2.49', photon_index2='5.76', ts='0.03', fit_tolerance='1e-08', GAL='0.95', photon_index_error='0.00', photon_flux_upper_limit='1.74e-08', energy_flux_error2='2.03e-06', EG='1.01', time_epoch_completed='1635566445.53', return_code='0', job_id='112848', GAL2='0.97', EG2='0.97', return_code2='0', photon_flux_error2='1.51e-08', ts2='4.43', photon_index='2.45' WHERE bin_id='147' AND source_name='4FGL J1657.0+6010' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Fri Oct 29 21:00:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0290>
Subject: Job 112848: <4FGL_J1657.0+6010_monthly_bin147> in cluster <slac> Done

Job <4FGL_J1657.0+6010_monthly_bin147> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri Oct 29 18:10:13 2021
Job was executed on host(s) <bullet0290>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Oct 29 18:14:03 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Oct 29 18:14:03 2021
Terminated at Fri Oct 29 21:00:46 2021
Results reported at Fri Oct 29 21:00:46 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1657.0+6010_monthly_bin147 254.258 60.1676 618019201 620611201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1657.0+6010 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9716.00 sec.
    Max Memory :                                 631 MB
    Average Memory :                             429.34 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   10003 sec.
    Turnaround time :                            10233 sec.

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

