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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin957
RA = 196.008, Dec = 37.071
tmin = 487382401, tmax = 487641601
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='192246', job_status='RUN', time_executed='2021-09-06 19:58:07.208023', time_epoch_executed='1630983487.21' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='957'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/192246

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/192246/ft1_4FGL_J1304.0+3704_daily_bin957.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/192246/ft2_4FGL_J1304.0+3704_daily_bin957.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/192246/ft1_4FGL_J1304.0+3704_daily_bin957.fits outfile=/scratch/kocevski/192246/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin957.fits ra=196.008 dec=37.071 rad=12.0 tmin=487382401.0 tmax=487641601.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.85
user 3.59
sys 0.22

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

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

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/192246/ft1_filtered_4FGL_J1304.0+3704_daily_bin957.fits evtable="EVENTS" scfile=/scratch/kocevski/192246/ft2_4FGL_J1304.0+3704_daily_bin957.fits sctable="SC_DATA" expcube=/scratch/kocevski/192246/ltcube_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.fits outfile=/scratch/kocevski/192246/expmap_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.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/192246/ltcube_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.fits
.....................!
real 190.66
user 185.78
sys 4.34

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/192246/ft1_filtered_4FGL_J1304.0+3704_daily_bin957.fits scfile=/scratch/kocevski/192246/ft2_4FGL_J1304.0+3704_daily_bin957.fits outfile=/scratch/kocevski/192246/cmap_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.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.38
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    12.287       1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.6930       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11554E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    15.332       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    8.8488       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.1404       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.2332       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    5.1467       1.0000         .10000E-03   10000.    
    16 'norm      '    .10035E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10099E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    1.9567       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .11381E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    108.88       1.0000         .10000E-03   10000.    
    26 'norm      '    1.8715       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1073       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .74977       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=   5688.760     FROM MIGRAD    STATUS=CONVERGED    767 CALLS     3879 TOTAL
                     EDM=   .26E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          12.292        4.5066       -.25574E-06   -.38063E-03
   2  Prefactor     5.6933        4.8506       -.36972E-07   -.32652E-05
   3  Prefactor     .10000E-03    1.4559        .49729E-06** at limit **
   4  Prefactor     15.334        10.305       -.14541E-07   -.34325E-04
   5  Prefactor     .10000E-03    6.2615       -.22991E-06** at limit **
   6  Prefactor     8.8493        12.723       -.89669E-08   -.58200E-05
   7  Prefactor     .10000E-03    46.668       -.40891E-06** at limit **
   8  Prefactor     4.1405        4.8601       -.11863E-07   -.42663E-04
   9  norm          .10000E-03    1.4483       -.31533E-07** at limit **
  10  Prefactor     .10000E-03    14.111       -.49140E-06** at limit **
  11  Prefactor     .10000E-03    21.240        .12885E-05** at limit **
  12  Prefactor     .10000E-03    6.8568        .53171E-06** at limit **
  13  norm          1.2338        4.0068        .13255E-06   -.57784E-04
  14  norm          .10000E-03    3.6859       -.30926E-08** at limit **
  15  norm          5.1483        3.0439        .86475E-07    .16294E-03
  16  norm          .10000E-03    7.9717       -.22950E-06** at limit **
  17  norm          .10000E-03    1.3902        .29813E-08** at limit **
  18  Prefactor     .10000E-03    2.2644       -.23733E-07** at limit **
  19  Prefactor     .10000E-03    8.7975       -.33932E-07** at limit **
  20  Prefactor     .10000E-03    15.780       -.12721E-05** at limit **
  21  Prefactor     .10000E-03    76.641        .21704E-05** at limit **
  22  Prefactor     .10000E-03    7.9100       -.26475E-06** at limit **
  23  Prefactor     1.9587        62.577        .10662E-04    .91472E-06
  24  Prefactor     .10000E-03    51.358       -.17081E-05** at limit **
  25  Prefactor     108.89        81.725       -.13775E-05    .17786E-05
  26  norm          1.8715        1.2639       -.15018E-07    .38220E-04
  27  Prefactor     .10000E-03    2.5148       -.22412E-07** at limit **
  28  norm          .10000E-03    12.072        .12230E-05** at limit **
  29  Normalizat    1.1072        .15956       -.59578E-06   -.40362E-04
  30  Prefactor     .74979        .19325        .75025E-06   -.19976E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 12.2917
  Prefactor  = 5.69332
  Prefactor  = 0.0001
  Prefactor  = 15.3336
  Prefactor  = 0.0001
  Prefactor  = 8.84927
  Prefactor  = 0.0001
  Prefactor  = 4.14053
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.23383
  norm       = 0.0001
  norm       = 5.14826
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.9587
  Prefactor  = 0.0001
  Prefactor  = 108.895
  norm       = 1.87155
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.10722
  Prefactor  = 0.749787
 **********
 **   18 **HESSE 
 **********

 FCN=   5688.760     FROM HESSE     STATUS=OK           584 CALLS     4463 TOTAL
                     EDM=   .47E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          12.292        4.4252        .92610E-04   -1.5007    
   2  Prefactor     5.6933        4.8519        .14924E-03   -1.5231    
   3  Prefactor     .10000E-03    2.9907        .17003E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     15.334        10.300        .10229E-03   -1.4925    
   5  Prefactor     .10000E-03    6.2632        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     8.8493        12.715        .13474E-03   -1.5113    
   7  Prefactor     .10000E-03    46.810        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.1405        4.8405        .17123E-03   -1.5301    
   9  norm          .10000E-03    1.4568        .88625E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    14.114        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    21.265        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.8605        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.2338        3.9234        .25750E-03   -1.5486    
  14  norm          .10000E-03    3.6873        .14142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          5.1483        2.9850        .95335E-04   -1.5254    
  16  norm          .10000E-03    8.1052        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.4071        .86842E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    4.5915        .21413E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    8.8430        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    15.772        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    77.260        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    7.9462        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     1.9587        63.061        .14830E-02   -1.5428    
  24  Prefactor     .10000E-03    52.287        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     108.89        82.421        .38545E-04   -1.3617    
  26  norm          1.8715        1.2571        .67221E-04   -1.5434    
  27  Prefactor     .10000E-03    2.5605        .11679E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    12.149        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1072        .18547        .20100E-03   -.89520    
  30  Prefactor     .74979        .22521        .29907E-03   -1.0161    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.66732e-11
Minuit parameter uncertainties:
  1  4.42534
  2  4.85222
  3  1.02021e-05
  4  10.3013
  5  3.35759e-06
  6  12.7189
  7  2.60185e-06
  8  4.84091
  9  1.34987e-06
  10  1.10649e-05
  11  6.79252e-05
  12  1.1358e-05
  13  3.92426
  14  4.32448e-07
  15  2.9851
  16  2.09163e-06
  17  5.48185e-07
  18  5.59982e-06
  19  1.14403e-06
  20  3.77461e-05
  21  0.000203778
  22  4.37841e-06
  23  22.2528
  24  0.000148325
  25  82.508
  26  1.25713
  27  1.03215e-06
  28  1.63522e-05
  29  0.185583
  30  0.225485
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.136e-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:  7.498e-01  2.255e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.107e+00  1.856e-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.76e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.46e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/192246/likelihoodResults_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.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) = 5688.76102671
delta logL = -0.000694088821547

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5688.76033347
delta logL = -8.49095158628e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11711E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4013       1.0000          .0000       10.000    
     3 'Normalizat'    1.1073       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .74975       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=   5688.760     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      241 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10649E-03    6.3090        .18142E-01** at limit **
   2  Index         2.2727        6.8660        .50000        .33484E-04
   3  Normalizat    1.1072        .32783E-02    .20100E-03   -.22848E-03
   4  Prefactor     .74979        .41062E-02    .29907E-03    .81006E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00010649
  Index      = 2.27275
  Normalizat = 1.10722
  Prefactor  = 0.749791
 **********
 **   18 **HESSE 
 **********

 FCN=   5688.760     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      270 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10649E-03    75.605        .21507E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2727        7.0446        .50000       -.57693    
   3  Normalizat    1.1072        .11399E-01    .40200E-04   -.89520    
   4  Prefactor     .74979        .14278E-01    .11963E-04   -1.0161    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.9406e-08
Minuit parameter uncertainties:
  1  0.0443595
  2  312.399
  3  0.0113989
  4  0.0142777
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/192246': 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) = 5688.76033152
delta logL = 1.10274413601e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.065e-04  4.436e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.273e+00  3.124e+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:  7.498e-01  1.428e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.107e+00  1.140e-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/192246/cmap_HighResolution_487382401_487641601_4FGL_J1304.0+3704_daily_bin957.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.46e-03', job_status='DONE', photon_flux_upper_limit='5.76e-08', time_completed='2021-09-06 20:11:57.371076', job_id='192246', GAL2='0.75', fit_tolerance='1e-08', EG2='1.11', EG='1.11', time_epoch_completed='1630984317.37', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.75', dlogl='1.10e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='957' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:11:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0065>
Subject: Job 192246: <4FGL_J1304.0+3704_daily_bin957> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin957 196.008 37.071 487382401 487641601 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 :                                   825.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             291.12 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   988 sec.
    Turnaround time :                            993 sec.

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

