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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1083
RA = 181.203, Dec = 4.12
tmin = 520041601, tmax = 520300801
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='310349', job_status='RUN', time_executed='2021-09-04 23:19:21.321785', time_epoch_executed='1630822761.32' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1083'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310349

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310349/ft1_4FGL_J1204.8+0407_daily_bin1083.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310349/ft2_4FGL_J1204.8+0407_daily_bin1083.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310349/ft1_4FGL_J1204.8+0407_daily_bin1083.fits outfile=/scratch/kocevski/310349/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1083.fits ra=181.203 dec=4.12 rad=12.0 tmin=520041601.0 tmax=520300801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 4.34
user 4.11
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310349/ft1_filtered_4FGL_J1204.8+0407_daily_bin1083.fits evtable="EVENTS" scfile=/scratch/kocevski/310349/ft2_4FGL_J1204.8+0407_daily_bin1083.fits sctable="SC_DATA" expcube=/scratch/kocevski/310349/ltcube_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.fits outfile=/scratch/kocevski/310349/expmap_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.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/310349/ltcube_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.fits
.....................!
real 191.82
user 187.37
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/310349/ft1_filtered_4FGL_J1204.8+0407_daily_bin1083.fits scfile=/scratch/kocevski/310349/ft2_4FGL_J1204.8+0407_daily_bin1083.fits outfile=/scratch/kocevski/310349/cmap_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.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.57
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310349/ft1_filtered_4FGL_J1204.8+0407_daily_bin1083.fits scfile=/scratch/kocevski/310349/ft2_4FGL_J1204.8+0407_daily_bin1083.fits outfile=/scratch/kocevski/310349/cmap_HighResolution_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.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.55
user 0.39
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4737       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    11.843       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.2656       1.0000         .10000E-03   10000.    
     8 'Prefactor '    15.755       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    53.022       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10112E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    13.493       1.0000         .10000E-03   10000.    
    16 'norm      '    .29922       1.0000         .10000E-03   10000.    
    17 'norm      '    3.6076       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .37296       1.0000         .10000E-03   10000.    
    19 'norm      '    .10194E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    31.303       1.0000         .10000E-03   10000.    
    21 'norm      '    .38804       1.0000         .10000E-03   10000.    
    22 'Prefactor '    4.1954       1.0000         .10000E-03   10000.    
    23 'Prefactor '    45.919       1.0000         .10000E-03   10000.    
    24 'Prefactor '    3.9248       1.0000         .10000E-03   10000.    
    25 'norm      '    3.1654       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10667E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1830       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .87317       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=   4673.739     FROM MIGRAD    STATUS=CONVERGED    772 CALLS     3751 TOTAL
                     EDM=   .80E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4735        2.1749        .12553E-06   -.98743E-05
   2  Prefactor     .10000E-03    10.540        .16383E-07** at limit **
   3  Prefactor     11.844        26.967        .15412E-05    .48255E-04
   4  Prefactor     .10000E-03    54.883       -.10041E-05** at limit **
   5  Prefactor     .10000E-03    4.9920        .70169E-08** at limit **
   6  Prefactor     .10000E-03    23.097        .66240E-06** at limit **
   7  Prefactor     8.2642        9.9609        .16176E-06   -.13998E-04
   8  Prefactor     15.754        14.925        .25507E-06   -.74456E-05
   9  Prefactor     .10000E-03    18.315        .44282E-07** at limit **
  10  Prefactor     .10000E-03    22.339       -.69164E-06** at limit **
  11  Prefactor     53.014        53.711        .47131E-06   -.14276E-04
  12  Prefactor     .10000E-03    42.997       -.23560E-05** at limit **
  13  Prefactor     .10000E-03    10.787        .20752E-07** at limit **
  14  Prefactor     .10000E-03    14.364        .39498E-08** at limit **
  15  Prefactor     13.496        16.616       -.57273E-06   -.12274E-03
  16  norm          .29613        3.3801        .38299E-06   -.34178E-03
  17  norm          3.6081        4.0031        .25536E-06   -.14327E-03
  18  Prefactor     .18042        43.118        .19308E-05   -.10420E-03
  19  norm          .10000E-03    45.892        .30121E-05** at limit **
  20  Prefactor     31.504        104.68        .16781E-04    .15639E-03
  21  norm          .38794        .54265       -.17395E-06   -.12958E-02
  22  Prefactor     4.1962        6.4141        .12885E-06   -.18622E-04
  23  Prefactor     45.900        32.870        .10926E-06   -.14601E-04
  24  Prefactor     3.9226        11.777        .10723E-04   -.12984E-03
  25  norm          3.1652        1.9271        .43281E-07   -.10581E-03
  26  Prefactor     .10000E-03    5.1875       -.31194E-06** at limit **
  27  Prefactor     .10000E-03    214.34       -.71946E-06** at limit **
  28  Normalizat    1.1830        .22360       -.44440E-06   -.15205E-03
  29  Prefactor     .87325        .18688       -.21878E-05   -.94833E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.4735
  Prefactor  = 0.0001
  Prefactor  = 11.8441
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.26415
  Prefactor  = 15.7542
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 53.014
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.496
  norm       = 0.296127
  norm       = 3.60811
  Prefactor  = 0.180423
  norm       = 0.000100003
  Prefactor  = 31.5045
  norm       = 0.387937
  Prefactor  = 4.19615
  Prefactor  = 45.9002
  Prefactor  = 3.92261
  norm       = 3.16517
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.18303
  Prefactor  = 0.873247
 **********
 **   18 **HESSE 
 **********

 FCN=   4673.739     FROM HESSE     STATUS=OK           565 CALLS     4316 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4735        2.1714        .91323E-04   -1.5393    
   2  Prefactor     .10000E-03    10.547        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     11.844        26.960        .11641E-03   -1.5020    
   4  Prefactor     .10000E-03    54.932        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    5.0400        .14917E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    23.115        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.2642        9.9656        .13945E-03   -1.5133    
   8  Prefactor     15.754        14.953        .10091E-03   -1.4914    
   9  Prefactor     .10000E-03    18.534        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    22.353        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     53.014        53.698        .55081E-04   -1.4250    
  12  Prefactor     .10000E-03    43.299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    10.801        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    14.377        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     13.496        15.816        .10904E-03   -1.4973    
  16  norm          .29613        6.2422        .19622E-02   -1.5599    
  17  norm          3.6081        3.9368        .12894E-03   -1.5328    
  18  Prefactor     .18042        50.384        .12247       -1.5623    
  19  norm          .10000E-03    46.246        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     31.504        109.44        .35808E-03   -1.4585    
  21  norm          .38794        .50330        .52875E-03   -1.5583    
  22  Prefactor     4.1962        6.4022        .19675E-03   -1.5298    
  23  Prefactor     45.900        32.871        .59169E-04   -1.4352    
  24  Prefactor     3.9226        11.933        .10182E-02   -1.5312    
  25  norm          3.1652        1.9177        .70141E-04   -1.5352    
  26  Prefactor     .10000E-03    5.2082        .15214E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    219.80        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1830        .26301        .25630E-03   -.87129    
  29  Prefactor     .87325        .21844        .24933E-03   -.97082    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.34645e-09
Minuit parameter uncertainties:
  1  2.1715
  2  5.63178e-06
  3  26.9882
  4  0.00024016
  5  8.06343e-06
  6  0.000122106
  7  9.96761
  8  14.9565
  9  3.80667e-05
  10  0.000114104
  11  53.747
  12  0.000472897
  13  5.83296e-06
  14  5.67053e-06
  15  15.8213
  16  2.71904
  17  3.93709
  18  6.03353
  19  0.000754722
  20  110.144
  21  0.503302
  22  6.40324
  23  32.8838
  24  11.9404
  25  1.91776
  26  3.37106e-05
  27  1.74289e-05
  28  0.263301
  29  0.218661
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  4.729e-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:  8.732e-01  2.187e-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.183e+00  2.633e-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.93e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.76e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310349/likelihoodResults_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.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) = 4673.73876033
delta logL = -0.000109968074867

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4673.73865132
delta logL = -9.6178973763e-07

Fit tolerance = 1e-08

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

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

 FCN=   4673.739     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      278 TOTAL
                     EDM=   .49E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10865E-03    21.136        .18142E-01** at limit **
   2  Index         2.8624        6.4028        .50000        .88702E-05
   3  Normalizat    1.1830        .44824E-02    .25630E-03   -.76561E-04
   4  Prefactor     .87325        .38290E-02    .24933E-03   -.32510E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000108653
  Index      = 2.86237
  Normalizat = 1.18303
  Prefactor  = 0.873247
 **********
 **   18 **HESSE 
 **********

 FCN=   4673.739     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      307 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10865E-03    825.46        .72569E-03   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.8624        8.3103        .50000       -.44175    
   3  Normalizat    1.1830        .28799E-01    .10252E-04   -.87129    
   4  Prefactor     .87325        .24601E-01    .99733E-05   -.97082    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.67517e-08
Minuit parameter uncertainties:
  1  0.171449
  2  1270.98
  3  0.0287992
  4  0.0246012
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310349': 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) = 4673.73865086
delta logL = -5.00134774484e-07

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.087e-04  1.714e-01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.862e+00  1.271e+03  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.732e-01  2.460e-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:  1.183e+00  2.880e-02  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/310349/cmap_HighResolution_520041601_520300801_4FGL_J1204.8+0407_daily_bin1083.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.76e-03', job_status='DONE', photon_flux_upper_limit='9.93e-08', time_completed='2021-09-04 23:31:37.647263', job_id='310349', GAL2='0.87', fit_tolerance='1e-08', EG2='1.18', EG='1.18', time_epoch_completed='1630823497.65', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.87', dlogl='-5.00e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1083' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:31:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0065>
Subject: Job 310349: <4FGL_J1204.8+0407_daily_bin1083> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1083> 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) <bullet0065>, 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:31:38 2021
Results reported at Sat Sep  4 23:31:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1083 181.203 4.12 520041601 520300801 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 :                                   728.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             280.07 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   939 sec.
    Turnaround time :                            942 sec.

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

