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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1157
RA = 181.203, Dec = 4.12
tmin = 539222401, tmax = 539481601
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='310552', job_status='RUN', time_executed='2021-09-04 23:18:43.313814', time_epoch_executed='1630822723.31' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1157'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310552

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310552/ft1_4FGL_J1204.8+0407_daily_bin1157.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310552/ft2_4FGL_J1204.8+0407_daily_bin1157.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310552/ft1_4FGL_J1204.8+0407_daily_bin1157.fits outfile=/scratch/kocevski/310552/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1157.fits ra=181.203 dec=4.12 rad=12.0 tmin=539222401.0 tmax=539481601.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 5.61
user 5.36
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/310552/ft2_4FGL_J1204.8+0407_daily_bin1157.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/310552/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1157.fits evtable="EVENTS" outfile="/scratch/kocevski/310552/ft1_filtered_4FGL_J1204.8+0407_daily_bin1157.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.53
user 0.32
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310552/ft1_filtered_4FGL_J1204.8+0407_daily_bin1157.fits evtable="EVENTS" scfile=/scratch/kocevski/310552/ft2_4FGL_J1204.8+0407_daily_bin1157.fits sctable="SC_DATA" expcube=/scratch/kocevski/310552/ltcube_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.fits outfile=/scratch/kocevski/310552/expmap_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.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/310552/ltcube_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.fits
.....................!
real 191.33
user 185.17
sys 5.52

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/310552/ft1_filtered_4FGL_J1204.8+0407_daily_bin1157.fits scfile=/scratch/kocevski/310552/ft2_4FGL_J1204.8+0407_daily_bin1157.fits outfile=/scratch/kocevski/310552/cmap_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.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.67
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310552/ft1_filtered_4FGL_J1204.8+0407_daily_bin1157.fits scfile=/scratch/kocevski/310552/ft2_4FGL_J1204.8+0407_daily_bin1157.fits outfile=/scratch/kocevski/310552/cmap_HighResolution_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.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.67
user 0.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4289       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    19.084       1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.5599       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10117E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.7204       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10047E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.064       1.0000         .10000E-03   10000.    
    12 'Prefactor '    17.702       1.0000         .10000E-03   10000.    
    13 'Prefactor '    11.187       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .72863E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    3.2910       1.0000         .10000E-03   10000.    
    17 'norm      '    9.1212       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    21.154       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    2.1901       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 '    .10077E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    3.8085       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10259E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    32.766       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.6963       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .68106       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=   5454.950     FROM MIGRAD    STATUS=CONVERGED    782 CALLS     3796 TOTAL
                     EDM=   .64E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4303        2.8753        .24641E-06    .11959E-03
   2  Prefactor     .10000E-03    6.7672       -.14691E-06** at limit **
   3  Prefactor     .10000E-03    7.3513       -.54683E-07** at limit **
   4  Prefactor     19.155        221.37        .36226E-05    .48689E-05
   5  Prefactor     4.5668        14.905        .12854E-05    .48788E-04
   6  Prefactor     .10000E-03    26.214       -.52418E-06** at limit **
   7  Prefactor     8.7394        13.553        .92447E-06    .17347E-04
   8  Prefactor     .10000E-03    9.4832       -.65619E-07** at limit **
   9  Prefactor     .10000E-03    18.499       -.10703E-05** at limit **
  10  Prefactor     .10000E-03    64.005       -.12466E-06** at limit **
  11  Prefactor     19.065        18.557       -.27594E-06   -.64070E-04
  12  Prefactor     17.444        101.15        .25052E-06   -.33828E-04
  13  Prefactor     11.154        22.928       -.65114E-06   -.20268E-03
  14  Prefactor     .10000E-03    9.0417        .67437E-07** at limit **
  15  Prefactor     .24395        21.802        .41462E-05   -.43887E-03
  16  norm          3.2651        2.5520       -.54797E-06   -.23599E-02
  17  norm          9.1261        7.6977        .35402E-06   -.31508E-03
  18  Prefactor     .10000E-03    15.737       -.11945E-06** at limit **
  19  norm          21.137        39.540       -.58149E-06   -.17894E-04
  20  Prefactor     .10000E-03    46.698       -.35092E-07** at limit **
  21  norm          2.1892        .84759        .21981E-07   -.24219E-02
  22  Prefactor     .10000E-03    8.7376       -.20222E-06** at limit **
  23  Prefactor     .10000E-03    19.244       -.75079E-07** at limit **
  24  Prefactor     .10000E-03    8.9732       -.29129E-06** at limit **
  25  norm          3.8091        1.8408        .68726E-07   -.66098E-05
  26  Prefactor     .10000E-03    5.7885        .33379E-06** at limit **
  27  Prefactor     32.749        46.931        .59678E-06    .24130E-04
  28  Normalizat    1.6953        .34030       -.57137E-05   -.34850E-03
  29  Prefactor     .68155        .23216        .49858E-05   -.33328E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.43034
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.1551
  Prefactor  = 4.56675
  Prefactor  = 0.0001
  Prefactor  = 8.73936
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.0651
  Prefactor  = 17.444
  Prefactor  = 11.1538
  Prefactor  = 0.0001
  Prefactor  = 0.243951
  norm       = 3.26509
  norm       = 9.12615
  Prefactor  = 0.0001
  norm       = 21.1374
  Prefactor  = 0.0001
  norm       = 2.18919
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.80907
  Prefactor  = 0.0001
  Prefactor  = 32.749
  Normalizat = 1.69527
  Prefactor  = 0.681549
 **********
 **   18 **HESSE 
 **********

 FCN=   5454.950     FROM HESSE     STATUS=OK           551 CALLS     4347 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4303        2.8671        .13013E-03   -1.5396    
   2  Prefactor     .10000E-03    6.7703        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.3546        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     19.155        219.85        .91683E-04   -1.4832    
   5  Prefactor     4.5668        14.891        .18851E-03   -1.5281    
   6  Prefactor     .10000E-03    26.436        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.7394        13.501        .13574E-03   -1.5117    
   8  Prefactor     .10000E-03    9.4847        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    18.707        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    64.009        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     19.065        18.563        .45866E-03   -1.4834    
  12  Prefactor     17.444        100.46        .95193E-04   -1.4872    
  13  Prefactor     11.154        23.058        .11978E-03   -1.5040    
  14  Prefactor     .10000E-03    9.0427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .24395        413.53        .45176E-02   -1.5609    
  16  norm          3.2651        3.5060        .88638E-04   -1.5347    
  17  norm          9.1261        7.6605        .13271E-03   -1.5104    
  18  Prefactor     .10000E-03    15.743        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          21.137        39.520        .87085E-04   -1.4788    
  20  Prefactor     .10000E-03    46.699        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          2.1892        .84865        .35423E-04   -1.5412    
  22  Prefactor     .10000E-03    8.7657        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    19.247        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    9.0715        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          3.8091        1.8388        .66361E-04   -1.5318    
  26  Prefactor     .10000E-03    5.8576        .17367E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     32.749        46.984        .70002E-04   -1.4563    
  28  Normalizat    1.6953        .34342        .28217E-03   -.72430    
  29  Prefactor     .68155        .23412        .31095E-03   -1.0425    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.70479e-08
Minuit parameter uncertainties:
  1  2.86727
  2  1.03376e-05
  3  4.88244e-06
  4  130.395
  5  14.9035
  6  8.62516e-05
  7  13.5062
  8  6.5455e-06
  9  9.87431e-05
  10  3.80049e-05
  11  18.5685
  12  83.9393
  13  23.0769
  14  3.87695e-07
  15  20.225
  16  3.50619
  17  7.66135
  18  1.45203e-05
  19  39.5687
  20  8.84114e-06
  21  0.848659
  22  1.99589e-05
  23  1.05987e-05
  24  2.64475e-05
  25  1.83879
  26  2.94747e-05
  27  47.0369
  28  0.343909
  29  0.234459
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.744e+01  8.394e+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:  6.815e-01  2.345e-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.695e+00  3.439e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/310552/likelihoodResults_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.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) = 5454.54121653
delta logL = 0.408316947384

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5454.54011491
delta logL = 0.409418564895

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.771       1.0000         .10000E-03   10000.    
     2 'Index     '    3.8430       1.0000          .0000       10.000    
     3 'Normalizat'    1.5776       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73891       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=   5454.540     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      284 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.753        88.597        .10085E-03   -.47626E-03
   2  Index         3.8443        2.6255        .70695E-02   -.14971E-03
   3  Normalizat    1.5786        .33728        .29013E-03    .65564E-04
   4  Prefactor     .73792        .23757        .29989E-03    .69696E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.7532
  Index      = 3.84434
  Normalizat = 1.57858
  Prefactor  = 0.737921
 **********
 **   18 **HESSE 
 **********

 FCN=   5454.540     FROM HESSE     STATUS=OK            25 CALLS      309 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.753        37.372        .40341E-05   -1.4914    
   2  Index         3.8443        1.3622        .28278E-03   -.23324    
   3  Normalizat    1.5786        .33818        .58026E-04   -.75594    
   4  Prefactor     .73792        .23775        .59978E-04   -1.0206    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.20202e-09
Minuit parameter uncertainties:
  1  37.4279
  2  1.38061
  3  0.338675
  4  0.238076
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310552': 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) = 5454.54010297
delta logL = 0.409430511808

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.575e+01  3.743e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  3.844e+00  1.381e+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:  7.379e-01  2.381e-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.579e+00  3.387e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.00
Ra Dec: 181.203 4.120
Photon Index (Free Index): 3.84 +/- 1.38
Photon Flux (Free Index): 1.27e-07 +/- 1.45e-07
Energy Flux (Free Index): 1.96e-05 +/- 2.20e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/310552/cmap_HighResolution_539222401_539481601_4FGL_J1204.8+0407_daily_bin1157.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.59e-02', comment='SUCCESS', energy_flux2='1.96e-05', dlogl='4.09e-01', photon_flux2='1.27e-07', job_status='DONE', time_completed='2021-09-04 23:32:11.726907', photon_index_error2='1.38', photon_index2='3.84', ts='0.06', fit_tolerance='1e-08', GAL='0.68', photon_index_error='0.00', photon_flux_upper_limit='2.03e-07', energy_flux_error2='2.20e-05', EG='1.70', time_epoch_completed='1630823531.73', return_code='0', job_id='310552', GAL2='0.74', EG2='1.58', return_code2='0', photon_flux_error2='1.45e-07', ts2='1.00', photon_index='2.58' WHERE bin_id='1157' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:32:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0237>
Subject: Job 310552: <4FGL_J1204.8+0407_daily_bin1157> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1157> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:16:18 2021
Job was executed on host(s) <bullet0237>, 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:12 2021
Results reported at Sat Sep  4 23:32:12 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1157 181.203 4.12 539222401 539481601 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 :                                   793.38 sec.
    Max Memory :                                 1045 MB
    Average Memory :                             300.29 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   951 sec.
    Turnaround time :                            954 sec.

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

