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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin744
RA = 196.008, Dec = 37.071
tmin = 432172801, tmax = 432432001
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='190769', job_status='RUN', time_executed='2021-09-06 19:53:19.346830', time_epoch_executed='1630983199.35' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='744'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190769

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190769/ft1_4FGL_J1304.0+3704_daily_bin744.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190769/ft1_4FGL_J1304.0+3704_daily_bin744.fits outfile=/scratch/kocevski/190769/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin744.fits ra=196.008 dec=37.071 rad=12.0 tmin=432172801.0 tmax=432432001.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 4.15
user 3.93
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/190769/ft1_filtered_4FGL_J1304.0+3704_daily_bin744.fits" evtable="EVENTS" scfile=/scratch/kocevski/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits sctable="SC_DATA" outfile=/scratch/kocevski/190769/ltcube_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.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/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits
.....................!
real 13.33
user 13.03
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190769/ft1_filtered_4FGL_J1304.0+3704_daily_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits sctable="SC_DATA" expcube=/scratch/kocevski/190769/ltcube_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.fits outfile=/scratch/kocevski/190769/expmap_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.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/190769/ltcube_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.fits
.....................!
real 159.03
user 154.63
sys 4.10

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/190769/ft1_filtered_4FGL_J1304.0+3704_daily_bin744.fits scfile=/scratch/kocevski/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits outfile=/scratch/kocevski/190769/cmap_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.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.48
user 0.33
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190769/ft1_filtered_4FGL_J1304.0+3704_daily_bin744.fits scfile=/scratch/kocevski/190769/ft2_4FGL_J1304.0+3704_daily_bin744.fits outfile=/scratch/kocevski/190769/cmap_HighResolution_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.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.48
user 0.33
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.4314       1.0000         .10000E-03   10000.    
     2 'Prefactor '    11.191       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.4891       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10362E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .15476E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    66.665       1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.787       1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.500       1.0000         .10000E-03   10000.    
    13 'norm      '    .11589E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    11.569       1.0000         .10000E-03   10000.    
    15 'norm      '    5.3929       1.0000         .10000E-03   10000.    
    16 'norm      '    17.343       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    56.432       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    4.5797       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .84231       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.1176       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.

 FCN=   4186.671     FROM MIGRAD    STATUS=CONVERGED    785 CALLS     3936 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.4314        2.3936        .65608E-02   -.17613E-03
   2  Prefactor     11.191        8.9698        .29939E-02    .50785E-04
   3  Prefactor     .10000E-03    .89156        .90712E-02** at limit **
   4  Prefactor     2.4889        11.746        .64772E-02    .19132E-03
   5  Prefactor     .10000E-03    11.145        .90712E-02** at limit **
   6  Prefactor     .10000E-03    7.4691        .90712E-02** at limit **
   7  Prefactor     .10000E-03    254.17        .90712E-02** at limit **
   8  Prefactor     .10000E-03    2.7176        .90712E-02** at limit **
   9  norm          .10000E-03    5.0310        .44410E-01** at limit **
  10  Prefactor     66.668        57.046        .12289E-02   -.57550E-03
  11  Prefactor     32.808        36.274        .17495E-02   -.12392E-04
  12  Prefactor     14.502        16.032        .26296E-02   -.29058E-03
  13  norm          .10000E-03    4.7355        .47670E-01** at limit **
  14  norm          11.569        17.517        .29446E-02    .34223E-04
  15  norm          5.3950        10.958        .43261E-02    .34857E-03
  16  norm          17.342        20.075        .24043E-02   -.18860E-03
  17  norm          .10000E-03    3.5371        .90712E-02** at limit **
  18  Prefactor     .10000E-03    2.8727        .90712E-02** at limit **
  19  Prefactor     .10000E-03    10.028        .90712E-02** at limit **
  20  Prefactor     56.428        45.321        .13350E-02    .24577E-03
  21  Prefactor     .10000E-03    39.885        .90712E-02** at limit **
  22  Prefactor     .10000E-03    4.1795        .90712E-02** at limit **
  23  Prefactor     .10000E-03    26.788        .90712E-02** at limit **
  24  Prefactor     .10000E-03    11.956        .90712E-02** at limit **
  25  Prefactor     .10000E-03    78.526        .90712E-02** at limit **
  26  norm          4.5796        2.1521        .47024E-02    .75018E-04
  27  Prefactor     .10000E-03    6.1311        .90712E-02** at limit **
  28  norm          .10000E-03    16.556        .90712E-02** at limit **
  29  Normalizat    .84237        .19079        .44160E-01   -.53101E-05
  30  Prefactor     1.1175        .23677        .60401E-01   -.68471E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 2.4314
  Prefactor  = 11.1909
  Prefactor  = 0.0001
  Prefactor  = 2.48892
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 66.6676
  Prefactor  = 32.8083
  Prefactor  = 14.5022
  norm       = 0.0001
  norm       = 11.5686
  norm       = 5.39501
  norm       = 17.3421
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 56.4284
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.5796
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.842371
  Prefactor  = 1.11753
 **********
 **   18 **HESSE 
 **********

 FCN=   4186.671     FROM HESSE     STATUS=OK           580 CALLS     4516 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.4314        2.4050        .96788E-04   -1.5396    
   2  Prefactor     11.191        8.9701        .11976E-03   -1.5039    
   3  Prefactor     .10000E-03    .89533        .59650E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.4889        11.715        .25909E-03   -1.5392    
   5  Prefactor     .10000E-03    11.163        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    7.4717        .17272E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    256.94        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.7223        .10414E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    10.688        .26928E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     66.668        57.106        .49156E-04   -1.4073    
  11  Prefactor     32.808        35.093        .69979E-04   -1.4562    
  12  Prefactor     14.502        15.811        .10518E-03   -1.4946    
  13  norm          .10000E-03    9.9684        .26717E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          11.569        17.517        .11778E-03   -1.5028    
  15  norm          5.3950        10.913        .15764E-03   -1.5243    
  16  norm          17.342        20.135        .96174E-04   -1.4875    
  17  norm          .10000E-03    3.5955        .11864E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.9640        .21365E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    10.080        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     56.428        45.293        .53400E-04   -1.4204    
  21  Prefactor     .10000E-03    39.919        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.1805        .12919E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    26.813        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    11.969        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    78.694        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          4.5796        2.1515        .62479E-04   -1.5280    
  27  Prefactor     .10000E-03    6.3017        .31280E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    16.666        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .84237        .22645        .23713E-03   -.98516    
  30  Prefactor     1.1175        .28055        .26712E-03   -.88908    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.40818e-09
Minuit parameter uncertainties:
  1  2.40509
  2  8.97115
  3  5.15118e-08
  4  10.8029
  5  0.00022024
  6  5.51676e-08
  7  0.000295228
  8  3.10463e-08
  9  0.000174214
  10  57.1531
  11  35.1153
  12  15.816
  13  9.14155e-05
  14  17.5248
  15  10.9174
  16  20.1428
  17  2.15335e-07
  18  3.24471e-07
  19  6.72163e-05
  20  45.3206
  21  1.94941e-05
  22  1.86234e-07
  23  2.66561e-06
  24  7.19983e-05
  25  5.51924e-06
  26  2.15158
  27  2.38295e-07
  28  4.81732e-06
  29  0.226707
  30  0.280923
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.450e+01  1.582e+01  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.118e+00  2.809e-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:  8.424e-01  2.267e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.66
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.98e-08 +/- 3.24e-08
Energy Flux (Fixed Index): 9.31e-06 +/- 1.02e-05

TS (Fixed Index): 1.66
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.11e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.59e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/190769/likelihoodResults_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.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) = 4186.66904982
delta logL = 0.00221139895075

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4184.76092502
delta logL = 1.91033620083

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    8.6509       1.0000          .0000       10.000    
     3 'Normalizat'    .75466       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2129       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=   4184.761     FROM MIGRAD    STATUS=CONVERGED    304 CALLS      632 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .48355E-03    .75025E-05** at limit **
   2  Index         8.6509        .26598        .47406E-03   -.39977E-04
   3  Normalizat    .75466        .21866        .24813E-03    .17869E-04
   4  Prefactor     1.2129        .28097        .25808E-03    .18545E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 8.65093
  Normalizat = 0.754657
  Prefactor  = 1.21287
 **********
 **   18 **HESSE 
 **********

 FCN=   4184.761     FROM HESSE     STATUS=OK            23 CALLS      655 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .48316E-03    .15005E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.6509        .26345        .18962E-04    .81859    
   3  Normalizat    .75466        .21886        .99253E-05   -1.0177    
   4  Prefactor     1.2129        .28124        .51616E-04   -.85936    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.77963e-10
Minuit parameter uncertainties:
  1  7.45342e-09
  2  0.263713
  3  0.219115
  4  0.281587
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190769': 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) = 4184.76092423
delta logL = 1.91033698486

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  7.453e-09  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  8.651e+00  2.637e-01  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.213e+00  2.816e-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:  7.547e-01  2.191e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.68
Ra Dec: 196.008 37.071
Photon Index (Free Index): 8.65 +/- 0.26
Photon Flux (Free Index): 7.85e-08 +/- 4.46e-08
Energy Flux (Free Index): 8.98e-06 +/- 5.08e-06

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/190769/cmap_HighResolution_432172801_432432001_4FGL_J1304.0+3704_daily_bin744.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.59e-03', comment='SUCCESS', photon_flux='2.98e-08', energy_flux2='8.98e-06', photon_flux_error='3.24e-08', dlogl='1.91e+00', energy_flux='9.31e-06', photon_flux2='7.85e-08', job_status='DONE', time_completed='2021-09-06 20:03:24.224286', photon_index_error2='0.26', photon_index2='8.65', ts='1.66', fit_tolerance='1e-08', GAL='1.12', photon_index_error='0.00', photon_flux_upper_limit='1.11e-07', energy_flux_error2='5.08e-06', EG='0.84', time_epoch_completed='1630983804.22', return_code='0', job_id='190769', GAL2='1.21', EG2='0.75', return_code2='0', energy_flux_error='1.02e-05', photon_flux_error2='4.46e-08', ts2='5.68', photon_index='2.44' WHERE bin_id='744' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:03:24 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0175>
Subject: Job 190769: <4FGL_J1304.0+3704_daily_bin744> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin744> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:18 2021
Job was executed on host(s) <bullet0175>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:50:29 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:50:29 2021
Terminated at Mon Sep  6 20:03:24 2021
Results reported at Mon Sep  6 20:03:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin744 196.008 37.071 432172801 432432001 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 :                                   603.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             301.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   775 sec.
    Turnaround time :                            786 sec.

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

