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


Performing analysis on: 4FGL_J1604.6+5714_daily_bin808
RA = 241.158, Dec = 57.2381
tmin = 448761601, tmax = 449020801
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='9064', job_status='RUN', time_executed='2021-09-13 07:09:41.068494', time_epoch_executed='1631542181.07' WHERE source_name='4FGL J1604.6+5714' and cadence='daily' and bin_id='808'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/9064

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/9064/ft1_4FGL_J1604.6+5714_daily_bin808.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/9064/ft1_4FGL_J1604.6+5714_daily_bin808.fits outfile=/scratch/kocevski/9064/ft1_filteredMKT_4FGL_J1604.6+5714_daily_bin808.fits ra=241.158 dec=57.2381 rad=12.0 tmin=448761601.0 tmax=449020801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 5.81
user 5.52
sys 0.25

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.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/9064/ft1_filteredMKT_4FGL_J1604.6+5714_daily_bin808.fits evtable="EVENTS" outfile="/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.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.51
user 0.35
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits" evtable="EVENTS" scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits sctable="SC_DATA" outfile=/scratch/kocevski/9064/ltcube_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.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/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits
.....................!
real 13.28
user 12.93
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits evtable="EVENTS" scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits sctable="SC_DATA" expcube=/scratch/kocevski/9064/ltcube_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits outfile=/scratch/kocevski/9064/expmap_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.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/9064/ltcube_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits
.....................!
real 191.10
user 186.09
sys 3.90

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

Setting source of interest to:
4FGL J1604.6+5714 @ 241.158 57.2381

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits outfile=/scratch/kocevski/9064/cmap_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.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=241.158 yref=57.2381 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.54
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits outfile=/scratch/kocevski/9064/cmap_HighResolution_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.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=241.158 yref=57.2381 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.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits evtable="EVENTS" scfile=/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/9064/Model_4FGL_J1604.6+5714_daily_bin808.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/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits.....................!
real 35.15
user 33.92
sys 1.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits', '/scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits', expMap='/scratch/kocevski/9064/expmap_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits', expCube='/scratch/kocevski/9064/ltcube_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/9064/Model_4FGL_J1604.6+5714_daily_bin808.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1604.6+5714'

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  8.996e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.348e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/9064/ft1_filtered_4FGL_J1604.6+5714_daily_bin808.fits
Spacecraft file(s): /scratch/kocevski/9064/ft2_4FGL_J1604.6+5714_daily_bin808.fits
Exposure map: /scratch/kocevski/9064/expmap_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits
Exposure cube: /scratch/kocevski/9064/ltcube_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/9064/Model_4FGL_J1604.6+5714_daily_bin808.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) = 3436.25995709

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10235E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .37657E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.7916       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    11.962       1.0000         .10000E-03   10000.    
     9 'Prefactor '    105.55       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    10.268       1.0000         .10000E-03   10000.    
    13 'Prefactor '    56.010       1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.0314       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10191E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.3722       1.0000         .10000E-03   10000.    
    17 'norm      '    49.159       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.6683       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    10.982       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .12160E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    6.3390       1.0000         .10000E-03   10000.    
    23 'Prefactor '    18.478       1.0000         .10000E-03   10000.    
    24 'Prefactor '    7.6752       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .69218       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0838       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7070E+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=   3436.232     FROM MIGRAD    STATUS=CONVERGED   1287 CALLS     4289 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    54.825        .18142E-02** at limit **
   2  Prefactor     .10000E-03    53.398        .18142E-02** at limit **
   3  norm          .10000E-03    2.9714        .15814E-02** at limit **
   4  Prefactor     .10000E-03    205.84        .43867E-02** at limit **
   5  Prefactor     2.7946        15.498        .24351E-03   -.39193E-04
   6  Prefactor     .10000E-03    19.175        .18142E-02** at limit **
   7  Prefactor     .10000E-03    80.633        .18142E-02** at limit **
   8  norm          11.961        6.0052        .96536E-04    .70895E-04
   9  Prefactor     105.57        125.47        .19571E-03   -.11240E-04
  10  Prefactor     .10000E-03    3.3989        .10550E-02** at limit **
  11  norm          .10000E-03    2.8697        .96938E-03** at limit **
  12  Prefactor     10.248        76.320        .12504E-03    .15638E-04
  13  Prefactor     55.981        95.033        .53600E-04    .22886E-04
  14  Prefactor     7.0308        8.6954        .15129E-03   -.13211E-03
  15  Prefactor     .10000E-03    53.146        .18142E-02** at limit **
  16  Prefactor     3.3688        10.717        .22035E-03   -.51748E-04
  17  norm          49.151        35.436        .57194E-04    .32798E-05
  18  Prefactor     3.6664        4.7317        .13899E-03   -.53411E-04
  19  Prefactor     .10000E-03    3.5797        .10816E-02** at limit **
  20  norm          10.982        10.487        .12090E-03    .11284E-05
  21  Prefactor     .10000E-03    5.2556        .19602E-02** at limit **
  22  Prefactor     6.3345        13.779        .15942E-03   -.35085E-04
  23  Prefactor     18.477        21.966        .93173E-04    .14642E-05
  24  Prefactor     7.6764        10.742        .14475E-03   -.20303E-04
  25  Prefactor     .10000E-03    4.4724        .12085E-02** at limit **
  26  Prefactor     .10000E-03    9.7758        .17824E-02** at limit **
  27  Prefactor     .10000E-03    37.508        .18142E-02** at limit **
  28  Normalizat    .69258        .28725        .27603E-03    .30725E-04
  29  Prefactor     1.0834        .26598        .22347E-03    .10331E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 0.000100001
  Prefactor  = 2.79457
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  norm       = 11.9611
  Prefactor  = 105.567
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.2478
  Prefactor  = 55.9815
  Prefactor  = 7.03084
  Prefactor  = 0.0001
  Prefactor  = 3.36882
  norm       = 49.1508
  Prefactor  = 3.6664
  Prefactor  = 0.0001
  norm       = 10.9822
  Prefactor  = 0.0001
  Prefactor  = 6.33448
  Prefactor  = 18.4774
  Prefactor  = 7.67642
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.692579
  Prefactor  = 1.08343
 **********
 **   18 **HESSE 
 **********

 FCN=   3436.232     FROM HESSE     STATUS=OK           523 CALLS     4812 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    54.826        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    53.416        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    2.9761        .31628E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    209.98        .17547E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.7946        15.340        .97406E-05   -1.5374    
   6  Prefactor     .10000E-03    19.177        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    80.648        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          11.961        6.0050        .38614E-05   -1.5016    
   9  Prefactor     105.57        125.47        .78283E-05   -1.3649    
  10  Prefactor     .10000E-03    3.3989        .21100E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    2.8698        .19388E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     10.248        76.285        .50018E-05   -1.5068    
  13  Prefactor     55.981        95.001        .10720E-04   -1.4210    
  14  Prefactor     7.0308        8.6929        .60515E-05   -1.5178    
  15  Prefactor     .10000E-03    53.154        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     3.3688        10.708        .88142E-05   -1.5341    
  17  norm          49.151        35.430        .22878E-05   -1.4305    
  18  Prefactor     3.6664        4.7314        .55597E-05   -1.5325    
  19  Prefactor     .10000E-03    3.5799        .21632E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          10.982        10.487        .48359E-05   -1.5045    
  21  Prefactor     .10000E-03    5.2676        .39204E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     6.3345        13.778        .63769E-05   -1.5205    
  23  Prefactor     18.477        21.964        .37269E-05   -1.4848    
  24  Prefactor     7.6764        10.742        .57899E-05   -1.5154    
  25  Prefactor     .10000E-03    4.4727        .24170E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    9.7790        .35648E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    37.508        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .69258        .28722        .11041E-04   -1.0419    
  29  Prefactor     1.0834        .26614        .44694E-04   -.89998    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.43646e-10
Minuit parameter uncertainties:
  1  8.35255e-05
  2  3.97804e-05
  3  9.85063e-05
  4  0.000651221
  5  13.0998
  6  5.2548e-05
  7  0.00101912
  8  6.00533
  9  125.786
  10  1.2378e-06
  11  2.41046e-06
  12  56.0199
  13  95.2592
  14  8.69446
  15  0.000260759
  16  10.7144
  17  35.445
  18  4.73186
  19  1.94122e-06
  20  10.4889
  21  2.68326e-05
  22  13.7846
  23  21.974
  24  10.7449
  25  5.09364e-06
  26  1.43946e-05
  27  6.99437e-05
  28  0.287842
  29  0.266464
Done.

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

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.000e-04  2.410e-06  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.348e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
704    Prefactor:  1.083e+00  2.665e-01  0.000e+00  1.000e+01 ( 1.000e+00)
705        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
706        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
703   Normalization:  6.926e-01  2.878e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 241.158 57.238
Photon Flux Upper Limit: 6.56e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.15e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/9064/likelihoodResults_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.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) = 3436.23345586
delta logL = -0.00159258899203

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3436.23186329
delta logL = -2.03617673833e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.3451       1.0000          .0000       5.0000    
     3 'Normalizat'    .69255       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0835       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7070E+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=   3436.232     FROM MIGRAD    STATUS=CONVERGED     94 CALLS      238 TOTAL
                     EDM=   .17E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    3.8657        .96986E-03** at limit **
   2  alpha         2.1109        3.1503        .16501       -.20325E-08
   3  Normalizat    .69258        .25156        .27603E-03    .24280E-04
   4  Prefactor     1.0834        .25164        .22347E-03    .32279E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.11089
  Normalizat = 0.69258
  Prefactor  = 1.08343
 **********
 **   18 **HESSE 
 **********

 FCN=   3436.232     FROM HESSE     STATUS=OK            23 CALLS      261 TOTAL
                     EDM=   .16E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    2.9215        .19397E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.1109        2.7086        .66003E-02   -.15628    
   3  Normalizat    .69258        .25180        .11041E-04   -1.0419    
   4  Prefactor     1.0834        .25189        .89389E-05   -.89998    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.59832e-12
Minuit parameter uncertainties:
  1  1.45732e-08
  2  286.698
  3  0.252224
  4  0.25217
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/9064': 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) = 3436.23186296
delta logL = 3.08456947096e-07

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.000e-04  1.457e-08  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.111e+00  2.867e+02  0.000e+00  5.000e+00 ( 1.000e+00)
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
704    Prefactor:  1.083e+00  2.522e-01  0.000e+00  1.000e+01 ( 1.000e+00)
705        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
706        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
703   Normalization:  6.926e-01  2.522e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 241.158 57.238

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/9064/cmap_HighResolution_448761601_449020801_4FGL_J1604.6+5714_daily_bin808.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.15e-05', job_status='DONE', photon_flux_upper_limit='6.56e-08', time_completed='2021-09-13 07:21:25.770086', job_id='9064', GAL2='1.08', fit_tolerance='1e-08', EG2='0.69', EG='0.69', time_epoch_completed='1631542885.77', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.08', dlogl='3.08e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.35' WHERE bin_id='808' AND source_name='4FGL J1604.6+5714' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 13 07:21:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0041>
Subject: Job 9064: <4FGL_J1604.6+5714_daily_bin808> in cluster <slac> Done

Job <4FGL_J1604.6+5714_daily_bin808> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Mon Sep 13 07:05:26 2021
Job was executed on host(s) <bullet0041>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 13 07:07:34 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 13 07:07:34 2021
Terminated at Mon Sep 13 07:21:26 2021
Results reported at Mon Sep 13 07:21:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1604.6+5714_daily_bin808 241.158 57.2381 448761601 449020801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1604.6+5714 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   702.42 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             293.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   832 sec.
    Turnaround time :                            960 sec.

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

