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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin353
RA = 196.008, Dec = 37.071
tmin = 330825601, tmax = 331084801
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='187959', job_status='RUN', time_executed='2021-09-06 19:42:49.961775', time_epoch_executed='1630982569.96' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='353'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/187959

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/187959/ft1_4FGL_J1304.0+3704_daily_bin353.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/187959/ft2_4FGL_J1304.0+3704_daily_bin353.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/187959/ft1_4FGL_J1304.0+3704_daily_bin353.fits outfile=/scratch/kocevski/187959/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin353.fits ra=196.008 dec=37.071 rad=12.0 tmin=330825601.0 tmax=331084801.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.43
user 3.19
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/187959/ft1_filtered_4FGL_J1304.0+3704_daily_bin353.fits evtable="EVENTS" scfile=/scratch/kocevski/187959/ft2_4FGL_J1304.0+3704_daily_bin353.fits sctable="SC_DATA" expcube=/scratch/kocevski/187959/ltcube_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.fits outfile=/scratch/kocevski/187959/expmap_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.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/187959/ltcube_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.fits
.....................!
real 192.80
user 187.23
sys 4.73

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

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/187959/ft1_filtered_4FGL_J1304.0+3704_daily_bin353.fits scfile=/scratch/kocevski/187959/ft2_4FGL_J1304.0+3704_daily_bin353.fits outfile=/scratch/kocevski/187959/cmap_HighResolution_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.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.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.8371       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .38533E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.1760       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.686       1.0000         .10000E-03   10000.    
     5 'Prefactor '    29.667       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    6.9385       1.0000         .10000E-03   10000.    
    15 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.0424       1.0000         .10000E-03   10000.    
    17 'norm      '    2.4056       1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.0594       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    28.742       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .46689       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .60151E-02   1.0000         .10000E-03   10000.    
    24 'Prefactor '    20.779       1.0000         .10000E-03   10000.    
    25 'Prefactor '    5.1488       1.0000         .10000E-03   10000.    
    26 'norm      '    6.7585       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10580E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    27.671       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.3107       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .67835       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5821.386     FROM MIGRAD    STATUS=CONVERGED    114 CALLS     3374 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  9.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.8372        2.9808        .37897E-05    .33820E-02
   2  Prefactor     .10258E-03    6.8608       -.24279E-05** at limit **
   3  Prefactor     5.1757        2.6457       -.21600E-05   -.24932E-02
   4  Prefactor     14.686        1.2968       -.28660E-06   -.13597E-02
   5  Prefactor     29.601        13.445       -.37034E-05   -.61795E-02
   6  Prefactor     .10000E-03    5.8952        .17100E-05** at limit **
   7  Prefactor     .10005E-03    9.8936        .25852E-06** at limit **
   8  Prefactor     .10000E-03    1.7388        .25021E-06** at limit **
   9  norm          .10000E-03    .76051        .27905E-06** at limit **
  10  Prefactor     .10001E-03    13.389        .17189E-05** at limit **
  11  Prefactor     .10000E-03    3.9786       -.17539E-07** at limit **
  12  Prefactor     .10000E-03    3.2730       -.25179E-06** at limit **
  13  norm          .10000E-03    1.0818        .51525E-06** at limit **
  14  norm          6.9372        1.0055        .26756E-08    .19567E-03
  15  norm          .10000E-03    1.9810       -.15451E-06** at limit **
  16  norm          4.0411        1.3005        .79009E-06   -.22637E-02
  17  norm          2.4063        2.5709        .16802E-07   -.15245E-04
  18  Prefactor     1.0594        1.8813        .82143E-06    .39522E-04
  19  Prefactor     .10000E-03    4.2399        .24021E-08** at limit **
  20  Prefactor     28.625        23.642       -.80645E-05   -.25151E-02
  21  Prefactor     .10001E-03    9.7075       -.50882E-06** at limit **
  22  Prefactor     .46877        17.627       -.91423E-05   -.30935E-03
  23  Prefactor     .17999E-03    196.34       -.56353E-04** at limit **
  24  Prefactor     20.781        3.8073       -.80233E-06    .84531E-03
  25  Prefactor     5.1250        5.4785       -.52229E-05    .15899E-02
  26  norm          6.7567        2.0355       -.35272E-06   -.25347E-03
  27  Prefactor     .10000E-03    6.0545       -.33469E-05** at limit **
  28  norm          27.654        11.674        .15528E-05   -.57455E-02
  29  Normalizat    1.3115        .20021       -.52239E-06   -.98305E-04
  30  Prefactor     .67753        .24096       -.74462E-06   -.47568E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.83717
  Prefactor  = 0.00010258
  Prefactor  = 5.17574
  Prefactor  = 14.6861
  Prefactor  = 29.601
  Prefactor  = 0.000100003
  Prefactor  = 0.000100048
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.00010001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 6.9372
  norm       = 0.0001
  norm       = 4.04109
  norm       = 2.40634
  Prefactor  = 1.05941
  Prefactor  = 0.0001
  Prefactor  = 28.6247
  Prefactor  = 0.000100009
  Prefactor  = 0.468769
  Prefactor  = 0.000179991
  Prefactor  = 20.7813
  Prefactor  = 5.12496
  norm       = 6.75671
  Prefactor  = 0.000100003
  norm       = 27.6536
  Normalizat = 1.31146
  Prefactor  = 0.67753
 **********
 **   18 **HESSE 
 **********

 FCN=   5821.386     FROM HESSE     STATUS=OK           674 CALLS     4048 TOTAL
                     EDM=   .47E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.8372        3.0276        .51508E-02   -1.5316    
   2  Prefactor     .10258E-03    5.9226        .61361E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.1757        2.6703        .44175E-02   -1.5253    
   4  Prefactor     14.686        10.705        .26129E-02   -1.4941    
   5  Prefactor     29.601        33.608        .18390E-02   -1.4619    
   6  Prefactor     .10000E-03    5.9165        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10005E-03    19.323        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    1.7309        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    .76012        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10001E-03    13.443        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.9880        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.2732        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.0806        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          6.9372        7.9973        .38076E-02   -1.5181    
  15  norm          .10000E-03    1.9381        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.0411        4.2296        .50139E-02   -1.5306    
  17  norm          2.4063        2.5835        .65994E-02   -1.5398    
  18  Prefactor     1.0594        2.1593        .31498E-01   -1.5502    
  19  Prefactor     .10000E-03    4.2372        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     28.625        41.729        .18682E-02   -1.4637    
  21  Prefactor     .10001E-03    19.258        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .46877        8.4020        .11135       -1.5571    
  23  Prefactor     .17999E-03    39.124        .13590       -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     20.781        19.899        .21967E-02   -1.4796    
  25  Prefactor     5.1250        160.97        .44294E-02   -1.5255    
  26  norm          6.7567        2.0458        .38585E-02   -1.5188    
  27  Prefactor     .10000E-03    2.8186        .46535E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          27.654        18.371        .19040E-02   -1.4656    
  29  Normalizat    1.3115        .17349        .46725E-01   -.83225    
  30  Prefactor     .67753        .20622        .76479E-01   -1.0441    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.70449e-07
Minuit parameter uncertainties:
  1  3.02776
  2  0.00781856
  3  2.67037
  4  10.7068
  5  33.629
  6  0.000252994
  7  0.00191825
  8  6.46562e-08
  9  6.81612e-07
  10  0.000742144
  11  9.5346e-06
  12  5.25782e-06
  13  2.23288e-06
  14  7.99849
  15  9.15093e-07
  16  4.22996
  17  2.58365
  18  2.1595
  19  2.78094e-05
  20  41.7711
  21  0.000838091
  22  3.9694
  23  0.111958
  24  19.9049
  25  57.614
  26  2.04582
  27  0.000188565
  28  18.375
  29  0.173572
  30  0.206449
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.258e-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:  6.775e-01  2.064e-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.311e+00  1.736e-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.77e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.92e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/187959/likelihoodResults_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.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) = 5821.38751985
delta logL = -0.00140285714679

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5821.38611675
delta logL = 2.49150616582e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4152       1.0000          .0000       10.000    
     3 'Normalizat'    1.3115       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .67749       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=   5821.386     FROM MIGRAD    STATUS=CONVERGED    106 CALLS      260 TOTAL
                     EDM=   .75E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    24.884        .13733E-01** at limit **
   2  Index         1.7039        5.7597        .50000       -.41859E-07
   3  Normalizat    1.3115        .95443E-02    .20655E-03   -.40609E-03
   4  Prefactor     .67753        .11669E-01    .33859E-03   -.24870E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.70387
  Normalizat = 1.31146
  Prefactor  = 0.677529
 **********
 **   18 **HESSE 
 **********

 FCN=   5821.386     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      289 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    206.12        .16307E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7039        5.4347        .50000       -.71979    
   3  Normalizat    1.3115        .28774E-01    .41310E-04   -.83225    
   4  Prefactor     .67753        .35180E-01    .13543E-04   -1.0441    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.27291e-10
Minuit parameter uncertainties:
  1  0.000139935
  2  898.671
  3  0.0287744
  4  0.0351813
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/187959': 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) = 5821.38611217
delta logL = 4.82892392029e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.399e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.704e+00  8.987e+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:  6.775e-01  3.518e-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:  1.311e+00  2.877e-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/187959/cmap_HighResolution_330825601_331084801_4FGL_J1304.0+3704_daily_bin353.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.92e-03', job_status='DONE', photon_flux_upper_limit='3.77e-08', time_completed='2021-09-06 19:56:39.805703', job_id='187959', GAL2='0.68', fit_tolerance='1e-08', EG2='1.31', EG='1.31', time_epoch_completed='1630983399.81', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.68', dlogl='4.83e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='353' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:56:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0289>
Subject: Job 187959: <4FGL_J1304.0+3704_daily_bin353> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin353 196.008 37.071 330825601 331084801 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 :                                   826.42 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             298.10 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   945 sec.
    Turnaround time :                            978 sec.

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

