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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin329
RA = 196.008, Dec = 37.071
tmin = 324604801, tmax = 324864001
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='186834', job_status='RUN', time_executed='2021-09-06 19:39:23.528179', time_epoch_executed='1630982363.53' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='329'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186834

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186834/ft1_4FGL_J1304.0+3704_daily_bin329.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186834/ft1_4FGL_J1304.0+3704_daily_bin329.fits outfile=/scratch/kocevski/186834/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin329.fits ra=196.008 dec=37.071 rad=12.0 tmin=324604801.0 tmax=324864001.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 9.66
user 9.24
sys 0.34

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186834/ft1_filtered_4FGL_J1304.0+3704_daily_bin329.fits" evtable="EVENTS" scfile=/scratch/kocevski/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits sctable="SC_DATA" outfile=/scratch/kocevski/186834/ltcube_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.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/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits
.....................!
real 15.34
user 14.95
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186834/ft1_filtered_4FGL_J1304.0+3704_daily_bin329.fits evtable="EVENTS" scfile=/scratch/kocevski/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits sctable="SC_DATA" expcube=/scratch/kocevski/186834/ltcube_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.fits outfile=/scratch/kocevski/186834/expmap_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.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/186834/ltcube_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.fits
.....................!
real 192.52
user 187.37
sys 4.56

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/186834/ft1_filtered_4FGL_J1304.0+3704_daily_bin329.fits scfile=/scratch/kocevski/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits outfile=/scratch/kocevski/186834/cmap_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.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/186834/ft1_filtered_4FGL_J1304.0+3704_daily_bin329.fits scfile=/scratch/kocevski/186834/ft2_4FGL_J1304.0+3704_daily_bin329.fits outfile=/scratch/kocevski/186834/cmap_HighResolution_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.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.58
user 0.41
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    17.062       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    26.742       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10062E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    3.5211       1.0000         .10000E-03   10000.    
    10 'Prefactor '    114.97       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    26.801       1.0000         .10000E-03   10000.    
    13 'norm      '    7.0003       1.0000         .10000E-03   10000.    
    14 'norm      '    .10184E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.5811       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10104E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    119.87       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    6.0657       1.0000         .10000E-03   10000.    
    28 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0629       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.1009       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=   2857.934     FROM MIGRAD    STATUS=CONVERGED    757 CALLS     3892 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    3.5717       -.34070E-06** at limit **
   2  Prefactor     .10000E-03    40.469       -.13366E-04** at limit **
   3  Prefactor     17.062        6.8739        .38371E-05    .11922E-03
   4  Prefactor     .10000E-03    7.5691        .15619E-06** at limit **
   5  Prefactor     26.740        52.889       -.18793E-05    .18020E-05
   6  Prefactor     .10000E-03    23.003       -.47122E-05** at limit **
   7  Prefactor     .10000E-03    61.248        .12836E-04** at limit **
   8  Prefactor     .10000E-03    7.2226       -.24449E-06** at limit **
   9  norm          3.5201        6.5248        .43596E-05    .34576E-04
  10  Prefactor     114.98        91.671        .82324E-05    .72511E-04
  11  Prefactor     .10000E-03    49.760       -.26034E-04** at limit **
  12  Prefactor     26.799        28.344        .45078E-06    .45865E-04
  13  norm          6.9999        9.4919        .14740E-06   -.12510E-04
  14  norm          .10067E-03    20.933       -.25146E-05** at limit **
  15  norm          .10000E-03    2.7455       -.13658E-06** at limit **
  16  norm          .10000E-03    5.2244       -.11348E-06** at limit **
  17  norm          .10000E-03    2.0818        .18559E-07** at limit **
  18  Prefactor     .10000E-03    3.5343       -.40012E-07** at limit **
  19  Prefactor     .10000E-03    5.8671        .51749E-08** at limit **
  20  Prefactor     7.5552        61.211       -.16610E-04   -.16986E-04
  21  Prefactor     .10000E-03    30.827        .10601E-04** at limit **
  22  Prefactor     .10000E-03    24.837       -.48990E-05** at limit **
  23  Prefactor     .10000E-03    33.571        .10466E-04** at limit **
  24  Prefactor     119.87        67.878        .10841E-05    .20853E-04
  25  Prefactor     .10000E-03    61.996        .17630E-04** at limit **
  26  norm          .10000E-03    .75025        .97928E-07** at limit **
  27  Prefactor     6.0652        12.741       -.65809E-06   -.75182E-04
  28  norm          .10000E-03    19.438        .29654E-05** at limit **
  29  Normalizat    1.0631        .26754       -.15219E-05    .20003E-03
  30  Prefactor     1.1008        .31951       -.89185E-06    .12784E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 17.0618
  Prefactor  = 0.0001
  Prefactor  = 26.7403
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.52006
  Prefactor  = 114.983
  Prefactor  = 0.000100001
  Prefactor  = 26.799
  norm       = 6.99995
  norm       = 0.000100674
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.5552
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 119.874
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 6.06525
  norm       = 0.0001
  Normalizat = 1.06306
  Prefactor  = 1.1008
 **********
 **   18 **HESSE 
 **********

 FCN=   2857.934     FROM HESSE     STATUS=OK           574 CALLS     4466 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    3.5804        .98675E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    41.521        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     17.062        6.8708        .86412E-04   -1.4882    
   4  Prefactor     .10000E-03    7.5719        .14365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     26.740        53.049        .77468E-04   -1.4673    
   6  Prefactor     .10000E-03    23.024        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    61.188        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    7.2573        .14026E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          3.5201        6.4985        .17856E-03   -1.5333    
  10  Prefactor     114.98        90.050        .18761E-03   -1.3559    
  11  Prefactor     .10000E-03    50.188        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     26.799        28.376        .77382E-04   -1.4672    
  13  norm          6.9999        9.4787        .15163E-03   -1.5179    
  14  norm          .10067E-03    268.19        .46250E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.7702        .86471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.2477        .11932E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    2.0834        .75316E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    3.6398        .19604E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.8684        .12648E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     7.5552        61.656        .14565E-03   -1.5158    
  21  Prefactor     .10000E-03    30.815        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    24.862        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    33.674        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     119.87        67.844        .36756E-04   -1.3514    
  25  Prefactor     .10000E-03    61.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .10000E-03    .76263        .45208E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     6.0652        12.782        .16302E-03   -1.5215    
  28  norm          .10000E-03    19.592        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.0631        .31791        .24287E-03   -.90947    
  30  Prefactor     1.1008        .37856        .29445E-03   -.89441    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.59709e-09
Minuit parameter uncertainties:
  1  5.18705e-05
  2  0.000115459
  3  6.87113
  4  2.09807e-05
  5  53.1424
  6  1.05019e-06
  7  9.27227e-05
  8  6.3825e-06
  9  6.49984
  10  90.1573
  11  0.000321412
  12  28.3898
  13  9.48069
  14  0.0270098
  15  1.08451e-05
  16  1.18663e-05
  17  1.05045e-05
  18  2.62907e-07
  19  6.36636e-08
  20  43.2265
  21  5.28881e-06
  22  1.7149e-05
  23  0.00016403
  24  67.8883
  25  3.49408e-05
  26  2.56045e-06
  27  12.7881
  28  1.36481e-05
  29  0.31848
  30  0.379485
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.680e+01  2.839e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.101e+00  3.795e-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.063e+00  3.185e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.77
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 5.50e-08 +/- 5.82e-08
Energy Flux (Fixed Index): 1.72e-05 +/- 1.82e-05

TS (Fixed Index): 1.77
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.86e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.44e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186834/likelihoodResults_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2857.93284719
delta logL = 0.0011368537248

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2857.93156576
delta logL = 0.00241828412982

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    28.674       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3745       1.0000          .0000       10.000    
     3 'Normalizat'    1.0657       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0982       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.

 FCN=   2857.932     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      223 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     28.674        918.65        .18705E-02    .25066E-04
   2  Index         2.3743        5.9996        .17179        .35392E-04
   3  Normalizat    1.0660        .11944        .39607E-01    .19506E-05
   4  Prefactor     1.0978        .12257        .66636E-01    .54509E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 28.6736
  Index      = 2.37435
  Normalizat = 1.06602
  Prefactor  = 1.09781
 **********
 **   18 **HESSE 
 **********

 FCN=   2857.932     FROM HESSE     STATUS=OK            33 CALLS      256 TOTAL
                     EDM=   .87E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     28.674        40.350        .74819E-04   -1.4636    
   2  Index         2.3743        .90773        .61184E-02   -.55287    
   3  Normalizat    1.0660        .30651        .24257E-03   -.90850    
   4  Prefactor     1.0978        .37557        .29478E-03   -.89537    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.71005e-10
Minuit parameter uncertainties:
  1  40.3887
  2  0.914755
  3  0.307025
  4  0.376479
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186834': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2857.93156528
delta logL = 0.00241875850315

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.867e+01  4.039e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.374e+00  9.148e-01  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.098e+00  3.765e-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.066e+00  3.070e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.78
Ra Dec: 196.008 37.071
Photon Index (Free Index): 2.37 +/- 0.91
Photon Flux (Free Index): 5.33e-08 +/- 5.74e-08
Energy Flux (Free Index): 1.81e-05 +/- 2.29e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/186834/cmap_HighResolution_324604801_324864001_4FGL_J1304.0+3704_daily_bin329.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.44e-02', comment='SUCCESS', photon_flux='5.50e-08', energy_flux2='1.81e-05', photon_flux_error='5.82e-08', dlogl='2.42e-03', energy_flux='1.72e-05', photon_flux2='5.33e-08', job_status='DONE', time_completed='2021-09-06 19:49:39.910697', photon_index_error2='0.91', photon_index2='2.37', ts='1.77', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', photon_flux_upper_limit='1.86e-07', energy_flux_error2='2.29e-05', EG='1.06', time_epoch_completed='1630982979.91', return_code='0', job_id='186834', GAL2='1.10', EG2='1.07', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='5.74e-08', ts2='1.78', photon_index='2.44' WHERE bin_id='329' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:49:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0233>
Subject: Job 186834: <4FGL_J1304.0+3704_daily_bin329> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin329> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:51 2021
Job was executed on host(s) <bullet0233>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:54 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:54 2021
Terminated at Mon Sep  6 19:49:40 2021
Results reported at Mon Sep  6 19:49:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin329 196.008 37.071 324604801 324864001 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 :                                   609.39 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             246.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   826 sec.
    Turnaround time :                            829 sec.

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

