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


Performing analysis on: 4FGL_J1604.6+5714_daily_bin578
RA = 241.158, Dec = 57.2381
tmin = 389145601, tmax = 389404801
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='6189', job_status='RUN', time_executed='2021-09-13 06:55:53.467041', time_epoch_executed='1631541353.47' WHERE source_name='4FGL J1604.6+5714' and cadence='daily' and bin_id='578'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/6189

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/6189/ft1_4FGL_J1604.6+5714_daily_bin578.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/6189/ft1_4FGL_J1604.6+5714_daily_bin578.fits outfile=/scratch/kocevski/6189/ft1_filteredMKT_4FGL_J1604.6+5714_daily_bin578.fits ra=241.158 dec=57.2381 rad=12.0 tmin=389145601.0 tmax=389404801.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.73
user 5.44
sys 0.26

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.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/6189/ft1_filteredMKT_4FGL_J1604.6+5714_daily_bin578.fits evtable="EVENTS" outfile="/scratch/kocevski/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.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.54
user 0.36
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits" evtable="EVENTS" scfile=/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits sctable="SC_DATA" outfile=/scratch/kocevski/6189/ltcube_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.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/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits
.....................!
real 16.70
user 16.23
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits evtable="EVENTS" scfile=/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits sctable="SC_DATA" expcube=/scratch/kocevski/6189/ltcube_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits outfile=/scratch/kocevski/6189/expmap_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.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/6189/ltcube_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits
.....................!
real 191.59
user 186.20
sys 4.60

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/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits scfile=/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits outfile=/scratch/kocevski/6189/cmap_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.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.56
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits scfile=/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits outfile=/scratch/kocevski/6189/cmap_HighResolution_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.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.57
user 0.39
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits', '/scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits', expMap='/scratch/kocevski/6189/expmap_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits', expCube='/scratch/kocevski/6189/ltcube_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/6189/Model_4FGL_J1604.6+5714_daily_bin578.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/6189/ft1_filtered_4FGL_J1604.6+5714_daily_bin578.fits
Spacecraft file(s): /scratch/kocevski/6189/ft2_4FGL_J1604.6+5714_daily_bin578.fits
Exposure map: /scratch/kocevski/6189/expmap_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits
Exposure cube: /scratch/kocevski/6189/ltcube_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/6189/Model_4FGL_J1604.6+5714_daily_bin578.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) = 6032.29292599

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .29722E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.4425       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .15112E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    19.711       1.0000         .10000E-03   10000.    
     8 'norm      '    8.6268       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.9203       1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.9241       1.0000         .10000E-03   10000.    
    11 'norm      '    .10267E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10055E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.7181       1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    7.6785       1.0000         .10000E-03   10000.    
    20 'norm      '    7.4854       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    24.169       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .75915E-01   1.0000         .10000E-03   10000.    
    24 'Prefactor '    3.0595       1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.1895       1.0000         .10000E-03   10000.    
    26 'Prefactor '    3.1461       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.0192       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .94943       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.

 FCN=   6032.167     FROM MIGRAD    STATUS=CONVERGED    735 CALLS     3162 TOTAL
                     EDM=   .10E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    42.841        .13954E-05** at limit **
   2  Prefactor     .10000E-03    4.8107       -.61370E-08** at limit **
   3  norm          .10000E-03    .53931       -.62638E-08** at limit **
   4  Prefactor     .10007E-03    7.3864       -.86967E-06** at limit **
   5  Prefactor     3.4537        10.240        .40341E-06    .96389E-04
   6  Prefactor     .10000E-03    10.937       -.71045E-07** at limit **
   7  Prefactor     19.639        34.165       -.36205E-06   -.67650E-05
   8  norm          8.6278        3.6286       -.19083E-06   -.81043E-04
   9  Prefactor     7.7405        275.68        .24263E-04    .37251E-05
  10  Prefactor     7.9239        7.5113       -.11571E-07   -.29462E-05
  11  norm          .10000E-03    7.4578       -.55747E-07** at limit **
  12  Prefactor     .10000E-03    43.479        .73399E-06** at limit **
  13  Prefactor     .10000E-03    47.227       -.24461E-05** at limit **
  14  Prefactor     .10000E-03    2.3977       -.93923E-09** at limit **
  15  Prefactor     .10000E-03    15.525        .52543E-07** at limit **
  16  Prefactor     6.7164        6.5516        .18983E-06    .10577E-04
  17  norm          .10000E-03    7.7389        .35359E-07** at limit **
  18  Prefactor     .10000E-03    2.2399       -.68763E-08** at limit **
  19  Prefactor     7.6789        7.1745        .25659E-06   -.90137E-05
  20  norm          7.4863        9.3450        .21106E-06   -.73437E-05
  21  Prefactor     .10000E-03    2.9984        .41447E-08** at limit **
  22  Prefactor     24.167        12.687        .94358E-07   -.29172E-05
  23  Prefactor     .10010E-03    13.170        .25213E-06** at limit **
  24  Prefactor     3.0586        7.1992        .16378E-05    .52785E-04
  25  Prefactor     4.1897        4.6621       -.20300E-07   -.25765E-04
  26  Prefactor     3.1461        4.7001        .10888E-06   -.27455E-05
  27  Prefactor     .10000E-03    28.001       -.24790E-06** at limit **
  28  Normalizat    1.0192        .18898        .27938E-06    .17706E-04
  29  Prefactor     .94954        .17701       -.13296E-05    .18547E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100069
  Prefactor  = 3.45366
  Prefactor  = 0.0001
  Prefactor  = 19.6392
  norm       = 8.62781
  Prefactor  = 7.74046
  Prefactor  = 7.92392
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.71635
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.67888
  norm       = 7.48632
  Prefactor  = 0.0001
  Prefactor  = 24.1668
  Prefactor  = 0.000100101
  Prefactor  = 3.0586
  Prefactor  = 4.1897
  Prefactor  = 3.14606
  Prefactor  = 0.0001
  Normalizat = 1.01922
  Prefactor  = 0.949541
 **********
 **   18 **HESSE 
 **********

 FCN=   6032.167     FROM HESSE     STATUS=OK           563 CALLS     3725 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    42.935        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    4.8115        .16638E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    .54351        .55699E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10007E-03    50.771        .38037E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.4537        9.9921        .21799E-03   -1.5336    
   6  Prefactor     .10000E-03    11.000        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     19.639        34.145        .90214E-04   -1.4821    
   8  norm          8.6278        3.6306        .91189E-04   -1.5120    
   9  Prefactor     7.7405        278.45        .14247E-03   -1.5151    
  10  Prefactor     7.9239        7.5090        .14244E-03   -1.5145    
  11  norm          .10000E-03    7.5277        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    43.576        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    47.337        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.4058        .11744E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    15.576        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     6.7164        6.5491        .15481E-03   -1.5190    
  17  norm          .10000E-03    7.7479        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.2680        .11350E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     7.6789        7.2095        .72358E-03   -1.5154    
  20  norm          7.4863        9.3285        .73293E-03   -1.5161    
  21  Prefactor     .10000E-03    3.1159        .26230E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     24.167        12.681        .81481E-04   -1.4724    
  23  Prefactor     .10010E-03    15.771        .82214E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     3.0586        7.2198        .11596E-02   -1.5358    
  25  Prefactor     4.1897        4.6515        .17012E-03   -1.5299    
  26  Prefactor     3.1461        4.6861        .19964E-03   -1.5353    
  27  Prefactor     .10000E-03    28.015        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.0192        .22233        .24072E-03   -.92389    
  29  Prefactor     .94954        .20510        .24723E-03   -.94431    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.35874e-09
Minuit parameter uncertainties:
  1  5.35762e-05
  2  2.09576e-08
  3  2.74933e-07
  4  0.00375769
  5  9.99692
  6  2.1554e-06
  7  34.1791
  8  3.63068
  9  93.3234
  10  7.5099
  11  4.38568e-06
  12  1.57376e-05
  13  6.96917e-05
  14  1.0169e-06
  15  6.47561e-06
  16  6.5498
  17  1.1883e-06
  18  1.57903e-06
  19  7.21032
  20  9.33032
  21  4.467e-06
  22  12.6824
  23  0.00252714
  24  7.2219
  25  4.65194
  26  4.68661
  27  3.92421e-06
  28  0.222535
  29  0.20527
Done.

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

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.000e-04  4.386e-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:  9.495e-01  2.053e-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:  1.019e+00  2.225e-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: 7.69e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.52e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/6189/likelihoodResults_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.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) = 6032.16758888
delta logL = -0.000633233379631

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6032.16695422
delta logL = 1.42617227539e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.4151       1.0000          .0000       5.0000    
     3 'Normalizat'    1.0192       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94953       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=   6032.167     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      264 TOTAL
                     EDM=   .54E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10007E-03    21.857        .36285E-02** at limit **
   2  alpha         2.5197        3.6313        .16473E-01   -.58810E-04
   3  Normalizat    1.0192        .19890        .24071E-03    .10145E-03
   4  Prefactor     .94954        .19884        .24723E-03   -.15529E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.00010007
  alpha      = 2.51974
  Normalizat = 1.01922
  Prefactor  = 0.949537
 **********
 **   18 **HESSE 
 **********

 FCN=   6032.167     FROM HESSE     STATUS=OK            23 CALLS      287 TOTAL
                     EDM=   .71E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10007E-03    17.658        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.5197        3.5592        .32945E-02    .78954E-02
   3  Normalizat    1.0192        .19903        .96286E-05   -.92389    
   4  Prefactor     .94954        .19903        .98893E-05   -.94431    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.07638e-09
Minuit parameter uncertainties:
  1  0.00223083
  2  2.5103
  3  0.199179
  4  0.199178
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/6189': 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) = 6032.16695184
delta logL = 3.80322671845e-06

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.001e-04  2.231e-03  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.520e+00  2.510e+00  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:  9.495e-01  1.992e-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:  1.019e+00  1.992e-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/6189/cmap_HighResolution_389145601_389404801_4FGL_J1604.6+5714_daily_bin578.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.52e-05', job_status='DONE', photon_flux_upper_limit='7.69e-08', time_completed='2021-09-13 07:10:52.638825', job_id='6189', GAL2='0.95', fit_tolerance='1e-08', EG2='1.02', EG='1.02', time_epoch_completed='1631542252.64', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='3.80e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.35' WHERE bin_id='578' AND source_name='4FGL J1604.6+5714' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 13 07:10:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0067>
Subject: Job 6189: <4FGL_J1604.6+5714_daily_bin578> in cluster <slac> Done

Job <4FGL_J1604.6+5714_daily_bin578> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep 13 06:55:20 2021
Job was executed on host(s) <bullet0067>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 13 06:55:43 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 13 06:55:43 2021
Terminated at Mon Sep 13 07:10:53 2021
Results reported at Mon Sep 13 07:10:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1604.6+5714_daily_bin578 241.158 57.2381 389145601 389404801 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 :                                   896.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             324.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   909 sec.
    Turnaround time :                            933 sec.

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

