/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 108 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 = 7415
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1304.0+3704_daily_bin154
RA = 196.008, Dec = 37.071
tmin = 279244801, tmax = 279504001
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='186557', job_status='RUN', time_executed='2021-09-06 19:37:29.015769', time_epoch_executed='1630982249.02' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='154'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186557

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186557/ft1_4FGL_J1304.0+3704_daily_bin154.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186557/ft1_4FGL_J1304.0+3704_daily_bin154.fits outfile=/scratch/kocevski/186557/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin154.fits ra=196.008 dec=37.071 rad=12.0 tmin=279244801.0 tmax=279504001.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.66
user 3.43
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.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/186557/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin154.fits evtable="EVENTS" outfile="/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.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.52
user 0.37
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits" evtable="EVENTS" scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits sctable="SC_DATA" outfile=/scratch/kocevski/186557/ltcube_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.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/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits
.....................!
real 15.02
user 14.64
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits evtable="EVENTS" scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits sctable="SC_DATA" expcube=/scratch/kocevski/186557/ltcube_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits outfile=/scratch/kocevski/186557/expmap_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.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/186557/ltcube_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits
.....................!
real 191.28
user 186.57
sys 4.11

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

Setting source of interest to:
4FGL J1304.0+3704 @ 196.008 37.071

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits outfile=/scratch/kocevski/186557/cmap_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.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=196.008 yref=37.071 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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits outfile=/scratch/kocevski/186557/cmap_HighResolution_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.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=196.008 yref=37.071 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.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits evtable="EVENTS" scfile=/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/186557/Model_4FGL_J1304.0+3704_daily_bin154.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/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits.....................!
real 47.79
user 46.36
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits', '/scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits', expMap='/scratch/kocevski/186557/expmap_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits', expCube='/scratch/kocevski/186557/ltcube_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/186557/Model_4FGL_J1304.0+3704_daily_bin154.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1304.0+3704'

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.111e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/186557/ft1_filtered_4FGL_J1304.0+3704_daily_bin154.fits
Spacecraft file(s): /scratch/kocevski/186557/ft2_4FGL_J1304.0+3704_daily_bin154.fits
Exposure map: /scratch/kocevski/186557/expmap_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits
Exposure cube: /scratch/kocevski/186557/ltcube_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/186557/Model_4FGL_J1304.0+3704_daily_bin154.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) = 5690.96339476

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    9.5542       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .27002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.2572       1.0000         .10000E-03   10000.    
     5 'Prefactor '    23.874       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    42.144       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    13.913       1.0000         .10000E-03   10000.    
    15 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    8.8611       1.0000         .10000E-03   10000.    
    17 'norm      '    5.6150       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.8854       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    27.709       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    25.456       1.0000         .10000E-03   10000.    
    25 'Prefactor '    84.020       1.0000         .10000E-03   10000.    
    26 'norm      '    4.5207       1.0000         .10000E-03   10000.    
    27 'Prefactor '    2.4998       1.0000         .10000E-03   10000.    
    28 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.3149       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .72124       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5690.951     FROM MIGRAD    STATUS=CONVERGED     89 CALLS     3212 TOTAL
                     EDM=   .65E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 10.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          9.5536        1.3651       -.18609E-05   -.65527E-02
   2  Prefactor     .10009E-03    .93598        .77721E-05** at limit **
   3  Prefactor     .10000E-03    1.0614        .57238E-06** at limit **
   4  Prefactor     9.2571        1.0021       -.66251E-07   -.25216E-03
   5  Prefactor     23.875        1.0021        .66336E-07   -.96027E-04
   6  Prefactor     .10001E-03    4.0665       -.73570E-05** at limit **
   7  Prefactor     .10001E-03    55.901       -.29244E-04** at limit **
   8  Prefactor     .10000E-03    2.8500        .35916E-05** at limit **
   9  norm          .10000E-03    3.2574       -.33471E-06** at limit **
  10  Prefactor     42.145        1.0044        .83123E-07   -.32473E-03
  11  Prefactor     .10003E-03    7.3138       -.19499E-04** at limit **
  12  Prefactor     .10013E-03    5.9132       -.11579E-04** at limit **
  13  norm          .10000E-03    1.4575       -.66212E-07** at limit **
  14  norm          13.913        1.0008        .89574E-08    .36002E-04
  15  norm          .10000E-03    2.8397       -.36232E-05** at limit **
  16  norm          8.8617        1.0423       -.36574E-06   -.47226E-03
  17  norm          5.6154        1.0274        .32317E-06    .13548E-02
  18  Prefactor     2.8858        3.0290        .22853E-05   -.14900E-03
  19  Prefactor     .10002E-03    3.8089        .11446E-05** at limit **
  20  Prefactor     .10002E-03    8.7422        .21053E-04** at limit **
  21  Prefactor     .10009E-03    19.766        .39302E-04** at limit **
  22  Prefactor     27.709        1.0011        .49426E-07   -.46727E-04
  23  Prefactor     .10010E-03    6.7935       -.11291E-04** at limit **
  24  Prefactor     25.455        1.0082       -.13334E-06    .34120E-03
  25  Prefactor     84.021        1.0103        .92707E-07   -.80272E-03
  26  norm          4.5208        1.8372        .61311E-08    .17120E-03
  27  Prefactor     2.4998        1.0301        .47088E-06    .51052E-03
  28  norm          .10000E-03    5.8628        .17719E-05** at limit **
  29  Normalizat    1.3147        .21280       -.10126E-05    .69878E-04
  30  Prefactor     .72147        .25159        .19258E-05    .12075E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 9.5536
  Prefactor  = 0.000100093
  Prefactor  = 0.0001
  Prefactor  = 9.25708
  Prefactor  = 23.8745
  Prefactor  = 0.000100015
  Prefactor  = 0.000100014
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 42.145
  Prefactor  = 0.000100025
  Prefactor  = 0.000100127
  norm       = 0.0001
  norm       = 13.913
  norm       = 0.0001
  norm       = 8.86171
  norm       = 5.61541
  Prefactor  = 2.88575
  Prefactor  = 0.000100017
  Prefactor  = 0.000100021
  Prefactor  = 0.00010009
  Prefactor  = 27.7089
  Prefactor  = 0.000100098
  Prefactor  = 25.455
  Prefactor  = 84.0211
  norm       = 4.52085
  Prefactor  = 2.49975
  norm       = 0.0001
  Normalizat = 1.31466
  Prefactor  = 0.721469
 **********
 **   18 **HESSE 
 **********

 FCN=   5690.951     FROM HESSE     STATUS=OK           652 CALLS     3864 TOTAL
                     EDM=   .44E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          9.5536        4.7574        .32412E-02   -1.5090    
   2  Prefactor     .10009E-03    7.7953        .71654E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.0574        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.2571        10.297        .32931E-02   -1.5099    
   5  Prefactor     23.875        27.823        .20495E-02   -1.4730    
   6  Prefactor     .10001E-03    7.3846        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    56.406        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.8355        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    3.1971        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     42.145        45.342        .15438E-02   -1.4409    
  11  Prefactor     .10003E-03    16.346        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10013E-03    12.551        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.4566        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          13.913        13.000        .26846E-02   -1.4962    
  15  norm          .10000E-03    2.8184        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          8.8617        6.3482        .33662E-02   -1.5113    
  17  norm          5.6154        4.1627        .42383E-02   -1.5234    
  18  Prefactor     2.8858        3.0703        .59814E-02   -1.5368    
  19  Prefactor     .10002E-03    7.5327        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10002E-03    10.935        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10009E-03    23.157        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     27.709        22.078        .19027E-02   -1.4655    
  23  Prefactor     .10010E-03    17.390        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     25.455        25.748        .19849E-02   -1.4698    
  25  Prefactor     84.021        65.906        .10956E-02   -1.3872    
  26  norm          4.5208        1.8399        .47337E-02   -1.5283    
  27  Prefactor     2.4998        4.9286        .64621E-02   -1.5392    
  28  norm          .10000E-03    5.8658        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.3147        .18399        .50065E-01   -.83130    
  30  Prefactor     .72147        .21660        .77484E-01   -1.0269    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41265e-08
Minuit parameter uncertainties:
  1  4.7576
  2  0.00170327
  3  3.17168e-06
  4  10.2989
  5  27.8378
  6  0.000657798
  7  0.00177169
  8  2.49569e-06
  9  1.71322e-05
  10  45.3791
  11  0.00128129
  12  0.00252976
  13  1.60377e-06
  14  13.0031
  15  4.00607e-05
  16  6.34863
  17  4.16293
  18  3.07045
  19  0.000719433
  20  0.000961577
  21  0.00288249
  22  22.0841
  23  0.00260618
  24  25.7587
  25  65.9637
  26  1.8399
  27  4.92941
  28  7.60186e-06
  29  0.18408
  30  0.216856
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.001e-04  2.530e-03  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  7.215e-01  2.169e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.315e+00  1.841e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 6.64e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.14e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186557/likelihoodResults_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.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) = 5690.95167141
delta logL = -0.000376107357624

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5690.95129527
delta logL = 2.96322468785e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10188E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4103       1.0000          .0000       10.000    
     3 'Normalizat'    1.3147       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72146       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+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=   5690.951     FROM MIGRAD    STATUS=CONVERGED     94 CALLS      251 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10682E-03    13.417        .18142E-01** at limit **
   2  Index         2.2027        5.8536        .50000        .97063E-05
   3  Normalizat    1.3147        .42727E-02    .22134E-03   -.32462E-04
   4  Prefactor     .72147        .50801E-02    .34303E-03    .34003E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000106823
  Index      = 2.20268
  Normalizat = 1.31466
  Prefactor  = 0.721468
 **********
 **   18 **HESSE 
 **********

 FCN=   5690.951     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      280 TOTAL
                     EDM=   .15E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10682E-03    1110.8        .57116E-03   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2027        8.5540        .50000       -.59374    
   3  Normalizat    1.3147        .42585E-01    .44267E-04   -.83130    
   4  Prefactor     .72147        .50621E-01    .13721E-04   -1.0269    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.50147e-06
Minuit parameter uncertainties:
  1  0.17751
  2  1915.73
  3  0.0425857
  4  0.0506245
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186557': 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): 102
logL (Free Index) = 5690.95129477
delta logL = 5.26515577803e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.068e-04  1.775e-01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.203e+00  1.916e+03  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  7.215e-01  5.062e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.315e+00  4.259e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 196.008 37.071

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/186557/cmap_HighResolution_279244801_279504001_4FGL_J1304.0+3704_daily_bin154.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.14e-03', job_status='DONE', photon_flux_upper_limit='6.64e-08', time_completed='2021-09-06 19:50:24.002132', job_id='186557', GAL2='0.72', fit_tolerance='1e-08', EG2='1.31', EG='1.31', time_epoch_completed='1630983024.0', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.72', dlogl='5.27e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='154' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:50:24 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0296>
Subject: Job 186557: <4FGL_J1304.0+3704_daily_bin154> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin154> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:27 2021
Job was executed on host(s) <bullet0296>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:30 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:35:30 2021
Terminated at Mon Sep  6 19:50:24 2021
Results reported at Mon Sep  6 19:50:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin154 196.008 37.071 279244801 279504001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1304.0+3704 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   771.32 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             269.69 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   897 sec.
    Turnaround time :                            897 sec.

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

