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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1298
RA = 181.203, Dec = 4.12
tmin = 575769601, tmax = 576028801
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='311818', job_status='RUN', time_executed='2021-09-04 23:20:57.999926', time_epoch_executed='1630822858.0' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1298'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/311818

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/311818/ft1_4FGL_J1204.8+0407_daily_bin1298.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/311818/ft1_4FGL_J1204.8+0407_daily_bin1298.fits outfile=/scratch/kocevski/311818/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1298.fits ra=181.203 dec=4.12 rad=12.0 tmin=575769601.0 tmax=576028801.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.81
user 3.60
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/311818/ft1_filtered_4FGL_J1204.8+0407_daily_bin1298.fits" evtable="EVENTS" scfile=/scratch/kocevski/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits sctable="SC_DATA" outfile=/scratch/kocevski/311818/ltcube_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.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/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits
.....................!
real 11.58
user 11.24
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/311818/ft1_filtered_4FGL_J1204.8+0407_daily_bin1298.fits evtable="EVENTS" scfile=/scratch/kocevski/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits sctable="SC_DATA" expcube=/scratch/kocevski/311818/ltcube_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.fits outfile=/scratch/kocevski/311818/expmap_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.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/311818/ltcube_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.fits
.....................!
real 189.45
user 185.02
sys 4.07

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/311818/ft1_filtered_4FGL_J1204.8+0407_daily_bin1298.fits scfile=/scratch/kocevski/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits outfile=/scratch/kocevski/311818/cmap_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.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.81
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/311818/ft1_filtered_4FGL_J1204.8+0407_daily_bin1298.fits scfile=/scratch/kocevski/311818/ft2_4FGL_J1204.8+0407_daily_bin1298.fits outfile=/scratch/kocevski/311818/cmap_HighResolution_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.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.77
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4597       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    21.461       1.0000         .10000E-03   10000.    
     4 'Prefactor '    85.959       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.9933       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10045E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    25.657       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    7.1812       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .17734       1.0000         .10000E-03   10000.    
    14 'Prefactor '    43.807       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    2.9312       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .94928       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    12.164       1.0000         .10000E-03   10000.    
    25 'norm      '    1.6391       1.0000         .10000E-03   10000.    
    26 'Prefactor '    7.8745       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2627       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .86311       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.

 FCN=   5345.835     FROM MIGRAD    STATUS=CONVERGED    738 CALLS     3665 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4596        1.9670        .65194E-02    .49162E-04
   2  Prefactor     .10000E-03    11.046        .90712E-02** at limit **
   3  Prefactor     21.467        28.681        .21615E-02   -.96581E-03
   4  Prefactor     85.961        101.73        .10833E-02    .22031E-03
   5  Prefactor     7.9936        7.9334        .35454E-02   -.22799E-04
   6  Prefactor     .10003E-03    38.924        .90712E-02** at limit **
   7  Prefactor     .10000E-03    7.4667        .90712E-02** at limit **
   8  Prefactor     .10000E-03    6.6797        .90712E-02** at limit **
   9  Prefactor     25.662        19.379        .19771E-02    .96209E-03
  10  Prefactor     .10000E-03    31.866        .90712E-02** at limit **
  11  Prefactor     .10002E-03    37.638        .90712E-02** at limit **
  12  Prefactor     7.1941        59.625        .37421E-02   -.17401E-03
  13  Prefactor     .10005E-03    16.797        .98737E-01** at limit **
  14  Prefactor     43.808        28.979        .15143E-02    .67418E-03
  15  Prefactor     .10000E-03    3.5127        .90712E-02** at limit **
  16  norm          2.9326        2.0949        .59315E-02   -.78252E-03
  17  norm          .10000E-03    .89382        .90712E-02** at limit **
  18  Prefactor     .10004E-03    17.676        .90712E-02** at limit **
  19  norm          .10000E-03    12.066        .90712E-02** at limit **
  20  Prefactor     .10000E-03    66.555        .90712E-02** at limit **
  21  norm          .94926        .51993        .82513E-02    .45109E-04
  22  Prefactor     .10000E-03    5.5835        .90712E-02** at limit **
  23  Prefactor     .10000E-03    10.875        .90712E-02** at limit **
  24  Prefactor     12.163        10.273        .28714E-02   -.70167E-04
  25  norm          1.6389        1.3541        .82519E-02    .23437E-04
  26  Prefactor     7.8731        10.878        .35723E-02    .13700E-02
  27  Prefactor     .10004E-03    17.868        .90712E-02** at limit **
  28  Normalizat    1.2624        .21779        .58304E-01   -.36715E-03
  29  Prefactor     .86345        .17937        .44533E-01   -.41488E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.45962
  Prefactor  = 0.000100003
  Prefactor  = 21.4673
  Prefactor  = 85.9612
  Prefactor  = 7.99358
  Prefactor  = 0.000100032
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 25.6616
  Prefactor  = 0.000100002
  Prefactor  = 0.000100021
  Prefactor  = 7.19411
  Prefactor  = 0.00010005
  Prefactor  = 43.8076
  Prefactor  = 0.0001
  norm       = 2.9326
  norm       = 0.0001
  Prefactor  = 0.000100039
  norm       = 0.000100001
  Prefactor  = 0.000100002
  norm       = 0.949263
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 12.1634
  norm       = 1.63888
  Prefactor  = 7.87309
  Prefactor  = 0.00010004
  Normalizat = 1.26243
  Prefactor  = 0.863446
 **********
 **   18 **HESSE 
 **********

 FCN=   5345.835     FROM HESSE     STATUS=OK           545 CALLS     4210 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4596        1.9651        .88875E-04   -1.5394    
   2  Prefactor     .10000E-03    11.052        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     21.467        28.680        .86462E-04   -1.4781    
   4  Prefactor     85.961        102.04        .43331E-04   -1.3851    
   5  Prefactor     7.9936        7.9423        .14182E-03   -1.5142    
   6  Prefactor     .10003E-03    38.962        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    7.5207        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    6.6893        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     25.662        19.385        .79085E-04   -1.4694    
  10  Prefactor     .10000E-03    31.875        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10002E-03    37.677        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     7.1941        59.729        .14969E-03   -1.5171    
  13  Prefactor     .10005E-03    18.559        .91462E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     43.808        28.974        .60572E-04   -1.4383    
  15  Prefactor     .10000E-03    3.5157        .13380E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          2.9326        2.0940        .86615E-04   -1.5365    
  17  norm          .10000E-03    .89695        .67463E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10004E-03    17.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    12.068        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    66.564        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .94926        .51186        .37007E-04   -1.5513    
  22  Prefactor     .10000E-03    5.6203        .16872E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    10.880        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     12.163        10.263        .11485E-03   -1.5010    
  25  norm          1.6389        1.3558        .74333E-04   -1.5452    
  26  Prefactor     7.8731        10.867        .71445E-03   -1.5147    
  27  Prefactor     .10004E-03    17.892        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2624        .25728        .25784E-03   -.84695    
  29  Prefactor     .86345        .21059        .25759E-03   -.97430    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41308e-08
Minuit parameter uncertainties:
  1  1.96511
  2  0.000363888
  3  28.6984
  4  102.253
  5  7.94337
  6  0.00225095
  7  6.4412e-06
  8  1.24961e-05
  9  19.3895
  10  0.000455792
  11  0.00176899
  12  41.5144
  13  0.00192359
  14  28.9828
  15  7.05867e-07
  16  2.09404
  17  7.65723e-08
  18  0.0016692
  19  0.000184467
  20  0.000705004
  21  0.51186
  22  1.34097e-05
  23  0.000193055
  24  10.2649
  25  1.35579
  26  10.8699
  27  0.0016959
  28  0.257544
  29  0.210785
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  7.194e+00  4.151e+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.634e-01  2.108e-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.262e+00  2.575e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.03
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 1.20e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.37e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/311818/likelihoodResults_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.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) = 5345.75915187
delta logL = 0.0762839250356

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5345.65272505
delta logL = 0.182710738469

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .81596       1.0000         .10000E-03   10000.    
     2 'Index     '    4.9557       1.0000          .0000       10.000    
     3 'Normalizat'    1.2107       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89384       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=   5345.653     FROM MIGRAD    STATUS=FAILED        80 CALLS      261 TOTAL
                     EDM=   .60E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .81607        100.12        .10073E-03   -.30929E-02
   2  Index         4.9561        6.4676        .76330E-02   -.34433E-03
   3  Normalizat    1.2109        .20365        .26244E-03   -.50605E-03
   4  Prefactor     .89377        .16846        .25370E-03   -.28746E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5345.653     FROM SIMPLEX   STATUS=UNCHANGED     91 CALLS      352 TOTAL
                     EDM=   .99E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .81607        100.12        .18628E-03   -.30929E-02
   2  Index         4.9561        6.4676        .21564E-02   -.34433E-03
   3  Normalizat    1.2109        .20365        .16699E-03   -.50605E-03
   4  Prefactor     .89377        .16846        .63875E-04   -.28746E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5345.653     FROM MIGRAD    STATUS=CONVERGED     27 CALLS      379 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .81557        12.190        .40294E-05   -.34608E-02
   2  Index         4.9565        3.8139        .30532E-03   -.27385E-03
   3  Normalizat    1.2109        .26241        .52488E-04   -.53244E-03
   4  Prefactor     .89377        .21485        .50740E-04   -.31180E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.815573
  Index      = 4.95645
  Normalizat = 1.2109
  Prefactor  = 0.893768
 **********
 **   18 **HESSE 
 **********

 FCN=   5345.653     FROM HESSE     STATUS=OK            23 CALLS      402 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .81557        10.530        .80587E-06   -1.5527    
   2  Index         4.9565        3.6087        .61064E-04   -.87098E-02
   3  Normalizat    1.2109        .26249        .10498E-04   -.86267    
   4  Prefactor     .89377        .21490        .10148E-04   -.96359    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.39764e-09
Minuit parameter uncertainties:
  1  5.862
  2  4.03157
  3  0.262774
  4  0.215102
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/311818': 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) = 5345.65272364
delta logL = 0.182712146099

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  8.156e-01  5.862e+00  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  4.956e+00  4.032e+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.938e-01  2.151e-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.211e+00  2.628e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.03
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/311818/cmap_HighResolution_575769601_576028801_4FGL_J1204.8+0407_daily_bin1298.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.37e-03', job_status='DONE', photon_flux_upper_limit='1.20e-07', time_completed='2021-09-04 23:33:58.880810', job_id='311818', GAL2='0.89', fit_tolerance='1e-08', EG2='1.21', EG='1.26', time_epoch_completed='1630823638.88', return_code2='0', ts='0.03', comment='SUCCESS', return_code='0', GAL='0.86', dlogl='1.83e-01', ts2='0.44', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1298' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:33:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0268>
Subject: Job 311818: <4FGL_J1204.8+0407_daily_bin1298> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1298> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep  4 23:20:28 2021
Job was executed on host(s) <bullet0268>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:20:30 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:20:30 2021
Terminated at Sat Sep  4 23:34:01 2021
Results reported at Sat Sep  4 23:34:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1298 181.203 4.12 575769601 576028801 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 :                                   774.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             357.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   809 sec.
    Turnaround time :                            813 sec.

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

