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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1081
RA = 181.203, Dec = 4.12
tmin = 519523201, tmax = 519782401
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='310346', job_status='RUN', time_executed='2021-09-04 23:19:21.748039', time_epoch_executed='1630822761.75' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1081'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310346

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

Retrieving the FT1 file...

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

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

Retrieving 37 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310346/ft1_4FGL_J1204.8+0407_daily_bin1081.fits


Retrieving the FT1 file...

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

Retrieving 37 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310346/ft1_4FGL_J1204.8+0407_daily_bin1081.fits outfile=/scratch/kocevski/310346/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1081.fits ra=181.203 dec=4.12 rad=12.0 tmin=519523201.0 tmax=519782401.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 2.41
user 2.17
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits" evtable="EVENTS" scfile=/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits sctable="SC_DATA" outfile=/scratch/kocevski/310346/ltcube_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.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/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits
.....................!
real 7.84
user 7.52
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits evtable="EVENTS" scfile=/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits sctable="SC_DATA" expcube=/scratch/kocevski/310346/ltcube_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits outfile=/scratch/kocevski/310346/expmap_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.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/310346/ltcube_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits
.....................!
real 150.76
user 145.94
sys 4.57

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/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits scfile=/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits outfile=/scratch/kocevski/310346/cmap_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.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.45
user 0.29
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits scfile=/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits outfile=/scratch/kocevski/310346/cmap_HighResolution_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.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.47
user 0.31
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits', '/scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits', expMap='/scratch/kocevski/310346/expmap_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits', expCube='/scratch/kocevski/310346/ltcube_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/310346/Model_4FGL_J1204.8+0407_daily_bin1081.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/310346/ft1_filtered_4FGL_J1204.8+0407_daily_bin1081.fits
Spacecraft file(s): /scratch/kocevski/310346/ft2_4FGL_J1204.8+0407_daily_bin1081.fits
Exposure map: /scratch/kocevski/310346/expmap_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits
Exposure cube: /scratch/kocevski/310346/ltcube_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/310346/Model_4FGL_J1204.8+0407_daily_bin1081.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) = 4565.04339535

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    26.818       1.0000         .10000E-03   10000.    
     3 'Prefactor '    38.594       1.0000         .10000E-03   10000.    
     4 'Prefactor '    43.783       1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.7977       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .13549       1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.8826       1.0000         .10000E-03   10000.    
     9 'Prefactor '    31.102       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.6678       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    44.749       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    2.5800       1.0000         .10000E-03   10000.    
    17 'norm      '    4.0832       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10089E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .17984E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.7416       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10490E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    29.060       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .80119E-01   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .98584       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0832       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=   4565.042     FROM MIGRAD    STATUS=CONVERGED    732 CALLS     4373 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.2954        .21336E-06** at limit **
   2  Prefactor     26.816        35.560        .95833E-06   -.82854E-05
   3  Prefactor     38.607        33.598       -.92265E-06   -.11944E-03
   4  Prefactor     43.663        122.24        .21699E-04    .20908E-04
   5  Prefactor     1.8006        18.395        .12817E-04    .15489E-03
   6  Prefactor     .10000E-03    17.444        .14168E-05** at limit **
   7  Prefactor     .79286E-01    8.8908        .44203E-05   -.81948E-03
   8  Prefactor     2.8813        10.878        .48543E-05    .14039E-03
   9  Prefactor     31.101        20.238        .33451E-06   -.43329E-04
  10  Prefactor     .10000E-03    33.560        .21303E-06** at limit **
  11  Prefactor     7.6649        79.897        .15999E-05   -.10317E-05
  12  Prefactor     .10000E-03    21.530       -.10570E-05** at limit **
  13  Prefactor     44.761        34.539       -.76251E-06   -.14046E-03
  14  Prefactor     .10000E-03    13.827        .34133E-06** at limit **
  15  Prefactor     .10000E-03    8.0050        .10438E-06** at limit **
  16  norm          2.5803        2.5489        .13128E-06   -.20060E-04
  17  norm          4.0773        4.2471        .70146E-07   -.99655E-04
  18  Prefactor     .10000E-03    56.423        .18763E-05** at limit **
  19  norm          .10000E-03    124.81       -.10311E-05** at limit **
  20  Prefactor     .10000E-03    134.92        .36631E-05** at limit **
  21  norm          1.7414        .80950        .61142E-07   -.32893E-03
  22  Prefactor     .10000E-03    15.117       -.12228E-05** at limit **
  23  Prefactor     29.057        38.457        .12581E-05    .36680E-04
  24  Prefactor     .10000E-03    5.9159        .45091E-07** at limit **
  25  norm          .80115E-01    1.0579       -.64691E-07    .16623E-03
  26  Prefactor     .10000E-03    7.6122        .54417E-07** at limit **
  27  Prefactor     .10000E-03    16.146       -.47121E-07** at limit **
  28  Normalizat    .98599        .25233       -.24167E-05   -.49432E-04
  29  Prefactor     1.0832        .20317       -.59336E-06   -.16129E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 26.8162
  Prefactor  = 38.6073
  Prefactor  = 43.6633
  Prefactor  = 1.80057
  Prefactor  = 0.0001
  Prefactor  = 0.0792859
  Prefactor  = 2.88133
  Prefactor  = 31.1009
  Prefactor  = 0.0001
  Prefactor  = 7.66485
  Prefactor  = 0.0001
  Prefactor  = 44.7611
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.58028
  norm       = 4.07733
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.74143
  Prefactor  = 0.0001
  Prefactor  = 29.0574
  Prefactor  = 0.0001
  norm       = 0.0801152
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.985992
  Prefactor  = 1.08321
 **********
 **   18 **HESSE 
 **********

 FCN=   4565.042     FROM HESSE     STATUS=OK           561 CALLS     4934 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.0053        .14935E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     26.816        35.602        .77358E-04   -1.4672    
   3  Prefactor     38.607        33.598        .64517E-04   -1.4464    
   4  Prefactor     43.663        122.39        .30294E-03   -1.4385    
   5  Prefactor     1.8006        18.578        .15592E-02   -1.5440    
   6  Prefactor     .10000E-03    17.444        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .79286E-01    7.8873        .60333E-01   -1.5652    
   8  Prefactor     2.8813        10.832        .11969E-02   -1.5368    
   9  Prefactor     31.101        20.229        .71845E-04   -1.4592    
  10  Prefactor     .10000E-03    33.564        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     7.6649        80.137        .14482E-03   -1.5154    
  12  Prefactor     .10000E-03    21.573        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     44.761        34.538        .59934E-04   -1.4369    
  14  Prefactor     .10000E-03    13.833        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    8.0257        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          2.5803        2.5474        .10280E-03   -1.5387    
  17  norm          4.0773        4.2310        .12941E-03   -1.5304    
  18  Prefactor     .10000E-03    56.851        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    125.19        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    135.00        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.7414        .80161        .37221E-04   -1.5444    
  22  Prefactor     .10000E-03    15.251        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     29.057        38.451        .74321E-04   -1.4629    
  24  Prefactor     .10000E-03    5.9282        .16049E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .80115E-01    8.5303        .13043E-02   -1.5651    
  26  Prefactor     .10000E-03    7.6430        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    16.151        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .98599        .29486        .29592E-03   -.93501    
  29  Prefactor     1.0832        .23714        .23873E-03   -.90005    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.61868e-09
Minuit parameter uncertainties:
  1  1.0549e-05
  2  35.6303
  3  33.6142
  4  123.101
  5  11.5718
  6  2.99201e-05
  7  1.5808
  8  10.8397
  9  20.2333
  10  1.18199e-05
  11  49.653
  12  0.000111115
  13  34.5536
  14  6.62498e-06
  15  1.34946e-05
  16  2.54749
  17  4.23131
  18  6.58775e-05
  19  6.55549e-05
  20  0.00023886
  21  0.801617
  22  3.20851e-05
  23  38.4842
  24  7.11435e-06
  25  1.65258
  26  9.55302e-06
  27  4.95214e-06
  28  0.295347
  29  0.237372
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  1.111e-04  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:  1.083e+00  2.374e-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:  9.860e-01  2.953e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 9.40e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.35e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310346/likelihoodResults_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.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) = 4565.04208313
delta logL = -0.000220700305363

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4564.76197645
delta logL = 0.27988598392

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10096E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    9.8878       1.0000          .0000       10.000    
     3 'Normalizat'    .92518       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1194       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.

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

 FCN=   4564.762     FROM MIGRAD    STATUS=FAILED       131 CALLS      447 TOTAL
                     EDM=   .50E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .41219E-01    .20744E-03** at limit **
   2  Index         9.8889        9.7146        .67242E-01   -.24636E-04
   3  Normalizat    .92552        .12580        .30418E-03   -.35057E-04
   4  Prefactor     1.1190        .10465        .23550E-03   -.45910E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4564.762     FROM SIMPLEX   STATUS=UNCHANGED    152 CALLS      599 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .41219E-01    .15524E-04** at limit **
   2  Index         9.8889        9.7146        .15435E-02   -.24636E-04
   3  Normalizat    .92552        .12580        .97089E-05   -.35057E-04
   4  Prefactor     1.1190        .10465        .95612E-05   -.45910E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4564.762     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      645 TOTAL
                     EDM=   .15E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .26487E-01    .25318E-03** at limit **
   2  Index         9.8889        9.8704        .26897E-02   -.90875E-06
   3  Normalizat    .92552        .10457        .12167E-04   -.29900E-04
   4  Prefactor     1.1190        .88149E-01    .94199E-05   -.42724E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 9.8889
  Normalizat = 0.92552
  Prefactor  = 1.11904
 **********
 **   18 **HESSE 
 **********

 FCN=   4564.762     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      678 TOTAL
                     EDM=   .25E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .30728E-01    .23546E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         9.8889        9.9361        .10759E-03    1.3596    
   3  Normalizat    .92552        .10939        .24335E-05   -.95569    
   4  Prefactor     1.1190        .92164E-01    .18840E-05   -.88860    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.53205e-11
Minuit parameter uncertainties:
  1  2.13877e-07
  2  9.57188
  3  0.109418
  4  0.0921771
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310346': 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) = 4564.76190694
delta logL = 0.279955494801

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  2.139e-07  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  9.889e+00  9.572e+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:  1.119e+00  9.218e-02  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:  9.255e-01  1.094e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 181.203 4.120

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/310346/cmap_HighResolution_519523201_519782401_4FGL_J1204.8+0407_daily_bin1081.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.35e-03', job_status='DONE', photon_flux_upper_limit='9.40e-08', time_completed='2021-09-04 23:29:21.124907', job_id='310346', GAL2='1.12', fit_tolerance='1e-08', EG2='0.93', EG='0.99', time_epoch_completed='1630823361.12', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.08', dlogl='2.80e-01', ts2='0.60', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1081' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:29:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 310346: <4FGL_J1204.8+0407_daily_bin1081> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1081> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:56 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:58 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:15:58 2021
Terminated at Sat Sep  4 23:29:21 2021
Results reported at Sat Sep  4 23:29:21 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1081 181.203 4.12 519523201 519782401 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 :                                   595.40 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             282.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   803 sec.
    Turnaround time :                            805 sec.

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

