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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1161
RA = 181.203, Dec = 4.12
tmin = 540259201, tmax = 540518401
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='310559', job_status='RUN', time_executed='2021-09-04 23:17:10.084483', time_epoch_executed='1630822630.08' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1161'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310559

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310559/ft1_4FGL_J1204.8+0407_daily_bin1161.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310559/ft1_4FGL_J1204.8+0407_daily_bin1161.fits outfile=/scratch/kocevski/310559/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1161.fits ra=181.203 dec=4.12 rad=12.0 tmin=540259201.0 tmax=540518401.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.60
user 3.28
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310559/ft1_filtered_4FGL_J1204.8+0407_daily_bin1161.fits" evtable="EVENTS" scfile=/scratch/kocevski/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits sctable="SC_DATA" outfile=/scratch/kocevski/310559/ltcube_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.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/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits
.....................!
real 11.68
user 11.31
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310559/ft1_filtered_4FGL_J1204.8+0407_daily_bin1161.fits evtable="EVENTS" scfile=/scratch/kocevski/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits sctable="SC_DATA" expcube=/scratch/kocevski/310559/ltcube_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.fits outfile=/scratch/kocevski/310559/expmap_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.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/310559/ltcube_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.fits
.....................!
real 190.05
user 184.93
sys 4.74

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/310559/ft1_filtered_4FGL_J1204.8+0407_daily_bin1161.fits scfile=/scratch/kocevski/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits outfile=/scratch/kocevski/310559/cmap_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.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.56
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310559/ft1_filtered_4FGL_J1204.8+0407_daily_bin1161.fits scfile=/scratch/kocevski/310559/ft2_4FGL_J1204.8+0407_daily_bin1161.fits outfile=/scratch/kocevski/310559/cmap_HighResolution_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.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.39
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.0288       1.0000         .10000E-03   10000.    
     2 'Prefactor '    22.028       1.0000         .10000E-03   10000.    
     3 'Prefactor '    15.112       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .84325E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10124E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .14841E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .25187E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    203.09       1.0000         .10000E-03   10000.    
    11 'Prefactor '    20.214       1.0000         .10000E-03   10000.    
    12 'Prefactor '    27.926       1.0000         .10000E-03   10000.    
    13 'Prefactor '    25.173       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.1456       1.0000         .10000E-03   10000.    
    17 'norm      '    5.0816       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    40.891       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10186E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.3819       1.0000         .10000E-03   10000.    
    22 'Prefactor '    2.3611       1.0000         .10000E-03   10000.    
    23 'Prefactor '    60.378       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    3.1011       1.0000         .10000E-03   10000.    
    26 'Prefactor '    20.460       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.5928       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .57772       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=   6986.836     FROM MIGRAD    STATUS=CONVERGED    725 CALLS     3721 TOTAL
                     EDM=   .81E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.0287        1.1639        .29137E-07    .10203E-03
   2  Prefactor     22.020        26.703       -.50915E-06    .60109E-05
   3  Prefactor     15.111        17.518       -.17386E-06   -.10300E-06
   4  Prefactor     .10000E-03    114.77        .41939E-06** at limit **
   5  Prefactor     .10000E-03    27.277        .13144E-04** at limit **
   6  Prefactor     .10000E-03    19.421        .31612E-07** at limit **
   7  Prefactor     .10000E-03    5.4194        .17918E-06** at limit **
   8  Prefactor     .10002E-03    26.671       -.58806E-05** at limit **
   9  Prefactor     .10000E-03    11.464       -.38056E-05** at limit **
  10  Prefactor     203.38        117.79        .60837E-05    .22580E-04
  11  Prefactor     20.236        40.426       -.24237E-05   -.11681E-03
  12  Prefactor     27.950        36.739       -.34465E-07    .10739E-04
  13  Prefactor     25.168        25.211       -.69019E-06   -.29976E-04
  14  Prefactor     .10000E-03    8.6586        .32174E-07** at limit **
  15  Prefactor     .10000E-03    30.289        .12973E-05** at limit **
  16  norm          4.1452        2.5123       -.29353E-07   -.15551E-03
  17  norm          5.0815        4.9808       -.81454E-07    .19850E-03
  18  Prefactor     .10000E-03    46.448        .44983E-06** at limit **
  19  norm          40.884        47.134        .18764E-06    .29828E-04
  20  Prefactor     .10000E-03    112.18        .86997E-07** at limit **
  21  norm          1.3819        .62122       -.26118E-07    .29831E-03
  22  Prefactor     2.3595        14.825       -.30764E-05    .60391E-04
  23  Prefactor     60.374        46.455        .16359E-06    .51379E-04
  24  Prefactor     .10000E-03    4.0733        .18816E-06** at limit **
  25  norm          3.1009        1.5646       -.40443E-07    .11465E-03
  26  Prefactor     20.458        12.024       -.13920E-06    .10715E-04
  27  Prefactor     .10000E-03    15.443        .19385E-06** at limit **
  28  Normalizat    1.5928        .22519        .15013E-05    .15318E-03
  29  Prefactor     .57781        .16883       -.78281E-06    .44430E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.02872
  Prefactor  = 22.0203
  Prefactor  = 15.1105
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100017
  Prefactor  = 0.000100004
  Prefactor  = 203.377
  Prefactor  = 20.2362
  Prefactor  = 27.9495
  Prefactor  = 25.1683
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 4.14523
  norm       = 5.08152
  Prefactor  = 0.0001
  norm       = 40.8844
  Prefactor  = 0.0001
  norm       = 1.38188
  Prefactor  = 2.35955
  Prefactor  = 60.3745
  Prefactor  = 0.0001
  norm       = 3.10087
  Prefactor  = 20.4584
  Prefactor  = 0.0001
  Normalizat = 1.59281
  Prefactor  = 0.577813
 **********
 **   18 **HESSE 
 **********

 FCN=   6986.836     FROM HESSE     STATUS=OK           553 CALLS     4274 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.0287        1.1577        .93252E-04   -1.5505    
   2  Prefactor     22.020        26.706        .85342E-04   -1.4769    
   3  Prefactor     15.111        17.516        .10303E-03   -1.4930    
   4  Prefactor     .10000E-03    114.94        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    28.288        .38171E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.4533        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10002E-03    28.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    51.807        .48000E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     203.38        120.04        .14179E-03   -1.2846    
  11  Prefactor     20.236        39.408        .89084E-04   -1.4808    
  12  Prefactor     27.950        36.754        .75811E-04   -1.4650    
  13  Prefactor     25.168        25.154        .79841E-04   -1.4704    
  14  Prefactor     .10000E-03    8.6606        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    31.262        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.1452        2.4996        .97887E-04   -1.5301    
  17  norm          5.0815        4.9586        .14426E-03   -1.5257    
  18  Prefactor     .10000E-03    46.713        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          40.884        47.246        .62686E-04   -1.4428    
  20  Prefactor     .10000E-03    112.26        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.3819        .61259        .39167E-04   -1.5473    
  22  Prefactor     2.3595        15.408        .13335E-02   -1.5401    
  23  Prefactor     60.374        46.848        .51636E-04   -1.4152    
  24  Prefactor     .10000E-03    4.0882        .16472E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          3.1009        1.5601        .70769E-04   -1.5356    
  26  Prefactor     20.458        12.017        .88548E-04   -1.4803    
  27  Prefactor     .10000E-03    15.464        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.5928        .24961        .25590E-03   -.75203    
  29  Prefactor     .57781        .18678        .31768E-03   -1.0853    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.80257e-09
Minuit parameter uncertainties:
  1  1.15768
  2  26.7209
  3  17.522
  4  7.17212e-05
  5  0.00060927
  6  4.24722e-05
  7  4.93823e-06
  8  0.00137254
  9  0.000927381
  10  120.184
  11  39.4585
  12  36.7837
  13  25.1647
  14  1.04404e-06
  15  0.000301911
  16  2.49969
  17  4.95898
  18  7.96195e-05
  19  47.2894
  20  0.000223439
  21  0.612592
  22  12.0634
  23  46.877
  24  1.15719e-05
  25  1.56008
  26  12.0181
  27  1.89419e-05
  28  0.249802
  29  0.186976
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  2.795e+01  3.678e+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:  5.778e-01  1.870e-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.593e+00  2.498e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/310559/likelihoodResults_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.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) = 6986.64963396
delta logL = 0.186787425867

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6986.62930229
delta logL = 0.207119101473

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    42.132       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0901       1.0000          .0000       10.000    
     3 'Normalizat'    1.6064       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .56671       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=   6986.629     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      285 TOTAL
                     EDM=   .36E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     42.102        47.034        .61759E-04   -.11045E-04
   2  Index         2.0896        .65656        .10380E-01    .29111E-05
   3  Normalizat    1.6063        .23146        .25499E-03   -.52859E-04
   4  Prefactor     .56684        .18299        .32039E-03    .34526E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 42.1024
  Index      = 2.08956
  Normalizat = 1.60629
  Prefactor  = 0.566836
 **********
 **   18 **HESSE 
 **********

 FCN=   6986.629     FROM HESSE     STATUS=OK            25 CALLS      310 TOTAL
                     EDM=   .36E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     42.102        46.846        .24704E-05   -1.4409    
   2  Index         2.0896        .65386        .41521E-03   -.62129    
   3  Normalizat    1.6063        .23158        .50999E-04   -.74834    
   4  Prefactor     .56684        .18306        .12815E-04   -1.0900    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.60724e-11
Minuit parameter uncertainties:
  1  46.8872
  2  0.656709
  3  0.231736
  4  0.183253
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310559': 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) = 6986.62930141
delta logL = 0.207119981756

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  4.210e+01  4.689e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.090e+00  6.567e-01  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:  5.668e-01  1.833e-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.606e+00  2.317e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.17
Ra Dec: 181.203 4.120
Photon Index (Free Index): 2.09 +/- 0.66
Photon Flux (Free Index): 2.59e-08 +/- 3.30e-08
Energy Flux (Free Index): 1.45e-05 +/- 1.99e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/310559/cmap_HighResolution_540259201_540518401_4FGL_J1204.8+0407_daily_bin1161.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.88e-03', comment='SUCCESS', energy_flux2='1.45e-05', dlogl='2.07e-01', photon_flux2='2.59e-08', job_status='DONE', time_completed='2021-09-04 23:32:49.530320', photon_index_error2='0.66', photon_index2='2.09', ts='0.75', fit_tolerance='1e-08', GAL='0.58', photon_index_error='0.00', photon_flux_upper_limit='1.26e-07', energy_flux_error2='1.99e-05', EG='1.59', time_epoch_completed='1630823569.53', return_code='0', job_id='310559', GAL2='0.57', EG2='1.61', return_code2='0', photon_flux_error2='3.30e-08', ts2='1.17', photon_index='2.58' WHERE bin_id='1161' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:32:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0050>
Subject: Job 310559: <4FGL_J1204.8+0407_daily_bin1161> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1161> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:16:19 2021
Job was executed on host(s) <bullet0050>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:16:20 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:20 2021
Terminated at Sat Sep  4 23:32:50 2021
Results reported at Sat Sep  4 23:32:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1161 181.203 4.12 540259201 540518401 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 :                                   933.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             325.28 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   989 sec.
    Turnaround time :                            991 sec.

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

