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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin178
RA = 196.008, Dec = 37.071
tmin = 285465601, tmax = 285724801
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='186596', job_status='RUN', time_executed='2021-09-06 19:35:52.180031', time_epoch_executed='1630982152.18' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='178'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186596

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186596/ft1_4FGL_J1304.0+3704_daily_bin178.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186596/ft1_4FGL_J1304.0+3704_daily_bin178.fits outfile=/scratch/kocevski/186596/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin178.fits ra=196.008 dec=37.071 rad=12.0 tmin=285465601.0 tmax=285724801.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.52
user 3.25
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186596/ft1_filtered_4FGL_J1304.0+3704_daily_bin178.fits" evtable="EVENTS" scfile=/scratch/kocevski/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits sctable="SC_DATA" outfile=/scratch/kocevski/186596/ltcube_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.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/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits
.....................!
real 15.28
user 14.76
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186596/ft1_filtered_4FGL_J1304.0+3704_daily_bin178.fits evtable="EVENTS" scfile=/scratch/kocevski/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits sctable="SC_DATA" expcube=/scratch/kocevski/186596/ltcube_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.fits outfile=/scratch/kocevski/186596/expmap_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.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/186596/ltcube_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.fits
.....................!
real 194.43
user 187.90
sys 4.21

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/186596/ft1_filtered_4FGL_J1304.0+3704_daily_bin178.fits scfile=/scratch/kocevski/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits outfile=/scratch/kocevski/186596/cmap_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.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.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186596/ft1_filtered_4FGL_J1304.0+3704_daily_bin178.fits scfile=/scratch/kocevski/186596/ft2_4FGL_J1304.0+3704_daily_bin178.fits outfile=/scratch/kocevski/186596/cmap_HighResolution_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.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.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.5227       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.9077       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    40.160       1.0000         .10000E-03   10000.    
     8 'Prefactor '    8.7812       1.0000         .10000E-03   10000.    
     9 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    30.487       1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.629       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    4.6107       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    20.113       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.8282       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10126E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    23.381       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    14.722       1.0000         .10000E-03   10000.    
    26 'norm      '    1.1365       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    1.7421       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0343       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .82314       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=   5933.741     FROM MIGRAD    STATUS=CONVERGED    734 CALLS     3897 TOTAL
                     EDM=   .18E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.5227        2.8549       -.14688E-06   -.22367E-03
   2  Prefactor     .10000E-03    1.3910        .65209E-07** at limit **
   3  Prefactor     .10000E-03    1.3757        .13881E-06** at limit **
   4  Prefactor     4.9075        5.4746        .19228E-05    .44358E-03
   5  Prefactor     .10000E-03    8.4466        .11275E-06** at limit **
   6  Prefactor     .10000E-03    5.6767        .71296E-07** at limit **
   7  Prefactor     40.162        38.786       -.15241E-06    .17998E-05
   8  Prefactor     8.7816        5.6712        .25504E-07    .20480E-04
   9  norm          .10000E-03    .97597        .74152E-07** at limit **
  10  Prefactor     30.489        32.833        .34500E-08    .23482E-06
  11  Prefactor     32.631        19.886       -.18252E-06    .11764E-04
  12  Prefactor     .10000E-03    7.1762        .12754E-06** at limit **
  13  norm          .10000E-03    1.3047        .42583E-07** at limit **
  14  norm          .10000E-03    9.3389        .17898E-06** at limit **
  15  norm          4.6104        2.8187        .36600E-07    .11892E-03
  16  norm          .10000E-03    4.3098       -.51631E-06** at limit **
  17  norm          20.113        6.3217       -.24063E-07    .43330E-05
  18  Prefactor     3.8280        2.8539       -.12683E-06   -.77769E-05
  19  Prefactor     .10000E-03    11.119        .17644E-06** at limit **
  20  Prefactor     .10000E-03    22.440       -.15289E-06** at limit **
  21  Prefactor     .10000E-03    14.189       -.52136E-07** at limit **
  22  Prefactor     .10000E-03    9.3992        .28130E-06** at limit **
  23  Prefactor     23.376        45.743       -.28531E-06    .53729E-06
  24  Prefactor     .10000E-03    8.1539        .13140E-06** at limit **
  25  Prefactor     14.629        61.963       -.30945E-05   -.44907E-04
  26  norm          1.1369        1.2878       -.97784E-07   -.11680E-03
  27  Prefactor     .10000E-03    5.2964        .33165E-06** at limit **
  28  norm          1.7384        30.592       -.12542E-05   -.12126E-04
  29  Normalizat    1.0341        .17882        .38989E-05   -.20402E-03
  30  Prefactor     .82334        .21740       -.54930E-05    .51665E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.5227
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.9075
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 40.1622
  Prefactor  = 8.78158
  norm       = 0.0001
  Prefactor  = 30.4886
  Prefactor  = 32.6313
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 4.6104
  norm       = 0.0001
  norm       = 20.1133
  Prefactor  = 3.82798
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.3758
  Prefactor  = 0.0001
  Prefactor  = 14.6286
  norm       = 1.13694
  Prefactor  = 0.0001
  norm       = 1.73841
  Normalizat = 1.03413
  Prefactor  = 0.82334
 **********
 **   18 **HESSE 
 **********

 FCN=   5933.741     FROM HESSE     STATUS=OK           584 CALLS     4481 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.5227        2.7541        .97090E-04   -1.5283    
   2  Prefactor     .10000E-03    1.3917        .88726E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    3.1230        .16923E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.9075        5.6542        .90780E-03   -1.5265    
   5  Prefactor     .10000E-03    8.4568        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    5.6783        .17925E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     40.162        38.788        .63251E-04   -1.4440    
   8  Prefactor     8.7816        5.6691        .13526E-03   -1.5115    
   9  norm          .10000E-03    .97721        .74301E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     30.489        32.835        .72565E-04   -1.4603    
  11  Prefactor     32.631        19.876        .70149E-04   -1.4565    
  12  Prefactor     .10000E-03    7.2150        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.3082        .85917E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    9.3996        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          4.6104        2.7993        .95743E-04   -1.5278    
  16  norm          .10000E-03    4.3446        .15529E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          20.113        6.3202        .89309E-04   -1.4811    
  18  Prefactor     3.8280        2.8433        .10617E-03   -1.5317    
  19  Prefactor     .10000E-03    11.187        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    22.453        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    14.193        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    9.4560        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     23.376        45.492        .82840E-04   -1.4741    
  24  Prefactor     .10000E-03    8.1606        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     14.629        62.690        .10439E-03   -1.4943    
  26  norm          1.1369        1.2484        .87842E-04   -1.5495    
  27  Prefactor     .10000E-03    5.4107        .17302E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          1.7384        30.605        .31783E-03   -1.5444    
  29  Normalizat    1.0341        .18782        .21034E-03   -.91896    
  30  Prefactor     .82334        .22742        .29346E-03   -.98874    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.21523e-10
Minuit parameter uncertainties:
  1  2.75418
  2  7.49709e-07
  3  1.22451e-05
  4  5.6548
  5  4.28237e-06
  6  1.53351e-06
  7  38.8126
  8  5.66942
  9  9.85829e-07
  10  32.854
  11  19.8803
  12  8.9974e-06
  13  1.02346e-06
  14  1.06665e-05
  15  2.79939
  16  1.46477e-05
  17  6.32045
  18  2.84337
  19  2.25092e-06
  20  1.52775e-05
  21  6.49117e-06
  22  3.29657e-06
  23  45.5592
  24  7.19352e-06
  25  60.6742
  26  1.24841
  27  4.45078e-06
  28  14.5965
  29  0.187941
  30  0.227677
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.997e-06  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:  8.233e-01  2.277e-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.034e+00  1.879e-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.14e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.98e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186596/likelihoodResults_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.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) = 5933.7418619
delta logL = -0.000660193561089

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5933.74120221
delta logL = -5.07046024723e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11137E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4053       1.0000          .0000       10.000    
     3 'Normalizat'    1.0342       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .82331       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=   5933.741     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      243 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10930E-03    6.1917        .18142E-01** at limit **
   2  Index         2.2184        8.6631        .50000        .26289E-04
   3  Normalizat    1.0341        .31201E-02    .21034E-03   -.15197E-03
   4  Prefactor     .82334        .39441E-02    .29346E-03    .46488E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000109297
  Index      = 2.21842
  Normalizat = 1.03413
  Prefactor  = 0.823339
 **********
 **   18 **HESSE 
 **********

 FCN=   5933.741     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      272 TOTAL
                     EDM=   .40E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10930E-03    474.64        .45440E-03   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2184        6.1963        .50000       -.58995    
   3  Normalizat    1.0341        .28787E-01    .42068E-04   -.91896    
   4  Prefactor     .82334        .36387E-01    .11739E-04   -.98874    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.99792e-07
Minuit parameter uncertainties:
  1  0.133932
  2  1042.1
  3  0.0287874
  4  0.0363881
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186596': 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) = 5933.7412006
delta logL = 1.10271685116e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.093e-04  1.339e-01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.218e+00  1.042e+03  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:  8.233e-01  3.639e-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.034e+00  2.879e-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/186596/cmap_HighResolution_285465601_285724801_4FGL_J1304.0+3704_daily_bin178.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.98e-03', job_status='DONE', photon_flux_upper_limit='5.14e-08', time_completed='2021-09-06 19:50:24.970419', job_id='186596', GAL2='0.82', fit_tolerance='1e-08', EG2='1.03', EG='1.03', time_epoch_completed='1630983024.97', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.82', dlogl='1.10e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='178' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:50:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0051>
Subject: Job 186596: <4FGL_J1304.0+3704_daily_bin178> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin178> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:30 2021
Job was executed on host(s) <bullet0051>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:34 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:35:34 2021
Terminated at Mon Sep  6 19:50:25 2021
Results reported at Mon Sep  6 19:50:25 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin178 196.008 37.071 285465601 285724801 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 :                                   858.41 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             337.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   891 sec.
    Turnaround time :                            895 sec.

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

