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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin1560
RA = 196.008, Dec = 37.071
tmin = 643680001, tmax = 643939201
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='196722', job_status='RUN', time_executed='2021-09-06 20:10:40.366574', time_epoch_executed='1630984240.37' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='1560'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/196722

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/196722/ft1_4FGL_J1304.0+3704_daily_bin1560.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/196722/ft1_4FGL_J1304.0+3704_daily_bin1560.fits outfile=/scratch/kocevski/196722/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin1560.fits ra=196.008 dec=37.071 rad=12.0 tmin=643680001.0 tmax=643939201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 3.52
user 3.22
sys 0.26

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/196722/ft1_filtered_4FGL_J1304.0+3704_daily_bin1560.fits" evtable="EVENTS" scfile=/scratch/kocevski/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits sctable="SC_DATA" outfile=/scratch/kocevski/196722/ltcube_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.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/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits
.....................!
real 13.98
user 13.52
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/196722/ft1_filtered_4FGL_J1304.0+3704_daily_bin1560.fits evtable="EVENTS" scfile=/scratch/kocevski/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits sctable="SC_DATA" expcube=/scratch/kocevski/196722/ltcube_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.fits outfile=/scratch/kocevski/196722/expmap_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.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/196722/ltcube_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.fits
.....................!
real 193.24
user 186.74
sys 5.76

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/196722/ft1_filtered_4FGL_J1304.0+3704_daily_bin1560.fits scfile=/scratch/kocevski/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits outfile=/scratch/kocevski/196722/cmap_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.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/196722/ft1_filtered_4FGL_J1304.0+3704_daily_bin1560.fits scfile=/scratch/kocevski/196722/ft2_4FGL_J1304.0+3704_daily_bin1560.fits outfile=/scratch/kocevski/196722/cmap_HighResolution_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=196.008 yref=37.071 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    7.3269       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10987E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    44.847       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .47015       1.0000         .10000E-03   10000.    
     9 'norm      '    .40752E-01   1.0000         .10000E-03   10000.    
    10 'Prefactor '    58.119       1.0000         .10000E-03   10000.    
    11 'Prefactor '    14.657       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .36535       1.0000         .10000E-03   10000.    
    13 'norm      '    .79098       1.0000         .10000E-03   10000.    
    14 'norm      '    15.108       1.0000         .10000E-03   10000.    
    15 'norm      '    8.5525       1.0000         .10000E-03   10000.    
    16 'norm      '    .10425E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10271E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.6445       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10311E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .97001E-02   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10193E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10272E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10274E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    70.934       1.0000         .10000E-03   10000.    
    26 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.1662       1.0000         .10000E-03   10000.    
    28 'norm      '    .10317E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1710       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .76564       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=   5419.591     FROM MIGRAD    STATUS=CONVERGED   1463 CALLS     4640 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.3289        4.0157        .10605E-03   -.27123E-04
   2  Prefactor     .10000E-03    1.7862        .96022E-03** at limit **
   3  Prefactor     .10000E-03    1.4253        .84931E-03** at limit **
   4  Prefactor     .10000E-03    7.8780        .18142E-02** at limit **
   5  Prefactor     .10000E-03    53.012        .18142E-02** at limit **
   6  Prefactor     44.879        28.679        .59868E-04   -.43243E-03
   7  Prefactor     .10000E-03    23.467        .18142E-02** at limit **
   8  Prefactor     .51905        78.184        .29762E-02   -.37575E-03
   9  norm          .25790E-03    6.9472        .37321E-01** at limit **
  10  Prefactor     57.986        65.707        .52624E-04    .96698E-04
  11  Prefactor     14.766        23.351        .10462E-03   -.42313E-03
  12  Prefactor     .11629        81.383        .76861E-01   -.29251E-03
  13  norm          .79505        4.3178        .27902E-03   -.32197E-03
  14  norm          15.124        16.204        .10304E-03    .48765E-04
  15  norm          8.5500        3.7664        .89528E-04   -.27505E-03
  16  norm          .10000E-03    9.5259        .36285E-03** at limit **
  17  norm          .10000E-03    1.0896        .75001E-03** at limit **
  18  Prefactor     .10000E-03    1.4951        .87124E-03** at limit **
  19  Prefactor     4.6433        8.5878        .18675E-03    .20248E-03
  20  Prefactor     .10000E-03    17.003        .18142E-02** at limit **
  21  Prefactor     .10017E-03    50.120        .15075    ** at limit **
  22  Prefactor     .10000E-03    18.553        .18142E-02** at limit **
  23  Prefactor     .10000E-03    17.688        .18142E-02** at limit **
  24  Prefactor     .10000E-03    15.118        .18142E-02** at limit **
  25  Prefactor     70.908        72.470        .47664E-04    .79474E-04
  26  norm          .10000E-03    1.2447        .11959E-02** at limit **
  27  Prefactor     3.1675        3.6891        .14810E-03    .10018E-03
  28  norm          .10000E-03    5.8601        .17368E-02** at limit **
  29  Normalizat    1.1712        .21230        .20477E-03   -.14763E-03
  30  Prefactor     .76543        .24890        .30949E-03   -.25640E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 7.32888
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 44.8793
  Prefactor  = 0.0001
  Prefactor  = 0.519049
  norm       = 0.000257902
  Prefactor  = 57.9864
  Prefactor  = 14.7661
  Prefactor  = 0.116294
  norm       = 0.79505
  norm       = 15.1238
  norm       = 8.54999
  norm       = 0.000100003
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.64332
  Prefactor  = 0.0001
  Prefactor  = 0.000100173
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 70.9077
  norm       = 0.0001
  Prefactor  = 3.16747
  norm       = 0.0001
  Normalizat = 1.17124
  Prefactor  = 0.765435
 **********
 **   18 **HESSE 
 **********

 FCN=   5419.591     FROM HESSE     STATUS=OK           588 CALLS     5228 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.3289        4.0153        .42419E-05   -1.5166    
   2  Prefactor     .10000E-03    1.7862        .19204E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.4253        .16986E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.8821        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    53.035        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     44.879        28.136        .11974E-04   -1.4367    
   7  Prefactor     .10000E-03    23.467        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .51905        55.947        .11905E-03   -1.5564    
   9  norm          .25790E-03    5.3039        .44019E-01   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     57.986        65.708        .10525E-04   -1.4184    
  11  Prefactor     14.766        23.113        .20924E-04   -1.4939    
  12  Prefactor     .11629        45.092        .89487E-01   -1.5640    
  13  norm          .79505        4.1854        .11161E-04   -1.5530    
  14  norm          15.124        16.204        .41218E-05   -1.4930    
  15  norm          8.5500        3.7666        .35811E-05   -1.5123    
  16  norm          .10000E-03    9.5260        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.0896        .15000E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.4952        .17425E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.6433        8.5866        .74699E-05   -1.5277    
  20  Prefactor     .10000E-03    17.004        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10017E-03    50.801        .14920       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    18.561        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    17.689        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    15.119        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     70.908        72.469        .95328E-05   -1.4022    
  26  norm          .10000E-03    1.2478        .23918E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     3.1675        3.6889        .59240E-05   -1.5352    
  28  norm          .10000E-03    5.8610        .34736E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1712        .21116        .40954E-04   -.87496    
  30  Prefactor     .76543        .24813        .12380E-04   -1.0102    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.12081e-09
Minuit parameter uncertainties:
  1  4.01542
  2  7.09316e-06
  3  8.63122e-06
  4  6.97634e-05
  5  8.73577e-05
  6  28.1443
  7  4.70431e-05
  8  10.7869
  9  0.057884
  10  65.79
  11  23.1273
  12  4.58142
  13  3.64852
  14  16.2087
  15  3.76667
  16  0.000350395
  17  6.69897e-07
  18  2.67065e-06
  19  8.58885
  20  7.802e-06
  21  0.00593909
  22  0.000210084
  23  7.70911e-05
  24  9.17208e-05
  25  72.5597
  26  5.03172e-06
  27  3.68921
  28  1.76788e-05
  29  0.211309
  30  0.24849
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.163e-01  4.581e+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

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  7.654e-01  2.485e-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.171e+00  2.113e-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: 9.32e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.22e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/196722/likelihoodResults_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.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) = 5418.03668989
delta logL = 1.55382401436

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5417.62610306
delta logL = 1.96441084115

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.6798       1.0000          .0000       10.000    
     3 'Normalizat'    1.0547       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86654       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=   5417.626     FROM MIGRAD    STATUS=CONVERGED    195 CALLS      500 TOTAL
                     EDM=   .63E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .27214E-02    .28218E-03** at limit **
   2  Index         8.6794        2.3577        .12478        .11145E-03
   3  Normalizat    1.0549        .50507E-01    .40251E-01    .60697E-04
   4  Prefactor     .86635        .62423E-01    .66180E-01    .69552E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 8.67944
  Normalizat = 1.05488
  Prefactor  = 0.866352
 **********
 **   18 **HESSE 
 **********

 FCN=   5417.626     FROM HESSE     STATUS=OK            35 CALLS      535 TOTAL
                     EDM=   .19E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .92563E-03    .71986E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.6794        .27509        .53116E-02    .82698    
   3  Normalizat    1.0549        .20199        .21362E-03   -.91214    
   4  Prefactor     .86635        .25007        .29275E-03   -.97327    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.91617e-11
Minuit parameter uncertainties:
  1  6.78317e-09
  2  0.275394
  3  0.202139
  4  0.250401
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/196722': 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) = 5417.62610204
delta logL = 1.96441185852

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  6.783e-09  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  8.679e+00  2.754e-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:  8.664e-01  2.504e-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.055e+00  2.021e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.19
Ra Dec: 196.008 37.071
Photon Index (Free Index): 8.68 +/- 0.28
Photon Flux (Free Index): 8.36e-08 +/- 4.96e-08
Energy Flux (Free Index): 9.56e-06 +/- 5.65e-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/196722/cmap_HighResolution_643680001_643939201_4FGL_J1304.0+3704_daily_bin1560.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.22e-03', comment='SUCCESS', energy_flux2='9.56e-06', dlogl='1.96e+00', photon_flux2='8.36e-08', job_status='DONE', time_completed='2021-09-06 20:25:44.050635', photon_index_error2='0.28', photon_index2='8.68', ts='0.00', fit_tolerance='1e-08', GAL='0.77', photon_index_error='0.00', photon_flux_upper_limit='9.32e-08', energy_flux_error2='5.65e-06', EG='1.17', time_epoch_completed='1630985144.05', return_code='0', job_id='196722', GAL2='0.87', EG2='1.05', return_code2='0', photon_flux_error2='4.96e-08', ts2='4.19', photon_index='2.44' WHERE bin_id='1560' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:25:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0284>
Subject: Job 196722: <4FGL_J1304.0+3704_daily_bin1560> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin1560> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 20:10:24 2021
Job was executed on host(s) <bullet0284>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 20:10:31 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 20:10:31 2021
Terminated at Mon Sep  6 20:25:44 2021
Results reported at Mon Sep  6 20:25:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin1560 196.008 37.071 643680001 643939201 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 :                                   899.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             329.31 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   913 sec.
    Turnaround time :                            920 sec.

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

