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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin993
RA = 196.008, Dec = 37.071
tmin = 496713601, tmax = 496972801
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='192296', job_status='RUN', time_executed='2021-09-06 19:58:45.319758', time_epoch_executed='1630983525.32' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='993'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/192296

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/192296/ft1_4FGL_J1304.0+3704_daily_bin993.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/192296/ft1_4FGL_J1304.0+3704_daily_bin993.fits outfile=/scratch/kocevski/192296/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin993.fits ra=196.008 dec=37.071 rad=12.0 tmin=496713601.0 tmax=496972801.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.99
user 4.71
sys 0.24

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

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

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/192296/ft1_filtered_4FGL_J1304.0+3704_daily_bin993.fits" evtable="EVENTS" scfile=/scratch/kocevski/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits sctable="SC_DATA" outfile=/scratch/kocevski/192296/ltcube_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.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/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits
.....................!
real 16.19
user 15.70
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/192296/ft1_filtered_4FGL_J1304.0+3704_daily_bin993.fits evtable="EVENTS" scfile=/scratch/kocevski/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits sctable="SC_DATA" expcube=/scratch/kocevski/192296/ltcube_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.fits outfile=/scratch/kocevski/192296/expmap_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.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/192296/ltcube_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.fits
.....................!
real 194.97
user 187.26
sys 5.30

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/192296/ft1_filtered_4FGL_J1304.0+3704_daily_bin993.fits scfile=/scratch/kocevski/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits outfile=/scratch/kocevski/192296/cmap_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.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.57
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/192296/ft1_filtered_4FGL_J1304.0+3704_daily_bin993.fits scfile=/scratch/kocevski/192296/ft2_4FGL_J1304.0+3704_daily_bin993.fits outfile=/scratch/kocevski/192296/cmap_HighResolution_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.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.38
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    18.049       1.0000         .10000E-03   10000.    
     2 'Prefactor '    11.417       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.148       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    15.331       1.0000         .10000E-03   10000.    
     7 'Prefactor '    134.89       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    8.2579       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .96017E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .61108E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    .10880E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    36.923       1.0000         .10000E-03   10000.    
    21 'Prefactor '    33.537       1.0000         .10000E-03   10000.    
    22 'Prefactor '    27.567       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .31866E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .88571       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .65529       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.0620       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=   3755.021     FROM MIGRAD    STATUS=CONVERGED    749 CALLS     3915 TOTAL
                     EDM=   .46E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          18.048        7.2483        .50206E-07    .71730E-05
   2  Prefactor     11.416        10.161        .12127E-06    .26697E-05
   3  Prefactor     .10000E-03    4.0946       -.10930E-07** at limit **
   4  Prefactor     16.147        14.574        .10682E-06    .32323E-05
   5  Prefactor     .10000E-03    10.368        .11291E-06** at limit **
   6  Prefactor     15.333        16.952       -.18753E-07    .22426E-04
   7  Prefactor     134.80        115.48       -.26969E-05   -.72515E-04
   8  Prefactor     .10000E-03    3.1325       -.25945E-07** at limit **
   9  norm          8.2612        6.7893        .16369E-05    .24697E-03
  10  Prefactor     .10000E-03    44.863        .24043E-06** at limit **
  11  Prefactor     .10000E-03    12.129       -.25980E-06** at limit **
  12  Prefactor     .10000E-03    10.576        .49597E-07** at limit **
  13  norm          .10006E-03    4.1040       -.12439E-05** at limit **
  14  norm          .10000E-03    9.2602        .43910E-07** at limit **
  15  norm          .57732E-02    1.7329       -.33219E-06    .15701E-03
  16  norm          .10000E-03    3.6151        .11382E-05** at limit **
  17  norm          .10000E-03    3.2270        .67497E-06** at limit **
  18  Prefactor     .10000E-03    1.6191        .21752E-06** at limit **
  19  Prefactor     .10000E-03    5.5188        .10079E-06** at limit **
  20  Prefactor     36.946        45.705       -.33974E-05   -.57491E-04
  21  Prefactor     33.556        56.006        .29109E-06    .50302E-04
  22  Prefactor     27.559        20.064        .77826E-07   -.63710E-05
  23  Prefactor     .10000E-03    171.19        .10149E-04** at limit **
  24  Prefactor     .10000E-03    30.994       -.25221E-06** at limit **
  25  Prefactor     .10000E-03    40.277        .26256E-06** at limit **
  26  norm          .88585        1.7087        .56935E-06    .41149E-03
  27  Prefactor     .10000E-03    3.0628        .38529E-07** at limit **
  28  norm          .10000E-03    7.0999        .87335E-08** at limit **
  29  Normalizat    .65528        .19638       -.11382E-05    .25851E-04
  30  Prefactor     1.0621        .23885        .88570E-07   -.45327E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 18.0483
  Prefactor  = 11.4161
  Prefactor  = 0.0001
  Prefactor  = 16.1475
  Prefactor  = 0.0001
  Prefactor  = 15.3326
  Prefactor  = 134.805
  Prefactor  = 0.0001
  norm       = 8.26118
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100058
  norm       = 0.0001
  norm       = 0.00577316
  norm       = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 36.9456
  Prefactor  = 33.5561
  Prefactor  = 27.5593
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.885854
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.655284
  Prefactor  = 1.06206
 **********
 **   18 **HESSE 
 **********

 FCN=   3755.021     FROM HESSE     STATUS=OK           590 CALLS     4505 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          18.048        7.1832        .94273E-04   -1.4858    
   2  Prefactor     11.416        10.159        .11856E-03   -1.5032    
   3  Prefactor     .10000E-03    4.1939        .23980E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     16.147        14.571        .99668E-04   -1.4904    
   5  Prefactor     .10000E-03    10.375        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     15.333        16.948        .10229E-03   -1.4925    
   7  Prefactor     134.80        114.92        .17338E-03   -1.3381    
   8  Prefactor     .10000E-03    3.1416        .10589E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.2612        6.7360        .64843E-03   -1.5133    
  10  Prefactor     .10000E-03    44.948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    12.142        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    10.600        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10006E-03    19.467        .22192E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    9.2686        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .57732E-02    2.5255        .29095E-01   -1.5693    
  16  norm          .10000E-03    5.8254        .21101E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.2923        .10773E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.6317        .76038E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.5252        .14057E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     36.946        46.660        .65956E-04   -1.4492    
  21  Prefactor     33.556        55.904        .69195E-04   -1.4549    
  22  Prefactor     27.559        20.068        .76302E-04   -1.4658    
  23  Prefactor     .10000E-03    175.98        .21364E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    31.137        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    40.300        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .88585        1.5909        .10786E-02   -1.5520    
  27  Prefactor     .10000E-03    3.0856        .10470E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    7.1053        .15948E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .65528        .22791        .24137E-03   -1.0569    
  30  Prefactor     1.0621        .27875        .24465E-03   -.90688    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.55017e-09
Minuit parameter uncertainties:
  1  7.18351
  2  10.1604
  3  6.2736e-07
  4  14.5739
  5  1.49268e-05
  6  16.9531
  7  115.109
  8  3.33636e-06
  9  6.73657
  10  3.58226e-05
  11  2.12158e-05
  12  3.24721e-05
  13  0.00213122
  14  6.64757e-06
  15  0.239405
  16  0.000170551
  17  1.84468e-05
  18  4.1575e-06
  19  4.8078e-06
  20  46.7065
  21  55.9913
  22  20.0732
  23  0.000691891
  24  1.87181e-05
  25  9.73872e-05
  26  1.59102
  27  3.47316e-06
  28  1.71055e-06
  29  0.228241
  30  0.279136
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  3.247e-05  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.062e+00  2.791e-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.553e-01  2.282e-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: 7.67e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.94e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/192296/likelihoodResults_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.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) = 3755.02123258
delta logL = -0.000449281467809

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3755.02078443
delta logL = -1.12874022307e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11790E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4203       1.0000          .0000       10.000    
     3 'Normalizat'    .65512       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0623       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=   3755.021     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      236 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10067E-03    95.804        .18142E-02** at limit **
   2  Index         2.3797        5.5507        .50000        .99867E-05
   3  Normalizat    .65528        .13225E-01    .24138E-03    .85957E-05
   4  Prefactor     1.0621        .16825E-01    .24465E-03    .72724E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100673
  Index      = 2.37969
  Normalizat = 0.655283
  Prefactor  = 1.06206
 **********
 **   18 **HESSE 
 **********

 FCN=   3755.021     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      265 TOTAL
                     EDM=   .72E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10067E-03    417.61        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3797        5.4733        .50000       -.55161    
   3  Normalizat    .65528        .28721E-01    .96550E-05   -1.0569    
   4  Prefactor     1.0621        .36541E-01    .97860E-05   -.90688    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.19117e-09
Minuit parameter uncertainties:
  1  0.0337694
  2  676.555
  3  0.0287217
  4  0.0365415
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/192296': 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) = 3755.02078319
delta logL = 1.14344857138e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.007e-04  3.377e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.380e+00  6.766e+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.062e+00  3.654e-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.553e-01  2.872e-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/192296/cmap_HighResolution_496713601_496972801_4FGL_J1304.0+3704_daily_bin993.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.94e-03', job_status='DONE', photon_flux_upper_limit='7.67e-08', time_completed='2021-09-06 20:10:02.285591', job_id='192296', GAL2='1.06', fit_tolerance='1e-08', EG2='0.66', EG='0.66', time_epoch_completed='1630984202.29', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.06', dlogl='1.14e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='993' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:10:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0303>
Subject: Job 192296: <4FGL_J1304.0+3704_daily_bin993> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin993> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:55:28 2021
Job was executed on host(s) <bullet0303>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:55: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:55:31 2021
Terminated at Mon Sep  6 20:10:03 2021
Results reported at Mon Sep  6 20:10:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin993 196.008 37.071 496713601 496972801 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 :                                   667.28 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             266.56 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   871 sec.
    Turnaround time :                            875 sec.

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

