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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1357
RA = 181.203, Dec = 4.12
tmin = 591062401, tmax = 591321601
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='311902', job_status='RUN', time_executed='2021-09-04 23:21:55.426376', time_epoch_executed='1630822915.43' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1357'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/311902

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/311902/ft1_4FGL_J1204.8+0407_daily_bin1357.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/311902/ft2_4FGL_J1204.8+0407_daily_bin1357.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/311902/ft1_4FGL_J1204.8+0407_daily_bin1357.fits outfile=/scratch/kocevski/311902/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1357.fits ra=181.203 dec=4.12 rad=12.0 tmin=591062401.0 tmax=591321601.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.16
user 2.78
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/311902/ft1_filtered_4FGL_J1204.8+0407_daily_bin1357.fits evtable="EVENTS" scfile=/scratch/kocevski/311902/ft2_4FGL_J1204.8+0407_daily_bin1357.fits sctable="SC_DATA" expcube=/scratch/kocevski/311902/ltcube_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.fits outfile=/scratch/kocevski/311902/expmap_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.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/311902/ltcube_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.fits
.....................!
real 189.99
user 184.77
sys 4.82

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/311902/ft1_filtered_4FGL_J1204.8+0407_daily_bin1357.fits scfile=/scratch/kocevski/311902/ft2_4FGL_J1204.8+0407_daily_bin1357.fits outfile=/scratch/kocevski/311902/cmap_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.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.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/311902/ft1_filtered_4FGL_J1204.8+0407_daily_bin1357.fits scfile=/scratch/kocevski/311902/ft2_4FGL_J1204.8+0407_daily_bin1357.fits outfile=/scratch/kocevski/311902/cmap_HighResolution_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.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.53
user 0.37
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10122E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .54880E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    13.522       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .17042E-01   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10135E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10058E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    299.68       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    46.407       1.0000         .10000E-03   10000.    
    13 'Prefactor '    111.42       1.0000         .10000E-03   10000.    
    14 'Prefactor '    76.604       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10056E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.1631       1.0000         .10000E-03   10000.    
    18 'Prefactor '    15.585       1.0000         .10000E-03   10000.    
    19 'norm      '    .10197E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10362E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10581E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    3.5018       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10165E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    7.1733       1.0000         .10000E-03   10000.    
    25 'norm      '    11.810       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10506E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2426       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .85385       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=   2994.923     FROM MIGRAD    STATUS=CONVERGED    741 CALLS     3720 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.7427       -.25965E-07** at limit **
   2  Prefactor     .10000E-03    50.067       -.35639E-06** at limit **
   3  Prefactor     .10000E-03    51.333       -.26513E-06** at limit **
   4  Prefactor     .10000E-03    368.31        .10382E-05** at limit **
   5  Prefactor     13.515        13.430        .13240E-06    .11474E-04
   6  Prefactor     .10023E-03    6468.9       -.37233E-04** at limit **
   7  Prefactor     .10000E-03    14.559       -.87580E-07** at limit **
   8  Prefactor     .10000E-03    13.610        .19790E-06** at limit **
   9  Prefactor     299.05        280.43       -.48747E-05   -.76514E-04
  10  Prefactor     .10000E-03    47.271        .30514E-06** at limit **
  11  Prefactor     .10001E-03    635.38        .15919E-05** at limit **
  12  Prefactor     46.382        59.073       -.71307E-06    .27392E-04
  13  Prefactor     111.43        116.58       -.41293E-07    .42309E-04
  14  Prefactor     76.627        71.905       -.68161E-05    .76909E-04
  15  Prefactor     .10000E-03    23.789       -.73132E-06** at limit **
  16  norm          .10000E-03    10.602       -.11218E-05** at limit **
  17  norm          5.1564        9.8155        .97577E-05    .19310E-04
  18  Prefactor     15.574        47.704       -.13396E-05    .16082E-04
  19  norm          .10000E-03    61.453       -.55362E-06** at limit **
  20  Prefactor     .10000E-03    198.22       -.54192E-06** at limit **
  21  norm          .10000E-03    1.0187       -.17174E-05** at limit **
  22  Prefactor     3.5138        17.110        .30439E-06    .43664E-05
  23  Prefactor     .10000E-03    54.408       -.27141E-06** at limit **
  24  Prefactor     7.1116        38.123        .13376E-05    .75716E-04
  25  norm          11.811        4.7750       -.10896E-06    .12802E-02
  26  Prefactor     .10000E-03    95.425        .54942E-06** at limit **
  27  Prefactor     .10000E-03    34.229        .96052E-08** at limit **
  28  Normalizat    1.2414        .32616       -.15528E-05    .20980E-03
  29  Prefactor     .85459        .27106        .25172E-06    .18346E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.5148
  Prefactor  = 0.000100232
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 299.054
  Prefactor  = 0.0001
  Prefactor  = 0.000100008
  Prefactor  = 46.3818
  Prefactor  = 111.428
  Prefactor  = 76.6266
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 5.15642
  Prefactor  = 15.5741
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 3.51384
  Prefactor  = 0.0001
  Prefactor  = 7.11162
  norm       = 11.8108
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.24139
  Prefactor  = 0.854589
 **********
 **   18 **HESSE 
 **********

 FCN=   2994.923     FROM HESSE     STATUS=OK           535 CALLS     4255 TOTAL
                     EDM=   .80E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.7455        .70550E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    50.072        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    51.353        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    369.26        .21111E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     13.515        13.456        .10893E-03   -1.4973    
   6  Prefactor     .10023E-03    6475.3        .18216E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    14.592        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    13.646        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     299.05        281.18        .11730E-03   -1.2232    
  10  Prefactor     .10000E-03    47.283        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10001E-03    635.67        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     46.382        59.083        .58858E-04   -1.4345    
  13  Prefactor     111.43        116.31        .38108E-04   -1.3593    
  14  Prefactor     76.627        71.815        .45879E-04   -1.3955    
  15  Prefactor     .10000E-03    23.805        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    10.733        .17348E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.1564        9.9371        .88462E-03   -1.5254    
  18  Prefactor     15.574        47.723        .10145E-03   -1.4918    
  19  norm          .10000E-03    61.490        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    198.27        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    3.9659        .10106E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     3.5138        17.004        .21605E-03   -1.5333    
  23  Prefactor     .10000E-03    54.621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     7.1116        38.161        .14977E-03   -1.5175    
  25  norm          11.811        4.7140        .69874E-04   -1.5020    
  26  Prefactor     .10000E-03    96.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    34.232        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2414        .39213        .28765E-03   -.85333    
  29  Prefactor     .85459        .32492        .27852E-03   -.97746    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.95508e-10
Minuit parameter uncertainties:
  1  1.71488e-06
  2  1.80496e-05
  3  8.58418e-05
  4  0.000782914
  5  13.4586
  6  0.0553162
  7  2.52673e-06
  8  5.21466e-06
  9  282.475
  10  0.000133539
  11  0.00456161
  12  59.1582
  13  116.546
  14  71.8968
  15  1.36834e-05
  16  5.39538e-05
  17  9.94025
  18  47.8406
  19  0.000142311
  20  0.000601756
  21  1.37353e-05
  22  15.4665
  23  0.000106767
  24  32.9803
  25  4.7141
  26  0.000236869
  27  1.20316e-05
  28  0.393071
  29  0.325658
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  4.638e+01  5.916e+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.546e-01  3.257e-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.241e+00  3.931e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.26
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 5.27e-08 +/- 6.71e-08
Energy Flux (Fixed Index): 1.41e-05 +/- 1.80e-05

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

Saving results to:
/scratch/kocevski/311902/likelihoodResults_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.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) = 2993.89760601
delta logL = 1.0254463679

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2993.87879004
delta logL = 1.04426233015

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    36.469       1.0000         .10000E-03   10000.    
     2 'Index     '    1.3629       1.0000          .0000       10.000    
     3 'Normalizat'    1.2732       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83635       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=   2993.879     FROM MIGRAD    STATUS=CONVERGED     61 CALLS      216 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     36.291        40.108        .16591E-02   -.90862E-04
   2  Index         1.3627        .48220        .18033        .15603E-04
   3  Normalizat    1.2729        .31171        .64320E-01    .17092E-03
   4  Prefactor     .83648        .25687        .63556E-01    .17364E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 36.2909
  Index      = 1.36275
  Normalizat = 1.27293
  Prefactor  = 0.836477
 **********
 **   18 **HESSE 
 **********

 FCN=   2993.879     FROM HESSE     STATUS=OK            27 CALLS      243 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     36.291        51.745        .66364E-04   -1.4502    
   2  Index         1.3627        .67770        .73153E-02   -.81460    
   3  Normalizat    1.2729        .38008        .28451E-03   -.84378    
   4  Prefactor     .83648        .31309        .28112E-03   -.98397    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.31267e-10
Minuit parameter uncertainties:
  1  51.8087
  2  0.682191
  3  0.380913
  4  0.313761
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/311902': 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) = 2993.87878026
delta logL = 1.04427211309

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  3.629e+01  5.181e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  1.363e+00  6.822e-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:  8.365e-01  3.138e-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.273e+00  3.809e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.35
Ra Dec: 181.203 4.120
Photon Index (Free Index): 1.36 +/- 0.68
Photon Flux (Free Index): 1.43e-08 +/- 1.95e-08
Energy Flux (Free Index): 7.13e-05 +/- 1.25e-04

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/311902/cmap_HighResolution_591062401_591321601_4FGL_J1204.8+0407_daily_bin1357.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.00e-02', comment='SUCCESS', photon_flux='5.27e-08', energy_flux2='7.13e-05', photon_flux_error='6.71e-08', dlogl='1.04e+00', energy_flux='1.41e-05', photon_flux2='1.43e-08', job_status='DONE', time_completed='2021-09-04 23:31:15.114872', photon_index_error2='0.68', photon_index2='1.36', ts='1.26', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='2.56e-07', energy_flux_error2='1.25e-04', EG='1.24', time_epoch_completed='1630823475.11', return_code='0', job_id='311902', GAL2='0.84', EG2='1.27', return_code2='0', energy_flux_error='1.80e-05', photon_flux_error2='1.95e-08', ts2='3.35', photon_index='2.58' WHERE bin_id='1357' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:31:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0287>
Subject: Job 311902: <4FGL_J1204.8+0407_daily_bin1357> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1357 181.203 4.12 591062401 591321601 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 :                                   546.26 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             268.19 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   639 sec.
    Turnaround time :                            641 sec.

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

