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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin362
RA = 196.008, Dec = 37.071
tmin = 333158401, tmax = 333417601
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='187973', job_status='RUN', time_executed='2021-09-06 19:41:15.138077', time_epoch_executed='1630982475.14' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='362'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/187973

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

Retrieving the FT1 file...

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

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

Retrieving 51 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/187973/ft1_4FGL_J1304.0+3704_daily_bin362.fits


Retrieving the FT1 file...

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

Retrieving 51 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/187973/ft1_4FGL_J1304.0+3704_daily_bin362.fits outfile=/scratch/kocevski/187973/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin362.fits ra=196.008 dec=37.071 rad=12.0 tmin=333158401.0 tmax=333417601.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 6.19
user 5.86
sys 0.27

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/187973/ft1_filtered_4FGL_J1304.0+3704_daily_bin362.fits" evtable="EVENTS" scfile=/scratch/kocevski/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits sctable="SC_DATA" outfile=/scratch/kocevski/187973/ltcube_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.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/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits
.....................!
real 16.21
user 15.72
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/187973/ft1_filtered_4FGL_J1304.0+3704_daily_bin362.fits evtable="EVENTS" scfile=/scratch/kocevski/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits sctable="SC_DATA" expcube=/scratch/kocevski/187973/ltcube_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.fits outfile=/scratch/kocevski/187973/expmap_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.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/187973/ltcube_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.fits
.....................!
real 193.43
user 187.13
sys 5.28

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/187973/ft1_filtered_4FGL_J1304.0+3704_daily_bin362.fits scfile=/scratch/kocevski/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits outfile=/scratch/kocevski/187973/cmap_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.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.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/187973/ft1_filtered_4FGL_J1304.0+3704_daily_bin362.fits scfile=/scratch/kocevski/187973/ft2_4FGL_J1304.0+3704_daily_bin362.fits outfile=/scratch/kocevski/187973/cmap_HighResolution_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.3989       1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.1748       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10080E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    29.664       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    27.541       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10118E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    36.595       1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.1531       1.0000         .10000E-03   10000.    
    13 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10613E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    2.8774       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .27749       1.0000         .10000E-03   10000.    
    19 'Prefactor '    6.2806       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .11773E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    22.785       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    41.051       1.0000         .10000E-03   10000.    
    26 'norm      '    3.8865       1.0000         .10000E-03   10000.    
    27 'Prefactor '    5.3730       1.0000         .10000E-03   10000.    
    28 'norm      '    13.175       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1917       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .75654       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=   5605.361     FROM MIGRAD    STATUS=CONVERGED    790 CALLS     3977 TOTAL
                     EDM=   .59E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3989        2.2335        .85487E-07   -.64448E-04
   2  Prefactor     1.1747        4.3333        .91420E-06   -.24184E-03
   3  Prefactor     .10000E-03    .87765       -.12658E-07** at limit **
   4  Prefactor     .10000E-03    8.9653        .19592E-07** at limit **
   5  Prefactor     29.675        33.964        .14923E-05    .12371E-03
   6  Prefactor     .10000E-03    60.659        .24873E-05** at limit **
   7  Prefactor     27.530        40.791       -.16758E-05   -.12370E-03
   8  Prefactor     .10000E-03    3.6918        .10047E-07** at limit **
   9  norm          .10000E-03    2.1029       -.40408E-07** at limit **
  10  Prefactor     .10000E-03    57.910       -.18803E-05** at limit **
  11  Prefactor     36.590        24.955        .41768E-06    .10990E-03
  12  Prefactor     9.1587        13.940        .44740E-06    .34828E-04
  13  norm          .10000E-03    1.2518        .39517E-08** at limit **
  14  norm          .10000E-03    10.333        .24522E-07** at limit **
  15  norm          .10000E-03    2.5532       -.50765E-06** at limit **
  16  norm          .10000E-03    3.4391       -.90336E-07** at limit **
  17  norm          2.8778        3.1966        .42956E-07   -.26528E-04
  18  Prefactor     .27454        2.4646       -.71193E-06   -.24298E-03
  19  Prefactor     6.2815        16.417        .52303E-05   -.32472E-03
  20  Prefactor     .10000E-03    28.712        .13222E-06** at limit **
  21  Prefactor     .10000E-03    108.65       -.92218E-06** at limit **
  22  Prefactor     .10000E-03    7.4448       -.52803E-07** at limit **
  23  Prefactor     22.778        38.643       -.84032E-06   -.80041E-04
  24  Prefactor     .10000E-03    13.737       -.29229E-07** at limit **
  25  Prefactor     41.076        75.458        .69748E-05    .18919E-03
  26  norm          3.8869        1.6491        .29590E-07   -.10503E-04
  27  Prefactor     5.3734        4.7239        .26673E-07   -.45757E-04
  28  norm          13.177        19.729       -.24994E-06   -.20794E-04
  29  Normalizat    1.1913        .17939       -.12498E-05    .22680E-03
  30  Prefactor     .75689        .20462        .63006E-06    .67392E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 1.39887
  Prefactor  = 1.17467
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 29.6752
  Prefactor  = 0.000100002
  Prefactor  = 27.5305
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 36.5904
  Prefactor  = 9.15866
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 2.87784
  Prefactor  = 0.27454
  Prefactor  = 6.28152
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 22.7778
  Prefactor  = 0.0001
  Prefactor  = 41.0764
  norm       = 3.88686
  Prefactor  = 5.37344
  norm       = 13.1773
  Normalizat = 1.19134
  Prefactor  = 0.756885
 **********
 **   18 **HESSE 
 **********

 FCN=   5605.361     FROM HESSE     STATUS=OK           580 CALLS     4557 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3989        2.1951        .13741E-03   -1.5471    
   2  Prefactor     1.1747        4.3050        .29111E-03   -1.5491    
   3  Prefactor     .10000E-03    .88457        .68416E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    9.2131        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     29.675        34.132        .73562E-04   -1.4618    
   6  Prefactor     .10000E-03    63.287        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     27.530        41.224        .76338E-04   -1.4658    
   8  Prefactor     .10000E-03    3.7148        .14031E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.1126        .10585E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    58.389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     36.590        24.692        .66250E-04   -1.4497    
  12  Prefactor     9.1587        13.932        .13247E-03   -1.5103    
  13  norm          .10000E-03    1.2527        .81790E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    10.364        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    5.7950        .22533E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    3.4713        .13537E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          2.8778        3.1911        .13678E-03   -1.5369    
  18  Prefactor     .27454        14.161        .18452E-02   -1.5603    
  19  Prefactor     6.2815        21.478        .80087E-03   -1.5207    
  20  Prefactor     .10000E-03    28.811        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    109.93        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    7.4703        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     22.778        38.929        .83915E-04   -1.4753    
  24  Prefactor     .10000E-03    13.783        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     41.076        79.114        .62564E-04   -1.4425    
  26  norm          3.8869        1.6476        .60168E-04   -1.5314    
  27  Prefactor     5.3734        4.7253        .14789E-03   -1.5244    
  28  norm          13.177        19.781        .11035E-03   -1.4982    
  29  Normalizat    1.1913        .20565        .20681E-03   -.86871    
  30  Prefactor     .75689        .23522        .31210E-03   -1.0134    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.47075e-09
Minuit parameter uncertainties:
  1  2.19527
  2  4.30614
  3  3.25182e-07
  4  1.60803e-05
  5  34.1547
  6  0.000702111
  7  41.2668
  8  2.45792e-06
  9  6.2242e-09
  10  0.00059904
  11  24.6985
  12  13.9374
  13  4.82683e-07
  14  7.03119e-06
  15  2.56779e-05
  16  6.0029e-06
  17  3.19133
  18  3.94377
  19  21.5047
  20  9.45391e-05
  21  0.000531857
  22  1.24557e-06
  23  38.972
  24  3.75844e-06
  25  79.3174
  26  1.64766
  27  4.72561
  28  19.7905
  29  0.205792
  30  0.235533
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  9.159e+00  1.394e+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:  7.569e-01  2.355e-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.191e+00  2.058e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.56
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 8.73e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.76e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/187973/likelihoodResults_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.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) = 5605.07068343
delta logL = 0.289920038297

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5605.06203606
delta logL = 0.298567411077

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.7488       1.0000         .10000E-03   10000.    
     2 'Index     '    3.3175       1.0000          .0000       10.000    
     3 'Normalizat'    1.1674       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .77509       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=   5605.062     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      307 TOTAL
                     EDM=   .46E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.7478        15.510        .14731E-03   -.52194E-03
   2  Index         3.3184        2.1343        .71155E-02   -.12361E-03
   3  Normalizat    1.1674        .19467        .20858E-03   -.26924E-03
   4  Prefactor     .77502        .23592        .30870E-03   -.14852E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.74782
  Index      = 3.31836
  Normalizat = 1.16739
  Prefactor  = 0.77502
 **********
 **   18 **HESSE 
 **********

 FCN=   5605.062     FROM HESSE     STATUS=OK            25 CALLS      332 TOTAL
                     EDM=   .43E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.7478        8.7017        .58924E-05   -1.5321    
   2  Index         3.3184        1.2472        .28462E-03   -.34302    
   3  Normalizat    1.1674        .19400        .41716E-04   -.87616    
   4  Prefactor     .77502        .23502        .12348E-04   -1.0066    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.26426e-10
Minuit parameter uncertainties:
  1  8.70461
  2  1.26221
  3  0.194116
  4  0.23532
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/187973': 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) = 5605.062035
delta logL = 0.298568466188

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  3.748e+00  8.705e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  3.318e+00  1.262e+00  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:  7.750e-01  2.353e-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.167e+00  1.941e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.17
Ra Dec: 196.008 37.071
Photon Index (Free Index): 3.32 +/- 1.26
Photon Flux (Free Index): 3.74e-08 +/- 4.23e-08
Energy Flux (Free Index): 6.57e-06 +/- 7.09e-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/187973/cmap_HighResolution_333158401_333417601_4FGL_J1304.0+3704_daily_bin362.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.76e-03', comment='SUCCESS', energy_flux2='6.57e-06', dlogl='2.99e-01', photon_flux2='3.74e-08', job_status='DONE', time_completed='2021-09-06 19:55:45.247170', photon_index_error2='1.26', photon_index2='3.32', ts='0.56', fit_tolerance='1e-08', GAL='0.76', photon_index_error='0.00', photon_flux_upper_limit='8.73e-08', energy_flux_error2='7.09e-06', EG='1.19', time_epoch_completed='1630983345.25', return_code='0', job_id='187973', GAL2='0.78', EG2='1.17', return_code2='0', photon_flux_error2='4.23e-08', ts2='1.17', photon_index='2.44' WHERE bin_id='362' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:55:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0224>
Subject: Job 187973: <4FGL_J1304.0+3704_daily_bin362> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin362 196.008 37.071 333158401 333417601 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 :                                   852.06 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             332.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   886 sec.
    Turnaround time :                            923 sec.

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

