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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin166
RA = 196.008, Dec = 37.071
tmin = 282355201, tmax = 282614401
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='186576', job_status='RUN', time_executed='2021-09-06 19:37:28.322194', time_epoch_executed='1630982248.32' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='166'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186576

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186576/ft1_4FGL_J1304.0+3704_daily_bin166.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186576/ft1_4FGL_J1304.0+3704_daily_bin166.fits outfile=/scratch/kocevski/186576/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin166.fits ra=196.008 dec=37.071 rad=12.0 tmin=282355201.0 tmax=282614401.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.72
user 3.48
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.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/186576/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin166.fits evtable="EVENTS" outfile="/scratch/kocevski/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.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.56
user 0.35
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits" evtable="EVENTS" scfile=/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits sctable="SC_DATA" outfile=/scratch/kocevski/186576/ltcube_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.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/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits
.....................!
real 14.79
user 14.39
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits evtable="EVENTS" scfile=/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits sctable="SC_DATA" expcube=/scratch/kocevski/186576/ltcube_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits outfile=/scratch/kocevski/186576/expmap_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.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/186576/ltcube_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits
.....................!
real 192.87
user 187.23
sys 5.09

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/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits scfile=/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits outfile=/scratch/kocevski/186576/cmap_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.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.58
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits scfile=/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits outfile=/scratch/kocevski/186576/cmap_HighResolution_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.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.58
user 0.40
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits', '/scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits', expMap='/scratch/kocevski/186576/expmap_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits', expCube='/scratch/kocevski/186576/ltcube_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/186576/Model_4FGL_J1304.0+3704_daily_bin166.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/186576/ft1_filtered_4FGL_J1304.0+3704_daily_bin166.fits
Spacecraft file(s): /scratch/kocevski/186576/ft2_4FGL_J1304.0+3704_daily_bin166.fits
Exposure map: /scratch/kocevski/186576/expmap_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits
Exposure cube: /scratch/kocevski/186576/ltcube_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/186576/Model_4FGL_J1304.0+3704_daily_bin166.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) = 5955.27903009

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.7864       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.4837       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10007E-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      '    4.1941       1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.479       1.0000         .10000E-03   10000.    
    11 'Prefactor '    23.916       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.6521       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    5.4437       1.0000         .10000E-03   10000.    
    16 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    58.174       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10171E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    9.0498       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .12636E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    93.083       1.0000         .10000E-03   10000.    
    26 'norm      '    .38679       1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.7165       1.0000         .10000E-03   10000.    
    28 'norm      '    .11769E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .65322       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.2848       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.

 FCN=   5955.275     FROM MIGRAD    STATUS=CONVERGED    757 CALLS     3872 TOTAL
                     EDM=   .64E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1.8175        .56522E-08** at limit **
   2  Prefactor     .10000E-03    1.9679        .34586E-07** at limit **
   3  Prefactor     2.7867        2.0544       -.28543E-07   -.37679E-04
   4  Prefactor     7.4845        9.8976        .22969E-05   -.23608E-03
   5  Prefactor     .10000E-03    7.5384        .24898E-06** at limit **
   6  Prefactor     .10000E-03    27.593       -.84812E-06** at limit **
   7  Prefactor     .10001E-03    47.887        .44422E-05** at limit **
   8  Prefactor     .10000E-03    2.4372       -.12853E-08** at limit **
   9  norm          4.1943        6.0241        .33807E-06   -.14798E-03
  10  Prefactor     21.481        47.831        .77742E-06    .19557E-04
  11  Prefactor     23.917        30.932       -.40036E-06   -.25503E-04
  12  Prefactor     .10000E-03    11.417       -.90692E-06** at limit **
  13  norm          2.6525        4.2026        .23813E-06   -.28905E-04
  14  norm          .10000E-03    3.6822        .15796E-07** at limit **
  15  norm          5.4441        3.5998       -.12113E-06   -.32205E-03
  16  norm          .10000E-03    2.9450       -.15314E-06** at limit **
  17  norm          58.169        9.2427       -.53388E-07    .11440E-03
  18  Prefactor     .10000E-03    1.7737       -.57457E-07** at limit **
  19  Prefactor     .10000E-03    6.5340       -.14992E-06** at limit **
  20  Prefactor     .10000E-03    24.640       -.20497E-05** at limit **
  21  Prefactor     .10000E-03    31.855        .10742E-05** at limit **
  22  Prefactor     9.0509        15.090       -.10860E-06   -.29754E-04
  23  Prefactor     .10003E-03    66.684       -.78991E-05** at limit **
  24  Prefactor     .10000E-03    14.405        .14973E-05** at limit **
  25  Prefactor     93.064        73.878       -.14507E-05   -.15535E-03
  26  norm          .38361        1.0502        .11563E-06   -.87149E-04
  27  Prefactor     3.7168        3.9863        .23937E-05   -.70895E-03
  28  norm          .10000E-03    52.832        .26992E-05** at limit **
  29  Normalizat    .65321        .16521        .36056E-06   -.67541E-04
  30  Prefactor     1.2847        .20747       -.11657E-05    .40964E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.7867
  Prefactor  = 7.48449
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.00010001
  Prefactor  = 0.0001
  norm       = 4.19428
  Prefactor  = 21.4814
  Prefactor  = 23.9172
  Prefactor  = 0.0001
  norm       = 2.65253
  norm       = 0.0001
  norm       = 5.44408
  norm       = 0.0001
  norm       = 58.1687
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.000100001
  Prefactor  = 9.05094
  Prefactor  = 0.000100026
  Prefactor  = 0.000100001
  Prefactor  = 93.0644
  norm       = 0.383613
  Prefactor  = 3.71678
  norm       = 0.000100004
  Normalizat = 0.65321
  Prefactor  = 1.28475
 **********
 **   18 **HESSE 
 **********

 FCN=   5955.275     FROM HESSE     STATUS=OK           584 CALLS     4456 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    1.8374        .10136E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.9704        .10572E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.7867        2.0519        .92076E-04   -1.5374    
   4  Prefactor     7.4845        9.9411        .73301E-03   -1.5161    
   5  Prefactor     .10000E-03    7.5460        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    27.871        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    49.200        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.4590        .11762E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          4.1943        5.9757        .17744E-03   -1.5298    
  10  Prefactor     21.481        47.853        .86424E-04   -1.4781    
  11  Prefactor     23.917        30.759        .81909E-04   -1.4729    
  12  Prefactor     .10000E-03    11.592        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.6525        4.1790        .19006E-03   -1.5382    
  14  norm          .10000E-03    3.6836        .14462E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          5.4441        3.5892        .10901E-03   -1.5241    
  16  norm          .10000E-03    2.9509        .12905E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          58.169        9.2402        .52599E-04   -1.4181    
  18  Prefactor     .10000E-03    1.8186        .20020E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    6.5637        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    24.923        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    32.001        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     9.0509        15.087        .13323E-03   -1.5106    
  23  Prefactor     .10003E-03    70.469        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    14.567        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     93.064        74.941        .41655E-04   -1.3776    
  26  norm          .38361        1.3937        .12369E-02   -1.5584    
  27  Prefactor     3.7168        4.0463        .78620E-03   -1.5322    
  28  norm          .10000E-03    55.043        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .65321        .20133        .26352E-03   -1.0577    
  30  Prefactor     1.2847        .25372        .25309E-03   -.83762    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.11409e-08
Minuit parameter uncertainties:
  1  5.02148e-07
  2  8.18676e-07
  3  2.05191
  4  9.94334
  5  2.87729e-05
  6  0.000209419
  7  0.00143274
  8  6.84309e-07
  9  5.97654
  10  47.9386
  11  30.7791
  12  0.000128509
  13  4.17945
  14  3.84954e-07
  15  3.58938
  16  4.89353e-06
  17  9.24039
  18  3.43622e-06
  19  8.96288e-06
  20  0.000420849
  21  0.000296151
  22  15.0932
  23  0.00271022
  24  0.000255939
  25  75.0175
  26  1.39385
  27  4.04655
  28  0.000916606
  29  0.201557
  30  0.253962
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.285e-04  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:  1.285e+00  2.540e-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:  6.532e-01  2.016e-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: 5.47e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.23e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186576/likelihoodResults_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.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) = 5955.27518296
delta logL = -0.00041111050723

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5955.2747718
delta logL = 4.52364474768e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10185E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4074       1.0000          .0000       10.000    
     3 'Normalizat'    .65324       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2847       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=   5955.275     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      247 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10107E-03    75.524        .18142E-02** at limit **
   2  Index         2.3556        5.5358        .50000        .15957E-04
   3  Normalizat    .65321        .94233E-02    .26351E-03   -.30571E-03
   4  Prefactor     1.2847        .12363E-01    .25309E-03   -.29934E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101067
  Index      = 2.35555
  Normalizat = 0.653211
  Prefactor  = 1.28474
 **********
 **   18 **HESSE 
 **********

 FCN=   5955.275     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      276 TOTAL
                     EDM=   .79E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10107E-03    331.06        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3556        7.2724        .50000       -.55729    
   3  Normalizat    .65321        .20258E-01    .10541E-04   -1.0577    
   4  Prefactor     1.2847        .26578E-01    .50617E-04   -.83762    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.93928e-09
Minuit parameter uncertainties:
  1  0.0377953
  2  412.557
  3  0.020258
  4  0.0265781
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186576': 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) = 5955.27477154
delta logL = 3.08295057039e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.011e-04  3.780e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.356e+00  4.126e+02  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:  1.285e+00  2.658e-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:  6.532e-01  2.026e-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/186576/cmap_HighResolution_282355201_282614401_4FGL_J1304.0+3704_daily_bin166.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.23e-03', job_status='DONE', photon_flux_upper_limit='5.47e-08', time_completed='2021-09-06 19:51:40.093952', job_id='186576', GAL2='1.28', fit_tolerance='1e-08', EG2='0.65', EG='0.65', time_epoch_completed='1630983100.09', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.28', dlogl='3.08e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='166' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:51:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0116>
Subject: Job 186576: <4FGL_J1304.0+3704_daily_bin166> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin166> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:29 2021
Job was executed on host(s) <bullet0116>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:31 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:31 2021
Terminated at Mon Sep  6 19:51:40 2021
Results reported at Mon Sep  6 19:51:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin166 196.008 37.071 282355201 282614401 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 :                                   847.33 sec.
    Max Memory :                                 1113 MB
    Average Memory :                             275.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   969 sec.
    Turnaround time :                            971 sec.

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

