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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin540
RA = 196.008, Dec = 37.071
tmin = 379296001, tmax = 379555201
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='189416', job_status='RUN', time_executed='2021-09-06 19:49:09.149767', time_epoch_executed='1630982949.15' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='540'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189416

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189416/ft1_4FGL_J1304.0+3704_daily_bin540.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189416/ft1_4FGL_J1304.0+3704_daily_bin540.fits outfile=/scratch/kocevski/189416/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin540.fits ra=196.008 dec=37.071 rad=12.0 tmin=379296001.0 tmax=379555201.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.84
user 3.60
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/189416/ft1_filtered_4FGL_J1304.0+3704_daily_bin540.fits" evtable="EVENTS" scfile=/scratch/kocevski/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits sctable="SC_DATA" outfile=/scratch/kocevski/189416/ltcube_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.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/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits
.....................!
real 13.18
user 12.84
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189416/ft1_filtered_4FGL_J1304.0+3704_daily_bin540.fits evtable="EVENTS" scfile=/scratch/kocevski/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits sctable="SC_DATA" expcube=/scratch/kocevski/189416/ltcube_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.fits outfile=/scratch/kocevski/189416/expmap_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.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/189416/ltcube_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.fits
.....................!
real 157.01
user 152.60
sys 3.65

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/189416/ft1_filtered_4FGL_J1304.0+3704_daily_bin540.fits scfile=/scratch/kocevski/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits outfile=/scratch/kocevski/189416/cmap_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.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.49
user 0.34
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189416/ft1_filtered_4FGL_J1304.0+3704_daily_bin540.fits scfile=/scratch/kocevski/189416/ft2_4FGL_J1304.0+3704_daily_bin540.fits outfile=/scratch/kocevski/189416/cmap_HighResolution_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.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.49
user 0.34
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    9.9869       1.0000         .10000E-03   10000.    
     2 'Prefactor '    6.6272       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.9829       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    33.500       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .11819E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   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      '    17.069       1.0000         .10000E-03   10000.    
    15 'norm      '    6.1233       1.0000         .10000E-03   10000.    
    16 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10047E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    18.048       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .16453E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    7.5339       1.0000         .10000E-03   10000.    
    25 'Prefactor '    27.265       1.0000         .10000E-03   10000.    
    26 'norm      '    12.571       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    3.9995       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .93463       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.0131       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=   6149.927     FROM MIGRAD    STATUS=CONVERGED    750 CALLS     3827 TOTAL
                     EDM=   .99E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          9.9869        3.9105       -.82559E-07    .88944E-04
   2  Prefactor     6.6272        6.2088       -.58603E-06   -.10643E-03
   3  Prefactor     .10000E-03    .64890       -.20861E-07** at limit **
   4  Prefactor     8.9832        8.6283       -.44950E-06   -.29545E-04
   5  Prefactor     .10000E-03    26.189       -.77466E-05** at limit **
   6  Prefactor     .10000E-03    5.1935        .14406E-06** at limit **
   7  Prefactor     33.497        61.595       -.45466E-05    .64545E-06
   8  Prefactor     .10000E-03    2.0910       -.36849E-06** at limit **
   9  norm          .10002E-03    2.1634        .12319E-06** at limit **
  10  Prefactor     .10000E-03    52.560        .16436E-04** at limit **
  11  Prefactor     .10000E-03    8.5965       -.31792E-05** at limit **
  12  Prefactor     .10000E-03    3.2895       -.23617E-07** at limit **
  13  norm          .10000E-03    1.1314       -.12004E-07** at limit **
  14  norm          17.067        14.339        .12801E-06   -.10039E-04
  15  norm          6.1240        3.3320        .91260E-06   -.11489E-03
  16  norm          .10000E-03    6.5104        .79569E-06** at limit **
  17  norm          .10000E-03    1.3176        .36343E-06** at limit **
  18  Prefactor     .10000E-03    1.1976       -.10667E-06** at limit **
  19  Prefactor     .10000E-03    5.6590       -.95402E-06** at limit **
  20  Prefactor     18.013        39.929       -.53390E-04    .33726E-04
  21  Prefactor     .10000E-03    28.359        .70386E-05** at limit **
  22  Prefactor     .10000E-03    12.391       -.40200E-06** at limit **
  23  Prefactor     .10003E-03    57.824       -.98799E-05** at limit **
  24  Prefactor     7.5278        24.110       -.79301E-05   -.13181E-04
  25  Prefactor     27.252        54.516       -.19805E-04    .11072E-04
  26  norm          12.571        2.4935        .35485E-06    .35354E-03
  27  Prefactor     .10000E-03    2.2870        .19661E-06** at limit **
  28  norm          4.0000        10.175       -.52076E-06   -.11698E-03
  29  Normalizat    .93479        .16102        .52091E-05   -.16974E-03
  30  Prefactor     1.0129        .19855       -.50310E-06    .20932E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 9.98686
  Prefactor  = 6.62723
  Prefactor  = 0.0001
  Prefactor  = 8.9832
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 33.4967
  Prefactor  = 0.0001
  norm       = 0.000100021
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 17.067
  norm       = 6.12399
  norm       = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.0128
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100029
  Prefactor  = 7.52782
  Prefactor  = 27.2524
  norm       = 12.5713
  Prefactor  = 0.0001
  norm       = 4.00002
  Normalizat = 0.934795
  Prefactor  = 1.01288
 **********
 **   18 **HESSE 
 **********

 FCN=   6149.927     FROM HESSE     STATUS=OK           584 CALLS     4411 TOTAL
                     EDM=   .39E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          9.9869        3.9084        .94339E-04   -1.5076    
   2  Prefactor     6.6272        6.2070        .15588E-03   -1.5193    
   3  Prefactor     .10000E-03    .65091        .61654E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.9832        8.6270        .13373E-03   -1.5108    
   5  Prefactor     .10000E-03    26.275        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    5.1953        .17455E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     33.497        60.057        .69234E-04   -1.4550    
   8  Prefactor     .10000E-03    2.1191        .11074E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10002E-03    9.9761        .21564E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    52.735        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    8.6183        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.2919        .13891E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.1327        .81457E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          17.067        14.340        .96943E-04   -1.4881    
  15  norm          6.1240        3.2823        .99906E-04   -1.5213    
  16  norm          .10000E-03    6.5512        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.3219        .87927E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.2167        .83741E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.6797        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     18.013        39.945        .94276E-04   -1.4859    
  21  Prefactor     .10000E-03    28.375        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    12.468        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10003E-03    57.625        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     7.5278        24.122        .14611E-03   -1.5159    
  25  Prefactor     27.252        54.635        .76723E-04   -1.4663    
  26  norm          12.571        2.4946        .53093E-04   -1.4999    
  27  Prefactor     .10000E-03    2.3134        .11579E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          4.0000        10.169        .20166E-03   -1.5308    
  29  Normalizat    .93479        .19336        .22867E-03   -.95248    
  30  Prefactor     1.0129        .23870        .28005E-03   -.92301    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.89958e-09
Minuit parameter uncertainties:
  1  3.90854
  2  6.20759
  3  1.00214e-06
  4  8.62822
  5  9.00012e-05
  6  7.06086e-06
  7  60.1653
  8  9.30125e-06
  9  0.000919306
  10  5.11293e-05
  11  3.81399e-05
  12  6.71202e-06
  13  3.57778e-06
  14  14.343
  15  3.28237
  16  0.000165839
  17  4.24334e-05
  18  1.26118e-05
  19  3.2454e-05
  20  40.004
  21  4.52876e-05
  22  1.17738e-05
  23  0.00260868
  24  24.1536
  25  54.7355
  26  2.4946
  27  8.16287e-06
  28  10.1734
  29  0.193507
  30  0.238948
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  6.712e-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:  1.013e+00  2.389e-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.348e-01  1.935e-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: 3.68e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.85e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/189416/likelihoodResults_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.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) = 6149.92840835
delta logL = -0.00143512217437

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6149.92697538
delta logL = -2.15507225221e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11703E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4106       1.0000          .0000       10.000    
     3 'Normalizat'    .93475       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0129       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=   6149.927     FROM MIGRAD    STATUS=CONVERGED    102 CALLS      253 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.736        .14274E-01** at limit **
   2  Index         1.7497        5.7779        .50000       -.29104E-08
   3  Normalizat    .93480        .66608E-02    .22867E-03   -.97507E-03
   4  Prefactor     1.0129        .84952E-02    .28005E-03   -.79325E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.7497
  Normalizat = 0.934798
  Prefactor  = 1.01287
 **********
 **   18 **HESSE 
 **********

 FCN=   6149.927     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      282 TOTAL
                     EDM=   .89E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    121.87        .17094E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7497        8.8724        .50000       -.70766    
   3  Normalizat    .93480        .19634E-01    .45735E-04   -.95248    
   4  Prefactor     1.0129        .25042E-01    .56011E-04   -.92302    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.8924e-11
Minuit parameter uncertainties:
  1  1.96379e-05
  2  562.558
  3  0.0196343
  4  0.0250418
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189416': 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) = 6149.92696807
delta logL = 5.15545252711e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.964e-05  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.750e+00  5.626e+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:  1.013e+00  2.504e-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:  9.348e-01  1.963e-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/189416/cmap_HighResolution_379296001_379555201_4FGL_J1304.0+3704_daily_bin540.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.85e-03', job_status='DONE', photon_flux_upper_limit='3.68e-08', time_completed='2021-09-06 20:01:11.703444', job_id='189416', GAL2='1.01', fit_tolerance='1e-08', EG2='0.93', EG='0.93', time_epoch_completed='1630983671.7', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='5.16e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='540' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:01:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0175>
Subject: Job 189416: <4FGL_J1304.0+3704_daily_bin540> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin540> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:45:29 2021
Job was executed on host(s) <bullet0175>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:45:59 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:45:59 2021
Terminated at Mon Sep  6 20:01:12 2021
Results reported at Mon Sep  6 20:01:12 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin540 196.008 37.071 379296001 379555201 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 :                                   719.42 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             281.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   912 sec.
    Turnaround time :                            943 sec.

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

