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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1099
RA = 181.203, Dec = 4.12
tmin = 524188801, tmax = 524448001
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='310374', job_status='RUN', time_executed='2021-09-04 23:17:12.539498', time_epoch_executed='1630822632.54' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1099'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310374

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310374/ft1_4FGL_J1204.8+0407_daily_bin1099.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310374/ft1_4FGL_J1204.8+0407_daily_bin1099.fits outfile=/scratch/kocevski/310374/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1099.fits ra=181.203 dec=4.12 rad=12.0 tmin=524188801.0 tmax=524448001.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.39
user 3.18
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.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/310374/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1099.fits evtable="EVENTS" outfile="/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.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.49
user 0.35
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits" evtable="EVENTS" scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits sctable="SC_DATA" outfile=/scratch/kocevski/310374/ltcube_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.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/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits
.....................!
real 11.95
user 11.59
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits evtable="EVENTS" scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits sctable="SC_DATA" expcube=/scratch/kocevski/310374/ltcube_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits outfile=/scratch/kocevski/310374/expmap_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.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/310374/ltcube_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits
.....................!
real 190.36
user 185.97
sys 3.85

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 192 point sources and 0 extended sources

Setting source of interest to:
4FGL J1204.8+0407 @ 181.203 4.12

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits outfile=/scratch/kocevski/310374/cmap_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.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=181.203 yref=4.12 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.53
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits outfile=/scratch/kocevski/310374/cmap_HighResolution_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.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=181.203 yref=4.12 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.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits evtable="EVENTS" scfile=/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/310374/Model_4FGL_J1204.8+0407_daily_bin1099.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/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits.....................!
real 54.43
user 52.95
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits', '/scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits', expMap='/scratch/kocevski/310374/expmap_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits', expCube='/scratch/kocevski/310374/ltcube_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/310374/Model_4FGL_J1204.8+0407_daily_bin1099.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1204.8+0407'

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  3.692e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/310374/ft1_filtered_4FGL_J1204.8+0407_daily_bin1099.fits
Spacecraft file(s): /scratch/kocevski/310374/ft2_4FGL_J1204.8+0407_daily_bin1099.fits
Exposure map: /scratch/kocevski/310374/expmap_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits
Exposure cube: /scratch/kocevski/310374/ltcube_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/310374/Model_4FGL_J1204.8+0407_daily_bin1099.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) = 5769.87237517

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.4152       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    7.6503       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    10.532       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10161E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10224E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10093E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    23.942       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    21.018       1.0000         .10000E-03   10000.    
    16 'norm      '    2.1515       1.0000         .10000E-03   10000.    
    17 'norm      '    .28296E-02   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .45210E-02   1.0000         .10000E-03   10000.    
    19 'norm      '    .15019E-02   1.0000         .10000E-03   10000.    
    20 'Prefactor '    196.65       1.0000         .10000E-03   10000.    
    21 'norm      '    3.0185       1.0000         .10000E-03   10000.    
    22 'Prefactor '    20.579       1.0000         .10000E-03   10000.    
    23 'Prefactor '    33.749       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10238E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .31202       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    45.907       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.3815       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .83842       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5769.836     FROM MIGRAD    STATUS=CONVERGED    734 CALLS     3712 TOTAL
                     EDM=   .68E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.4158        2.3980       -.49987E-07    .14070E-04
   2  Prefactor     .10000E-03    17.425        .71855E-07** at limit **
   3  Prefactor     7.6573        23.277       -.21015E-06    .42060E-05
   4  Prefactor     .10000E-03    87.854       -.67923E-08** at limit **
   5  Prefactor     10.534        8.1687       -.51044E-07    .43674E-04
   6  Prefactor     .10000E-03    21.879       -.31283E-07** at limit **
   7  Prefactor     .10000E-03    4.9321       -.75008E-07** at limit **
   8  Prefactor     .10000E-03    18.973       -.14783E-07** at limit **
   9  Prefactor     .10000E-03    17.072        .17123E-06** at limit **
  10  Prefactor     .10000E-03    31.302       -.62568E-07** at limit **
  11  Prefactor     .10000E-03    25.624        .14466E-06** at limit **
  12  Prefactor     23.928        40.304        .75836E-06    .59225E-04
  13  Prefactor     .10000E-03    13.318        .10825E-06** at limit **
  14  Prefactor     .10000E-03    13.454       -.24122E-06** at limit **
  15  Prefactor     21.026        17.036       -.83649E-07    .10965E-03
  16  norm          2.1499        3.2705        .13665E-06    .34003E-04
  17  norm          .10001E-03    2.0724       -.77151E-06** at limit **
  18  Prefactor     .10135E-03    34.310       -.47592E-05** at limit **
  19  norm          .10000E-03    180.95        .57589E-06** at limit **
  20  Prefactor     196.51        197.63        .47273E-05    .43943E-04
  21  norm          3.0167        .80748        .20637E-06    .25048E-02
  22  Prefactor     20.579        13.668        .50054E-07    .83327E-04
  23  Prefactor     33.753        32.338        .43815E-08    .35859E-04
  24  Prefactor     .10000E-03    17.211        .68536E-07** at limit **
  25  norm          .31370        1.6224        .12970E-06   -.35541E-03
  26  Prefactor     .10000E-03    7.8366       -.14783E-07** at limit **
  27  Prefactor     45.896        41.046       -.22005E-06    .37063E-05
  28  Normalizat    1.3812        .22781        .17393E-05    .34854E-03
  29  Prefactor     .83846        .18122       -.32077E-06    .34439E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.41583
  Prefactor  = 0.0001
  Prefactor  = 7.65727
  Prefactor  = 0.0001
  Prefactor  = 10.5336
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.9285
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.0259
  norm       = 2.14988
  norm       = 0.000100006
  Prefactor  = 0.000101349
  norm       = 0.0001
  Prefactor  = 196.507
  norm       = 3.01673
  Prefactor  = 20.579
  Prefactor  = 33.7534
  Prefactor  = 0.0001
  norm       = 0.313698
  Prefactor  = 0.0001
  Prefactor  = 45.896
  Normalizat = 1.38121
  Prefactor  = 0.838461
 **********
 **   18 **HESSE 
 **********

 FCN=   5769.836     FROM HESSE     STATUS=OK           549 CALLS     4261 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.4158        2.3985        .95043E-04   -1.5338    
   2  Prefactor     .10000E-03    17.482        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     7.6573        23.279        .14498E-03   -1.5154    
   4  Prefactor     .10000E-03    87.965        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     10.534        8.1722        .12346E-03   -1.5059    
   6  Prefactor     .10000E-03    21.883        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.9602        .16473E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    19.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    17.253        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    31.308        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    25.624        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     23.928        40.433        .81864E-04   -1.4729    
  13  Prefactor     .10000E-03    13.342        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    13.456        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     21.026        16.890        .87367E-04   -1.4791    
  16  norm          2.1499        3.2210        .14240E-03   -1.5415    
  17  norm          .10001E-03    29.740        .20067E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10135E-03    202.22        .76606E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    186.64        .40940E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     196.51        196.19        .14405E-03   -1.2895    
  21  norm          3.0167        .81544        .32811E-04   -1.5361    
  22  Prefactor     20.579        13.666        .88293E-04   -1.4800    
  23  Prefactor     33.753        32.358        .68978E-04   -1.4545    
  24  Prefactor     .10000E-03    17.941        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .31370        3.0059        .17448E-02   -1.5596    
  26  Prefactor     .10000E-03    7.8806        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     45.896        40.919        .59176E-04   -1.4352    
  28  Normalizat    1.3812        .26418        .27103E-03   -.81174    
  29  Prefactor     .83846        .21016        .27585E-03   -.98326    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.72803e-08
Minuit parameter uncertainties:
  1  2.39861
  2  4.62039e-06
  3  23.3065
  4  3.55681e-05
  5  8.17305
  6  3.44586e-05
  7  9.60273e-06
  8  5.20418e-05
  9  2.66276e-05
  10  4.61318e-05
  11  4.03174e-05
  12  40.4795
  13  7.93488e-06
  14  3.45464e-05
  15  16.8942
  16  3.22125
  17  0.000851356
  18  0.0331473
  19  0.000385367
  20  196.852
  21  0.815441
  22  13.6681
  23  32.375
  24  6.56788e-05
  25  1.94191
  26  1.32549e-05
  27  40.944
  28  0.264441
  29  0.210358
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  2.393e+01  4.048e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  8.385e-01  2.104e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.381e+00  2.644e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.44
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 1.36e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.06e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310374/likelihoodResults_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.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) = 5769.48419035
delta logL = 0.35210789557

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5769.47996042
delta logL = 0.356337828926

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.784       1.0000         .10000E-03   10000.    
     2 'Index     '    3.5831       1.0000          .0000       10.000    
     3 'Normalizat'    1.3391       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86081       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5769.480     FROM MIGRAD    STATUS=FAILED       103 CALLS      329 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.819        38.621        .58348E-03   -.29070E-04
   2  Index         3.5819        1.9507        .78539E-02    .42457E-03
   3  Normalizat    1.3396        .26204        .27441E-03   -.23780E-04
   4  Prefactor     .86026        .21019        .27267E-03   -.21681E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5769.480     FROM SIMPLEX   STATUS=UNCHANGED     70 CALLS      399 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.819        38.621        .30985E-03   -1.5020    
   2  Index         3.5819        1.9507        .85303E-03   -.28756    
   3  Normalizat    1.3396        .26204        .32488E-03   -.82392    
   4  Prefactor     .86026        .21019        .33101E-03   -.97544    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5769.480     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      437 TOTAL
                     EDM=   .16E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.819        25.722        .23339E-04   -.26304E-05
   2  Index         3.5819        1.3178        .15708E-02    .75995E-06
   3  Normalizat    1.3396        .26241        .10976E-04   -.20715E-06
   4  Prefactor     .86026        .21025        .10907E-04   -.83388E-07
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.8192
  Index      = 3.58193
  Normalizat = 1.33961
  Prefactor  = 0.860264
 **********
 **   18 **HESSE 
 **********

 FCN=   5769.480     FROM HESSE     STATUS=OK            23 CALLS      460 TOTAL
                     EDM=   .54E-13    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.819        24.508        .46679E-05   -1.5020    
   2  Index         3.5819        1.2566        .62831E-04   -.28756    
   3  Normalizat    1.3396        .26249        .21953E-05   -.82392    
   4  Prefactor     .86026        .21028        .10907E-04   -.97544    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.4272e-14
Minuit parameter uncertainties:
  1  24.5288
  2  1.27147
  3  0.262756
  4  0.210478
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310374': 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) = 5769.47995544
delta logL = 0.356342801423

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.182e+01  2.453e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  3.582e+00  1.271e+00  0.000e+00  1.000e+01 (-1.000e+00)
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  8.603e-01  2.105e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.340e+00  2.628e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.20
Ra Dec: 181.203 4.120
Photon Index (Free Index): 3.58 +/- 1.27
Photon Flux (Free Index): 6.20e-08 +/- 6.87e-08
Energy Flux (Free Index): 1.01e-05 +/- 1.08e-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/310374/cmap_HighResolution_524188801_524448001_4FGL_J1204.8+0407_daily_bin1099.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.06e-02', comment='SUCCESS', energy_flux2='1.01e-05', dlogl='3.56e-01', photon_flux2='6.20e-08', job_status='DONE', time_completed='2021-09-04 23:31:02.519436', photon_index_error2='1.27', photon_index2='3.58', ts='0.44', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', photon_flux_upper_limit='1.36e-07', energy_flux_error2='1.08e-05', EG='1.38', time_epoch_completed='1630823462.52', return_code='0', job_id='310374', GAL2='0.86', EG2='1.34', return_code2='0', photon_flux_error2='6.87e-08', ts2='1.20', photon_index='2.58' WHERE bin_id='1099' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:31:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0258>
Subject: Job 310374: <4FGL_J1204.8+0407_daily_bin1099> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1099> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:59 2021
Job was executed on host(s) <bullet0258>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:16:02 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 23:16:02 2021
Terminated at Sat Sep  4 23:31:03 2021
Results reported at Sat Sep  4 23:31:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1099 181.203 4.12 524188801 524448001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1204.8+0407 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   824.33 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             318.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   900 sec.
    Turnaround time :                            904 sec.

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

