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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin652
RA = 196.008, Dec = 37.071
tmin = 408326401, tmax = 408585601
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='189577', job_status='RUN', time_executed='2021-09-06 19:49:27.292025', time_epoch_executed='1630982967.29' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='652'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189577

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189577/ft1_4FGL_J1304.0+3704_daily_bin652.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189577/ft2_4FGL_J1304.0+3704_daily_bin652.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189577/ft1_4FGL_J1304.0+3704_daily_bin652.fits outfile=/scratch/kocevski/189577/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin652.fits ra=196.008 dec=37.071 rad=12.0 tmin=408326401.0 tmax=408585601.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 4.93
user 4.66
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189577/ft1_filtered_4FGL_J1304.0+3704_daily_bin652.fits evtable="EVENTS" scfile=/scratch/kocevski/189577/ft2_4FGL_J1304.0+3704_daily_bin652.fits sctable="SC_DATA" expcube=/scratch/kocevski/189577/ltcube_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.fits outfile=/scratch/kocevski/189577/expmap_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.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/189577/ltcube_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.fits
.....................!
real 190.34
user 186.33
sys 3.60

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/189577/ft1_filtered_4FGL_J1304.0+3704_daily_bin652.fits scfile=/scratch/kocevski/189577/ft2_4FGL_J1304.0+3704_daily_bin652.fits outfile=/scratch/kocevski/189577/cmap_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.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.40
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189577/ft1_filtered_4FGL_J1304.0+3704_daily_bin652.fits scfile=/scratch/kocevski/189577/ft2_4FGL_J1304.0+3704_daily_bin652.fits outfile=/scratch/kocevski/189577/cmap_HighResolution_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.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.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10168E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.3852       1.0000         .10000E-03   10000.    
     3 'Prefactor '    7.0341       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.3601       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    5.8913       1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10899E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.9868       1.0000         .10000E-03   10000.    
    12 'Prefactor '    28.476       1.0000         .10000E-03   10000.    
    13 'norm      '    .10194E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    63.040       1.0000         .10000E-03   10000.    
    15 'norm      '    3.9434       1.0000         .10000E-03   10000.    
    16 'norm      '    .11891E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    15.951       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10232E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    23.502       1.0000         .10000E-03   10000.    
    20 'Prefactor '    35.814       1.0000         .10000E-03   10000.    
    21 'Prefactor '    44.755       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    31.871       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    18.331       1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.0793       1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .79352       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .99426       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=   3599.546     FROM MIGRAD    STATUS=CONVERGED    768 CALLS     4706 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    6.3444       -.13445E-07** at limit **
   2  Prefactor     2.3851        10.323        .67529E-05   -.14451E-03
   3  Prefactor     7.0337        3.6647       -.68478E-07   -.54624E-04
   4  Prefactor     7.3600        13.957        .11721E-05   -.38015E-04
   5  Prefactor     .10000E-03    17.078        .34278E-06** at limit **
   6  Prefactor     .10000E-03    19.273       -.43583E-06** at limit **
   7  Prefactor     .10000E-03    36.625        .26998E-06** at limit **
   8  Prefactor     5.8911        9.2883        .13111E-05    .35118E-04
   9  norm          .10000E-03    2.9099       -.42969E-08** at limit **
  10  Prefactor     .10000E-03    188.86        .53873E-06** at limit **
  11  Prefactor     3.9881        40.498        .70950E-06    .21053E-04
  12  Prefactor     28.483        31.202       -.30748E-06    .50565E-04
  13  norm          .10000E-03    8.6506       -.15259E-06** at limit **
  14  norm          63.034        35.139        .16900E-06   -.32948E-04
  15  norm          3.9477        4.2216        .12963E-05    .12820E-02
  16  norm          .10000E-03    8.7053        .15853E-05** at limit **
  17  norm          15.951        10.978        .32474E-07   -.36326E-04
  18  Prefactor     .10000E-03    4.4554       -.72599E-06** at limit **
  19  Prefactor     23.506        30.686       -.43737E-06    .56616E-04
  20  Prefactor     35.800        68.766        .45342E-06   -.80472E-04
  21  Prefactor     44.725        139.38        .35622E-05   -.30859E-04
  22  Prefactor     .10000E-03    16.697        .35377E-06** at limit **
  23  Prefactor     .10000E-03    46.124       -.53829E-07** at limit **
  24  Prefactor     31.871        34.450        .77286E-07   -.38763E-04
  25  Prefactor     .10000E-03    53.143       -.89302E-06** at limit **
  26  norm          18.331        4.5421        .47554E-07   -.23269E-03
  27  Prefactor     4.0793        4.7864        .23791E-06   -.32622E-03
  28  norm          .10000E-03    12.418        .13224E-06** at limit **
  29  Normalizat    .79342        .24404       -.12145E-05    .70004E-04
  30  Prefactor     .99438        .28412       -.84596E-06    .24186E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 2.38511
  Prefactor  = 7.03372
  Prefactor  = 7.36
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 5.89108
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 3.98809
  Prefactor  = 28.4835
  norm       = 0.0001
  norm       = 63.0343
  norm       = 3.94771
  norm       = 0.000100004
  norm       = 15.9505
  Prefactor  = 0.0001
  Prefactor  = 23.5057
  Prefactor  = 35.7995
  Prefactor  = 44.7246
  Prefactor  = 0.000100001
  Prefactor  = 0.000100003
  Prefactor  = 31.8705
  Prefactor  = 0.000100002
  norm       = 18.3306
  Prefactor  = 4.0793
  norm       = 0.0001
  Normalizat = 0.793421
  Prefactor  = 0.994381
 **********
 **   18 **HESSE 
 **********

 FCN=   3599.546     FROM HESSE     STATUS=OK           584 CALLS     5290 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    6.4185        .29144E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.3851        10.846        .13261E-02   -1.5399    
   3  Prefactor     7.0337        3.6191        .78890E-04   -1.5177    
   4  Prefactor     7.3600        13.966        .73920E-03   -1.5165    
   5  Prefactor     .10000E-03    17.095        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.331        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    36.637        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     5.8911        9.2711        .82725E-03   -1.5222    
   9  norm          .10000E-03    2.9243        .99881E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    189.76        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.9881        40.206        .20199E-03   -1.5309    
  12  Prefactor     28.483        31.186        .75077E-04   -1.4640    
  13  norm          .10000E-03    8.8670        .34409E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          63.034        35.144        .50541E-04   -1.4118    
  15  norm          3.9477        3.9614        .11214E-03   -1.5311    
  16  norm          .10000E-03    13.727        .28119E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          15.951        10.983        .10028E-03   -1.4909    
  18  Prefactor     .10000E-03    4.5217        .12353E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     23.506        30.648        .82626E-04   -1.4738    
  20  Prefactor     35.800        68.841        .66966E-04   -1.4511    
  21  Prefactor     44.725        139.30        .59930E-04   -1.4369    
  22  Prefactor     .10000E-03    16.760        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    46.170        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     31.871        34.470        .70976E-04   -1.4578    
  25  Prefactor     .10000E-03    53.255        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          18.331        4.5438        .61371E-04   -1.4851    
  27  Prefactor     4.0793        4.7842        .13798E-03   -1.5304    
  28  norm          .10000E-03    12.436        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .79342        .28611        .26380E-03   -1.0031    
  30  Prefactor     .99438        .33203        .28864E-03   -.92917    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.65039e-09
Minuit parameter uncertainties:
  1  6.25706e-06
  2  10.1751
  3  3.61925
  4  13.9724
  5  0.000167678
  6  0.000314535
  7  0.000172273
  8  9.27338
  9  2.95335e-08
  10  0.000955096
  11  25.3474
  12  31.204
  13  2.47667e-05
  14  35.1559
  15  3.96164
  16  0.000458384
  17  10.9845
  18  9.37119e-05
  19  30.6688
  20  68.9942
  21  140.332
  22  0.000193302
  23  0.000755711
  24  34.4913
  25  0.000680841
  26  4.54389
  27  4.78465
  28  6.01814e-05
  29  0.286652
  30  0.33272
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.848e+01  3.120e+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:  9.944e-01  3.327e-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.934e-01  2.867e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.43
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 5.84e-08 +/- 6.40e-08
Energy Flux (Fixed Index): 1.83e-05 +/- 2.00e-05

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

Saving results to:
/scratch/kocevski/189577/likelihoodResults_408326401_408585601_4FGL_J1304.0+3704_daily_bin652.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) = 3599.19459191
delta logL = 0.351386244293

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3599.1856642
delta logL = 0.360313957959

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.073       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0683       1.0000          .0000       10.000    
     3 'Normalizat'    .74833       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0291       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=   3599.186     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      288 TOTAL
                     EDM=   .58E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.086        25.794        .99903E-04   -.46372E-03
   2  Index         3.0685        .87695        .45358E-02   -.16841E-03
   3  Normalizat    .74783        .27919        .27086E-03    .19265E-04
   4  Prefactor     1.0291        .33145        .28436E-03   -.11831E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.0857
  Index      = 3.06853
  Normalizat = 0.747829
  Prefactor  = 1.02912
 **********
 **   18 **HESSE 
 **********

 FCN=   3599.186     FROM HESSE     STATUS=OK            25 CALLS      313 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.086        22.726        .39961E-05   -1.4906    
   2  Index         3.0685        .77249        .18143E-03   -.39661    
   3  Normalizat    .74783        .27944        .10835E-04   -1.0203    
   4  Prefactor     1.0291        .33155        .56872E-04   -.91765    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.28635e-10
Minuit parameter uncertainties:
  1  22.738
  2  0.776147
  3  0.279971
  4  0.332215
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189577': 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) = 3599.18565598
delta logL = 0.36032217611

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.609e+01  2.274e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  3.069e+00  7.761e-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.029e+00  3.322e-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.478e-01  2.800e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.20
Ra Dec: 196.008 37.071
Photon Index (Free Index): 3.07 +/- 0.78
Photon Flux (Free Index): 1.00e-07 +/- 8.73e-08
Energy Flux (Free Index): 1.94e-05 +/- 1.60e-05

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

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.48e-02', comment='SUCCESS', photon_flux='5.84e-08', energy_flux2='1.94e-05', photon_flux_error='6.40e-08', dlogl='3.60e-01', energy_flux='1.83e-05', photon_flux2='1.00e-07', job_status='DONE', time_completed='2021-09-06 20:00:48.272130', photon_index_error2='0.78', photon_index2='3.07', ts='1.43', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', photon_flux_upper_limit='1.91e-07', energy_flux_error2='1.60e-05', EG='0.79', time_epoch_completed='1630983648.27', return_code='0', job_id='189577', GAL2='1.03', EG2='0.75', return_code2='0', energy_flux_error='2.00e-05', photon_flux_error2='8.73e-08', ts2='2.20', photon_index='2.44' WHERE bin_id='652' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:00:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0230>
Subject: Job 189577: <4FGL_J1304.0+3704_daily_bin652> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin652> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:45:40 2021
Job was executed on host(s) <bullet0230>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:46:24 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:46:24 2021
Terminated at Mon Sep  6 20:00:49 2021
Results reported at Mon Sep  6 20:00:49 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin652 196.008 37.071 408326401 408585601 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 :                                   679.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             307.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   864 sec.
    Turnaround time :                            909 sec.

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

