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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin435
RA = 196.008, Dec = 37.071
tmin = 352080001, tmax = 352339201
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='188085', job_status='RUN', time_executed='2021-09-06 19:41:48.804513', time_epoch_executed='1630982508.8' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='435'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/188085

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/188085/ft1_4FGL_J1304.0+3704_daily_bin435.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/188085/ft1_4FGL_J1304.0+3704_daily_bin435.fits outfile=/scratch/kocevski/188085/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin435.fits ra=196.008 dec=37.071 rad=12.0 tmin=352080001.0 tmax=352339201.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.47
user 3.24
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/188085/ft1_filtered_4FGL_J1304.0+3704_daily_bin435.fits" evtable="EVENTS" scfile=/scratch/kocevski/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits sctable="SC_DATA" outfile=/scratch/kocevski/188085/ltcube_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.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/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits
.....................!
real 14.88
user 14.54
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/188085/ft1_filtered_4FGL_J1304.0+3704_daily_bin435.fits evtable="EVENTS" scfile=/scratch/kocevski/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits sctable="SC_DATA" expcube=/scratch/kocevski/188085/ltcube_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.fits outfile=/scratch/kocevski/188085/expmap_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.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/188085/ltcube_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.fits
.....................!
real 193.09
user 188.57
sys 4.08

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/188085/ft1_filtered_4FGL_J1304.0+3704_daily_bin435.fits scfile=/scratch/kocevski/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits outfile=/scratch/kocevski/188085/cmap_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/188085/ft1_filtered_4FGL_J1304.0+3704_daily_bin435.fits scfile=/scratch/kocevski/188085/ft2_4FGL_J1304.0+3704_daily_bin435.fits outfile=/scratch/kocevski/188085/cmap_HighResolution_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.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.55
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    13.904       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10187E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    47.381       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .74104       1.0000         .10000E-03   10000.    
    14 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    4.8030       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.9036       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10658E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    26.639       1.0000         .10000E-03   10000.    
    21 'Prefactor '    37.249       1.0000         .10000E-03   10000.    
    22 'Prefactor '    2.0962       1.0000         .10000E-03   10000.    
    23 'Prefactor '    8.4110       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    9.3045       1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.0932       1.0000         .10000E-03   10000.    
    28 'norm      '    18.527       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .99406       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .94402       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=   5850.633     FROM MIGRAD    STATUS=CONVERGED    767 CALLS     3887 TOTAL
                     EDM=   .89E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1.8757       -.32475E-07** at limit **
   2  Prefactor     .10000E-03    3.9900       -.36420E-06** at limit **
   3  Prefactor     .10000E-03    2.0164       -.64281E-07** at limit **
   4  Prefactor     13.905        11.993       -.38351E-06   -.66481E-05
   5  Prefactor     .10000E-03    41.406        .67747E-05** at limit **
   6  Prefactor     .10000E-03    6.9785       -.75632E-06** at limit **
   7  Prefactor     .10000E-03    65.829        .25214E-05** at limit **
   8  Prefactor     .10000E-03    2.2231       -.63126E-08** at limit **
   9  norm          .10000E-03    1.6774       -.10030E-07** at limit **
  10  Prefactor     47.377        48.179       -.32694E-05   -.23622E-05
  11  Prefactor     .10000E-03    28.327       -.12598E-04** at limit **
  12  Prefactor     .10000E-03    5.0977        .22433E-06** at limit **
  13  norm          .74046        2.7682       -.12340E-05   -.11469E-02
  14  norm          .10000E-03    3.7277        .29914E-06** at limit **
  15  norm          4.8038        2.9288        .10335E-06    .17189E-03
  16  norm          .10000E-03    3.3820       -.69206E-07** at limit **
  17  norm          .10000E-03    .93334        .14272E-07** at limit **
  18  Prefactor     1.9024        2.7439        .26342E-05   -.18842E-04
  19  Prefactor     .10000E-03    13.104       -.42956E-06** at limit **
  20  Prefactor     26.623        33.142       -.15294E-04   -.37381E-04
  21  Prefactor     37.209        51.061       -.46116E-04   -.50251E-05
  22  Prefactor     2.0961        27.724       -.16803E-05   -.12023E-03
  23  Prefactor     8.4232        40.660        .26362E-04    .92759E-05
  24  Prefactor     .10000E-03    8.0334        .94403E-06** at limit **
  25  Prefactor     .10000E-03    22.772        .76006E-05** at limit **
  26  norm          9.3044        2.3085       -.16133E-06   -.47642E-04
  27  Prefactor     4.0931        4.1982       -.11791E-06   -.21692E-03
  28  norm          18.526        16.667       -.30646E-06   -.14024E-04
  29  Normalizat    .99400        .16681        .15932E-05   -.12202E-04
  30  Prefactor     .94413        .20670        .13572E-05    .57551E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.9045
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 47.3775
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.740457
  norm       = 0.0001
  norm       = 4.8038
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 1.90243
  Prefactor  = 0.000100001
  Prefactor  = 26.623
  Prefactor  = 37.2086
  Prefactor  = 2.09613
  Prefactor  = 8.42325
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.30438
  Prefactor  = 4.09313
  norm       = 18.5261
  Normalizat = 0.993996
  Prefactor  = 0.944131
 **********
 **   18 **HESSE 
 **********

 FCN=   5850.633     FROM HESSE     STATUS=OK           582 CALLS     4469 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    1.8887        .10226E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    4.0114        .14920E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.1019        .21189E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     13.905        11.984        .10742E-03   -1.4962    
   5  Prefactor     .10000E-03    42.106        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.9835        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    65.914        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.2297        .11136E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    1.6881        .96717E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     47.377        48.201        .58253E-04   -1.4330    
  11  Prefactor     .10000E-03    29.298        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.1049        .16865E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .74046        2.7103        .23871E-03   -1.5536    
  14  norm          .10000E-03    3.7282        .14423E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          4.8038        2.9171        .98167E-04   -1.5270    
  16  norm          .10000E-03    3.3978        .13692E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .93377        .72162E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.9024        2.7098        .14006E-03   -1.5432    
  19  Prefactor     .10000E-03    13.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     26.623        33.071        .77616E-04   -1.4676    
  21  Prefactor     37.209        50.781        .65667E-04   -1.4487    
  22  Prefactor     2.0961        27.747        .28508E-03   -1.5418    
  23  Prefactor     8.4232        40.294        .13823E-03   -1.5127    
  24  Prefactor     .10000E-03    8.0366        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    22.781        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          9.3044        2.3098        .55436E-04   -1.5098    
  27  Prefactor     4.0931        4.1918        .15363E-03   -1.5303    
  28  norm          18.526        16.666        .93051E-04   -1.4847    
  29  Normalizat    .99400        .19558        .22608E-03   -.93232    
  30  Prefactor     .94413        .24185        .28640E-03   -.94616    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.69818e-09
Minuit parameter uncertainties:
  1  4.48178e-06
  2  1.08457e-05
  3  8.24178e-06
  4  11.986
  5  0.000132024
  6  4.79209e-06
  7  7.86692e-05
  8  1.35957e-06
  9  3.97813e-07
  10  48.2404
  11  0.000213364
  12  2.98895e-06
  13  2.71077
  14  1.276e-06
  15  2.9172
  16  2.0433e-06
  17  2.16847e-06
  18  2.70996
  19  0.000262259
  20  33.094
  21  50.8398
  22  15.2611
  23  36.8862
  24  9.14123e-07
  25  1.56132e-05
  26  2.30986
  27  4.19208
  28  16.6703
  29  0.195719
  30  0.242131
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  2.989e-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:  9.441e-01  2.421e-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:  9.940e-01  1.957e-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: 4.99e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.86e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/188085/likelihoodResults_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.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) = 5850.63384351
delta logL = -0.000932022670895

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5850.63291168
delta logL = -1.93098458112e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10251E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4127       1.0000          .0000       10.000    
     3 'Normalizat'    .99390       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94427       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5850.633     FROM MIGRAD    STATUS=FAILED       112 CALLS      259 TOTAL
                     EDM=   .32E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.475        .68834E-01** at limit **
   2  Index         1.0357        6.3951        .50000       -.59226E-05
   3  Normalizat    .99400        .93736E-02    .22608E-03   -.88245E-03
   4  Prefactor     .94413        .11664E-01    .28640E-03   -.69538E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5850.633     FROM SIMPLEX   STATUS=UNCHANGED    150 CALLS      409 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.475        .63628E-03** at limit **
   2  Index         1.0357        6.3951        .59483E-04   -.59226E-05
   3  Normalizat    .99400        .93736E-02    .21435E-07   -.88245E-03
   4  Prefactor     .94413        .11664E-01    .16514E-07   -.69538E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5850.633     FROM MIGRAD    STATUS=FAILED        70 CALLS      479 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6302.2        .71220E-03** at limit **
   2  Index         1.0364        8.9089        .50000       -.58570E-05
   3  Normalizat    .99400        .83305E-01    .90431E-05   -.86468E-03
   4  Prefactor     .94413        .10365        .11456E-04   -.68177E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.03636
  Normalizat = 0.993996
  Prefactor  = 0.944128
 **********
 **   18 **HESSE 
 **********

 FCN=   5850.633     FROM HESSE     STATUS=OK            27 CALLS      506 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.978        .14244E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.0364        7.6807        .50000       -.91527    
   3  Normalizat    .99400        .19208        .18086E-05   -.93232    
   4  Prefactor     .94413        .23891        .22912E-05   -.94616    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.44577e-08
Minuit parameter uncertainties:
  1  0.00016699
  2  130.4
  3  0.192214
  4  0.239176
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/188085': 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): 1
logL (Free Index) = 5850.632905
delta logL = 6.48989589536e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.670e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.036e+00  1.304e+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:  9.441e-01  2.392e-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:  9.940e-01  1.922e-01  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/188085/cmap_HighResolution_352080001_352339201_4FGL_J1304.0+3704_daily_bin435.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.86e-03', job_status='DONE', photon_flux_upper_limit='4.99e-08', time_completed='2021-09-06 19:56:10.248150', job_id='188085', GAL2='0.94', fit_tolerance='1e-08', EG2='0.99', EG='0.99', time_epoch_completed='1630983370.25', return_code2='1', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='6.49e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='435' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:56:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0228>
Subject: Job 188085: <4FGL_J1304.0+3704_daily_bin435> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin435> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 19:40:31 2021
Job was executed on host(s) <bullet0228>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:41: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:41:34 2021
Terminated at Mon Sep  6 19:56:11 2021
Results reported at Mon Sep  6 19:56:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin435 196.008 37.071 352080001 352339201 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 :                                   857.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             323.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   876 sec.
    Turnaround time :                            940 sec.

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

