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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin747
RA = 196.008, Dec = 37.071
tmin = 432950401, tmax = 433209601
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='190773', job_status='RUN', time_executed='2021-09-06 19:53:28.324382', time_epoch_executed='1630983208.32' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='747'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190773

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190773/ft1_4FGL_J1304.0+3704_daily_bin747.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190773/ft1_4FGL_J1304.0+3704_daily_bin747.fits outfile=/scratch/kocevski/190773/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin747.fits ra=196.008 dec=37.071 rad=12.0 tmin=432950401.0 tmax=433209601.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.74
user 5.41
sys 0.29

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.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/190773/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin747.fits evtable="EVENTS" outfile="/scratch/kocevski/190773/ft1_filtered_4FGL_J1304.0+3704_daily_bin747.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.34
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/190773/ft1_filtered_4FGL_J1304.0+3704_daily_bin747.fits" evtable="EVENTS" scfile=/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits sctable="SC_DATA" outfile=/scratch/kocevski/190773/ltcube_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.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/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits
.....................!
real 17.23
user 16.78
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190773/ft1_filtered_4FGL_J1304.0+3704_daily_bin747.fits evtable="EVENTS" scfile=/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits sctable="SC_DATA" expcube=/scratch/kocevski/190773/ltcube_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.fits outfile=/scratch/kocevski/190773/expmap_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.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/190773/ltcube_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.fits
.....................!
real 192.52
user 186.27
sys 5.54

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/190773/ft1_filtered_4FGL_J1304.0+3704_daily_bin747.fits scfile=/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits outfile=/scratch/kocevski/190773/cmap_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.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.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190773/ft1_filtered_4FGL_J1304.0+3704_daily_bin747.fits scfile=/scratch/kocevski/190773/ft2_4FGL_J1304.0+3704_daily_bin747.fits outfile=/scratch/kocevski/190773/cmap_HighResolution_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.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.59
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.1809       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.8779       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.300       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10132E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11315E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10192E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .30210E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.547       1.0000         .10000E-03   10000.    
    13 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    36.658       1.0000         .10000E-03   10000.    
    15 'norm      '    8.7050       1.0000         .10000E-03   10000.    
    16 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10195E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10096E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    3.3101       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10640E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    37.191       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .46739E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    37.542       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    8.1253       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10251E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .85867       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .76544       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=   3493.671     FROM MIGRAD    STATUS=CONVERGED    752 CALLS     3310 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.1811        3.6574       -.32810E-06    .29367E-04
   2  Prefactor     .10000E-03    3.0787       -.10765E-06** at limit **
   3  Prefactor     1.8778        2.0417        .55895E-07   -.45350E-04
   4  Prefactor     14.300        9.8872       -.98231E-07    .27929E-04
   5  Prefactor     .10000E-03    14.992        .34598E-05** at limit **
   6  Prefactor     .10000E-03    8.6034        .17827E-05** at limit **
   7  Prefactor     .10000E-03    42.549        .64679E-05** at limit **
   8  Prefactor     .10000E-03    10.281       -.49871E-05** at limit **
   9  norm          .10000E-03    3.3629       -.41700E-07** at limit **
  10  Prefactor     .10000E-03    13.967        .42088E-05** at limit **
  11  Prefactor     .10000E-03    25.194        .13214E-06** at limit **
  12  Prefactor     12.555        13.934       -.28627E-06    .14403E-03
  13  norm          .10000E-03    3.4295        .58148E-06** at limit **
  14  norm          36.642        19.650       -.34731E-05    .12102E-03
  15  norm          8.7033        5.3541       -.19046E-06    .59869E-04
  16  norm          .10000E-03    3.5246       -.28500E-06** at limit **
  17  norm          .10000E-03    2.8544       -.46351E-07** at limit **
  18  Prefactor     .10000E-03    2.6198        .62709E-07** at limit **
  19  Prefactor     3.2896        21.540       -.18212E-05   -.83727E-04
  20  Prefactor     .10000E-03    25.336        .58785E-06** at limit **
  21  Prefactor     .10000E-03    19.183       -.44821E-05** at limit **
  22  Prefactor     37.189        25.945        .19828E-05    .14378E-04
  23  Prefactor     .10026E-03    495.50       -.25376E-03** at limit **
  24  Prefactor     37.524        30.388       -.13986E-04    .20424E-05
  25  Prefactor     .10000E-03    17.508       -.15966E-05** at limit **
  26  norm          8.1272        2.9398        .36839E-06    .41388E-02
  27  Prefactor     .10000E-03    4.2678        .27570E-06** at limit **
  28  norm          .10000E-03    22.615       -.42654E-05** at limit **
  29  Normalizat    .85854        .18747        .15940E-05    .78900E-03
  30  Prefactor     .76557        .22709        .75599E-06    .50272E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 4.18111
  Prefactor  = 0.0001
  Prefactor  = 1.87781
  Prefactor  = 14.2999
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 12.5547
  norm       = 0.0001
  norm       = 36.6418
  norm       = 8.70328
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.28962
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 37.189
  Prefactor  = 0.000100255
  Prefactor  = 37.5236
  Prefactor  = 0.0001
  norm       = 8.12721
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.858542
  Prefactor  = 0.765574
 **********
 **   18 **HESSE 
 **********

 FCN=   3493.671     FROM HESSE     STATUS=OK           578 CALLS     3888 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.1811        3.6813        .99290E-04   -1.5299    
   2  Prefactor     .10000E-03    3.0860        .10128E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.8778        2.0503        .82774E-04   -1.5434    
   4  Prefactor     14.300        9.8916        .10592E-03   -1.4951    
   5  Prefactor     .10000E-03    15.013        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    8.6073        .16934E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    42.568        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    10.532        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    17.128        .20728E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    13.970        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    25.277        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     12.555        13.885        .11309E-03   -1.4999    
  13  norm          .10000E-03    3.4641        .10680E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          36.642        19.648        .66193E-04   -1.4497    
  15  norm          8.7033        5.2906        .97728E-04   -1.5118    
  16  norm          .10000E-03    3.5265        .10825E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.1476        .19444E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    3.6127        .16887E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     3.2896        18.058        .22251E-03   -1.5345    
  20  Prefactor     .10000E-03    25.360        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    19.185        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     37.189        25.953        .65719E-04   -1.4488    
  23  Prefactor     .10026E-03    497.85        .42381E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     37.524        30.458        .32706E-03   -1.4482    
  25  Prefactor     .10000E-03    17.509        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          8.1272        2.9475        .58753E-04   -1.5138    
  27  Prefactor     .10000E-03    4.3236        .11922E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    22.841        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .85854        .22551        .21053E-03   -.97933    
  30  Prefactor     .76557        .27195        .27515E-03   -1.0101    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.10487e-09
Minuit parameter uncertainties:
  1  3.68145
  2  4.05242e-06
  3  2.05034
  4  9.89269
  5  7.89555e-06
  6  1.28258e-06
  7  1.89127e-05
  8  2.45272e-05
  9  0.000130801
  10  4.9257e-06
  11  3.49935e-06
  12  13.8887
  13  8.90043e-07
  14  19.6512
  15  5.29093
  16  4.25187e-06
  17  7.86282e-05
  18  6.73847e-05
  19  15.4216
  20  0.000144224
  21  3.38197e-06
  22  25.9611
  23  0.0227361
  24  30.4701
  25  6.87773e-07
  26  2.94759
  27  1.43104e-06
  28  1.34217e-05
  29  0.225755
  30  0.272428
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.255e+01  1.389e+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:  7.656e-01  2.724e-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.585e-01  2.258e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.76
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.58e-08 +/- 2.85e-08
Energy Flux (Fixed Index): 8.06e-06 +/- 8.92e-06

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

Saving results to:
/scratch/kocevski/190773/likelihoodResults_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.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) = 3493.35181166
delta logL = 0.319044511161

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3493.35116075
delta logL = 0.319695416215

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.700       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8466       1.0000          .0000       10.000    
     3 'Normalizat'    .87138       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75300       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=   3493.351     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      290 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.701        22.312        .88034E-04   -.63815E-03
   2  Index         1.8465        .66402        .80223E-02   -.22691E-03
   3  Normalizat    .87138        .21701        .20908E-03    .91542E-04
   4  Prefactor     .75301        .27003        .27708E-03    .83988E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.7012
  Index      = 1.84649
  Normalizat = 0.871383
  Prefactor  = 0.753006
 **********
 **   18 **HESSE 
 **********

 FCN=   3493.351     FROM HESSE     STATUS=OK            23 CALLS      313 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.701        22.253        .17607E-04   -1.4798    
   2  Index         1.8465        .66232        .32089E-03   -.68246    
   3  Normalizat    .87138        .21722        .83630E-05   -.97473    
   4  Prefactor     .75301        .27030        .11083E-04   -1.0148    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.37741e-09
Minuit parameter uncertainties:
  1  22.2619
  2  0.665581
  3  0.217439
  4  0.270778
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190773': 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) = 3493.35116074
delta logL = 0.319695423576

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.070e+01  2.226e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.846e+00  6.656e-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:  7.530e-01  2.708e-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.714e-01  2.174e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.41
Ra Dec: 196.008 37.071
Photon Index (Free Index): 1.85 +/- 0.67
Photon Flux (Free Index): 1.81e-08 +/- 2.32e-08
Energy Flux (Free Index): 1.89e-05 +/- 3.09e-05

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/190773/cmap_HighResolution_432950401_433209601_4FGL_J1304.0+3704_daily_bin747.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.07e-03', comment='SUCCESS', photon_flux='2.58e-08', energy_flux2='1.89e-05', photon_flux_error='2.85e-08', dlogl='3.20e-01', energy_flux='8.06e-06', photon_flux2='1.81e-08', job_status='DONE', time_completed='2021-09-06 20:03:57.465354', photon_index_error2='0.67', photon_index2='1.85', ts='1.76', fit_tolerance='1e-08', GAL='0.77', photon_index_error='0.00', photon_flux_upper_limit='1.04e-07', energy_flux_error2='3.09e-05', EG='0.86', time_epoch_completed='1630983837.47', return_code='0', job_id='190773', GAL2='0.75', EG2='0.87', return_code2='0', energy_flux_error='8.92e-06', photon_flux_error2='2.32e-08', ts2='2.41', photon_index='2.44' WHERE bin_id='747' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:03:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0225>
Subject: Job 190773: <4FGL_J1304.0+3704_daily_bin747> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin747> 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) <bullet0225>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:50: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:50:31 2021
Terminated at Mon Sep  6 20:03:58 2021
Results reported at Mon Sep  6 20:03:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin747 196.008 37.071 432950401 433209601 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 :                                   626.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             299.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   806 sec.
    Turnaround time :                            820 sec.

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

