/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 112 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 = 7566
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1304.0+3704_daily_bin40
RA = 196.008, Dec = 37.071
tmin = 249696001, tmax = 249955201
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='183897', job_status='RUN', time_executed='2021-09-06 19:27:48.097407', time_epoch_executed='1630981668.1' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='40'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/183897

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/183897/ft1_4FGL_J1304.0+3704_daily_bin40.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/183897/ft2_4FGL_J1304.0+3704_daily_bin40.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/183897/ft1_4FGL_J1304.0+3704_daily_bin40.fits outfile=/scratch/kocevski/183897/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin40.fits ra=196.008 dec=37.071 rad=12.0 tmin=249696001.0 tmax=249955201.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 1.49
user 1.31
sys 0.16

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/183897/ft1_filtered_4FGL_J1304.0+3704_daily_bin40.fits evtable="EVENTS" scfile=/scratch/kocevski/183897/ft2_4FGL_J1304.0+3704_daily_bin40.fits sctable="SC_DATA" expcube=/scratch/kocevski/183897/ltcube_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.fits outfile=/scratch/kocevski/183897/expmap_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.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/183897/ltcube_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.fits
.....................!
real 192.81
user 187.68
sys 4.63

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/183897/ft1_filtered_4FGL_J1304.0+3704_daily_bin40.fits scfile=/scratch/kocevski/183897/ft2_4FGL_J1304.0+3704_daily_bin40.fits outfile=/scratch/kocevski/183897/cmap_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/183897/ft1_filtered_4FGL_J1304.0+3704_daily_bin40.fits scfile=/scratch/kocevski/183897/ft2_4FGL_J1304.0+3704_daily_bin40.fits outfile=/scratch/kocevski/183897/cmap_HighResolution_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=196.008 yref=37.071 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.57
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.6440       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .13055E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.0915       1.0000         .10000E-03   10000.    
     4 'Prefactor '    13.816       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    15.575       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .51817E-02   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    7.3933       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.3620       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .65598       1.0000         .10000E-03   10000.    
    13 'norm      '    .10301E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    12.603       1.0000         .10000E-03   10000.    
    15 'norm      '    20.341       1.0000         .10000E-03   10000.    
    16 'norm      '    10.613       1.0000         .10000E-03   10000.    
    17 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .57462E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    29.386       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10451E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    2.8427       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .64754E-01   1.0000         .10000E-03   10000.    
    28 'norm      '    15.645       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .73725       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.3212       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=   5579.179     FROM MIGRAD    STATUS=CONVERGED    826 CALLS     4005 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.6439        3.8389        .19363E-06    .24030E-03
   2  Prefactor     .10000E-03    4.4430        .40586E-06** at limit **
   3  Prefactor     5.0913        2.8424       -.55951E-07   -.53781E-04
   4  Prefactor     13.813        11.579        .27370E-06    .48265E-06
   5  Prefactor     .10000E-03    22.333       -.33463E-07** at limit **
   6  Prefactor     15.573        20.157       -.25148E-06   -.13689E-03
   7  Prefactor     .10008E-03    820.55        .29462E-04** at limit **
   8  Prefactor     .10000E-03    2.4683        .20102E-06** at limit **
   9  norm          7.3833        7.7099        .37615E-06   -.11371E-03
  10  Prefactor     .10000E-03    86.525       -.46301E-05** at limit **
  11  Prefactor     5.4341        84.887        .34801E-05   -.12850E-03
  12  Prefactor     .65078        41.250       -.34917E-05   -.75023E-03
  13  norm          .10000E-03    8.2750        .32681E-06** at limit **
  14  norm          12.602        15.437        .35740E-06    .30704E-04
  15  norm          20.341        9.2051       -.65714E-06   -.13780E-02
  16  norm          10.615        13.967        .56875E-06   -.30090E-03
  17  norm          .10000E-03    3.1213        .35510E-06** at limit **
  18  Prefactor     .10091E-03    40.300        .74652E-05** at limit **
  19  Prefactor     .10000E-03    5.5631        .27621E-06** at limit **
  20  Prefactor     .10000E-03    24.049        .10221E-05** at limit **
  21  Prefactor     .10000E-03    29.916       -.38362E-06** at limit **
  22  Prefactor     .10000E-03    4.5343        .22891E-06** at limit **
  23  Prefactor     29.373        43.863        .37693E-06   -.38572E-04
  24  Prefactor     .10000E-03    7.0372        .14770E-06** at limit **
  25  Prefactor     .10000E-03    146.59        .10121E-04** at limit **
  26  norm          2.8423        1.6654        .14758E-07   -.25058E-03
  27  Prefactor     .49021E-01    6.7829       -.21295E-05    .92353E-04
  28  norm          15.641        15.527        .73852E-07   -.61715E-04
  29  Normalizat    .73743        .17816       -.22364E-05   -.70871E-03
  30  Prefactor     1.3212        .22082        .14426E-06   -.67450E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 5.64388
  Prefactor  = 0.0001
  Prefactor  = 5.09129
  Prefactor  = 13.8134
  Prefactor  = 0.0001
  Prefactor  = 15.5728
  Prefactor  = 0.000100077
  Prefactor  = 0.0001
  norm       = 7.38332
  Prefactor  = 0.0001
  Prefactor  = 5.43413
  Prefactor  = 0.650781
  norm       = 0.0001
  norm       = 12.6021
  norm       = 20.3405
  norm       = 10.6153
  norm       = 0.0001
  Prefactor  = 0.00010091
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 29.3725
  Prefactor  = 0.0001
  Prefactor  = 0.000100004
  norm       = 2.84232
  Prefactor  = 0.0490215
  norm       = 15.6411
  Normalizat = 0.737432
  Prefactor  = 1.32124
 **********
 **   18 **HESSE 
 **********

 FCN=   5579.179     FROM HESSE     STATUS=OK           598 CALLS     4603 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.6439        3.8594        .56880E-03   -1.5233    
   2  Prefactor     .10000E-03    11.631        .30545E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.0913        2.8481        .88340E-04   -1.5257    
   4  Prefactor     13.813        11.579        .10776E-03   -1.4964    
   5  Prefactor     .10000E-03    22.386        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     15.573        20.128        .10149E-03   -1.4919    
   7  Prefactor     .10008E-03    818.33        .38306E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.4783        .11456E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          7.3833        7.5539        .14750E-03   -1.5164    
  10  Prefactor     .10000E-03    86.567        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     5.4341        77.818        .17355E-03   -1.5242    
  12  Prefactor     .65078        82.227        .44511E-02   -1.5547    
  13  norm          .10000E-03    8.5198        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          12.602        15.461        .11283E-03   -1.4998    
  15  norm          20.341        9.2620        .88808E-04   -1.4806    
  16  norm          10.615        14.161        .12298E-03   -1.5056    
  17  norm          .10000E-03    3.2645        .25786E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10091E-03    68.588        .18693E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.5770        .17204E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    24.068        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    29.926        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.5415        .15537E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     29.373        43.866        .73909E-04   -1.4624    
  24  Prefactor     .10000E-03    7.0447        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    147.27        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          2.8423        1.6609        .69858E-04   -1.5371    
  27  Prefactor     .49021E-01    5.3341        .40469E-01   -1.5664    
  28  norm          15.641        15.529        .10126E-03   -1.4917    
  29  Normalizat    .73743        .20798        .26211E-03   -1.0243    
  30  Prefactor     1.3212        .26159        .26271E-03   -.82678    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.73858e-08
Minuit parameter uncertainties:
  1  3.85955
  2  7.13376e-05
  3  2.84818
  4  11.5808
  5  3.85276e-05
  6  20.1367
  7  0.0161056
  8  6.88967e-07
  9  7.55489
  10  0.000180409
  11  41.1921
  12  14.6498
  13  6.51652e-05
  14  15.4661
  15  9.26268
  16  14.1651
  17  1.4242e-05
  18  0.0158206
  19  1.11493e-05
  20  6.4838e-05
  21  1.50068e-05
  22  1.13694e-05
  23  43.9145
  24  9.17458e-06
  25  0.00156806
  26  1.66092
  27  1.02177
  28  15.5334
  29  0.208198
  30  0.261847
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  6.508e-01  1.465e+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.321e+00  2.618e-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:  7.374e-01  2.082e-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: 8.16e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.32e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/183897/likelihoodResults_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.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) = 5579.15402605
delta logL = 0.0246459044311

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5578.54951198
delta logL = 0.629159974252

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    8.4072       1.0000          .0000       10.000    
     3 'Normalizat'    .67333       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3783       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=   5578.550     FROM MIGRAD    STATUS=CONVERGED    272 CALLS      549 TOTAL
                     EDM=   .33E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .13452E-02    .10475E-04** at limit **
   2  Index         8.4073        .46782        .74212E-02    .18536E-04
   3  Normalizat    .67329        .20531        .27341E-03    .38879E-04
   4  Prefactor     1.3784        .26390        .25804E-03   -.20267E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 8.40725
  Normalizat = 0.673292
  Prefactor  = 1.37837
 **********
 **   18 **HESSE 
 **********

 FCN=   5578.550     FROM HESSE     STATUS=OK            25 CALLS      574 TOTAL
                     EDM=   .26E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .13357E-02    .41900E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.4073        .45784        .29685E-03    .74974    
   3  Normalizat    .67329        .20531        .10936E-04   -1.0496    
   4  Prefactor     1.3784        .26404        .10322E-04   -.81006    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.56203e-11
Minuit parameter uncertainties:
  1  1.04599e-08
  2  0.459039
  3  0.205544
  4  0.264296
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/183897': 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) = 5578.54951054
delta logL = 0.629161407727

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.046e-08  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  8.407e+00  4.590e-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.378e+00  2.643e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  6.733e-01  2.055e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.35
Ra Dec: 196.008 37.071
Photon Index (Free Index): 8.41 +/- 0.46
Photon Flux (Free Index): 4.59e-08 +/- 4.53e-08
Energy Flux (Free Index): 5.27e-06 +/- 5.19e-06

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/183897/cmap_HighResolution_249696001_249955201_4FGL_J1304.0+3704_daily_bin40.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.32e-03', comment='SUCCESS', energy_flux2='5.27e-06', dlogl='6.29e-01', photon_flux2='4.59e-08', job_status='DONE', time_completed='2021-09-06 19:41:59.150713', photon_index_error2='0.46', photon_index2='8.41', ts='0.00', fit_tolerance='1e-08', GAL='1.32', photon_index_error='0.00', photon_flux_upper_limit='8.16e-08', energy_flux_error2='5.19e-06', EG='0.74', time_epoch_completed='1630982519.15', return_code='0', job_id='183897', GAL2='1.38', EG2='0.67', return_code2='0', photon_flux_error2='4.53e-08', ts2='1.35', photon_index='2.44' WHERE bin_id='40' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:41:59 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0240>
Subject: Job 183897: <4FGL_J1304.0+3704_daily_bin40> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin40> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:25:37 2021
Job was executed on host(s) <bullet0240>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:25:46 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:25:46 2021
Terminated at Mon Sep  6 19:41:59 2021
Results reported at Mon Sep  6 19:41:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin40 196.008 37.071 249696001 249955201 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 :                                   849.22 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             302.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   973 sec.
    Turnaround time :                            982 sec.

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

