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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1397
RA = 181.203, Dec = 4.12
tmin = 601430401, tmax = 601689601
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='311960', job_status='RUN', time_executed='2021-09-04 23:21:34.418562', time_epoch_executed='1630822894.42' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1397'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/311960

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/311960/ft1_4FGL_J1204.8+0407_daily_bin1397.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/311960/ft1_4FGL_J1204.8+0407_daily_bin1397.fits outfile=/scratch/kocevski/311960/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1397.fits ra=181.203 dec=4.12 rad=12.0 tmin=601430401.0 tmax=601689601.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.37
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/311960/ft1_filtered_4FGL_J1204.8+0407_daily_bin1397.fits" evtable="EVENTS" scfile=/scratch/kocevski/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits sctable="SC_DATA" outfile=/scratch/kocevski/311960/ltcube_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.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/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits
.....................!
real 12.00
user 11.60
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/311960/ft1_filtered_4FGL_J1204.8+0407_daily_bin1397.fits evtable="EVENTS" scfile=/scratch/kocevski/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits sctable="SC_DATA" expcube=/scratch/kocevski/311960/ltcube_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.fits outfile=/scratch/kocevski/311960/expmap_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.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/311960/ltcube_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.fits
.....................!
real 191.30
user 185.85
sys 4.87

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/311960/ft1_filtered_4FGL_J1204.8+0407_daily_bin1397.fits scfile=/scratch/kocevski/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits outfile=/scratch/kocevski/311960/cmap_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/311960/ft1_filtered_4FGL_J1204.8+0407_daily_bin1397.fits scfile=/scratch/kocevski/311960/ft2_4FGL_J1204.8+0407_daily_bin1397.fits outfile=/scratch/kocevski/311960/cmap_HighResolution_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.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.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    13.048       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10154E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10132E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .63972       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .64890E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.849       1.0000         .10000E-03   10000.    
    12 'Prefactor '    27.068       1.0000         .10000E-03   10000.    
    13 'Prefactor '    24.067       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    27.119       1.0000         .10000E-03   10000.    
    16 'norm      '    .10050E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.6863       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .21705E-01   1.0000         .10000E-03   10000.    
    21 'norm      '    1.8285       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .90885E-01   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1769       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0732       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=   7228.669     FROM MIGRAD    STATUS=CONVERGED    786 CALLS     3750 TOTAL
                     EDM=   .43E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .71569        .76711E-07** at limit **
   2  Prefactor     .10000E-03    11.205       -.37466E-06** at limit **
   3  Prefactor     13.039        18.060       -.13283E-04    .71144E-05
   4  Prefactor     .10000E-03    37.764       -.29057E-05** at limit **
   5  Prefactor     .10000E-03    10.607        .20725E-06** at limit **
   6  Prefactor     .10000E-03    30.793        .77999E-05** at limit **
   7  Prefactor     .64242        .56839        .41629E-07   -.72642E-03
   8  Prefactor     .10000E-03    3.6636       -.19630E-06** at limit **
   9  Prefactor     .10000E-03    8.8647       -.90498E-06** at limit **
  10  Prefactor     .10000E-03    23.678       -.24075E-05** at limit **
  11  Prefactor     15.781        39.739        .81796E-05    .19126E-04
  12  Prefactor     27.071        34.455        .49113E-05    .16371E-04
  13  Prefactor     24.062        18.811       -.38879E-05    .38695E-04
  14  Prefactor     .10000E-03    7.8153        .30414E-07** at limit **
  15  Prefactor     27.115        15.362        .13423E-05    .66201E-04
  16  norm          .10000E-03    .86920       -.11077E-07** at limit **
  17  norm          5.6887        4.1760       -.15982E-06    .24418E-03
  18  Prefactor     .10000E-03    10.252        .80393E-07** at limit **
  19  norm          .10000E-03    34.223       -.11309E-04** at limit **
  20  Prefactor     .10000E-03    1177.3       -.27663E-04** at limit **
  21  norm          1.8285        .73928       -.14561E-07    .65845E-03
  22  Prefactor     .10000E-03    6.2011        .90809E-07** at limit **
  23  Prefactor     .10000E-03    41.887        .77492E-05** at limit **
  24  Prefactor     .10000E-03    5.5191        .11966E-06** at limit **
  25  norm          .90496E-01    .67198       -.60655E-07    .15759E-03
  26  Prefactor     .10000E-03    5.2184        .53685E-07** at limit **
  27  Prefactor     .10000E-03    20.998        .89754E-06** at limit **
  28  Normalizat    1.1767        .20143        .79548E-06    .68510E-04
  29  Prefactor     1.0732        .16171       -.37261E-06    .14887E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.0391
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.642423
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 15.7809
  Prefactor  = 27.071
  Prefactor  = 24.0623
  Prefactor  = 0.0001
  Prefactor  = 27.1145
  norm       = 0.0001
  norm       = 5.68872
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  norm       = 1.82853
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0904955
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.17669
  Prefactor  = 1.07316
 **********
 **   18 **HESSE 
 **********

 FCN=   7228.669     FROM HESSE     STATUS=OK           551 CALLS     4301 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.2113        .13954E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    11.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     13.039        18.086        .11089E-03   -1.4986    
   4  Prefactor     .10000E-03    37.777        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    10.798        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    30.736        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .64242        9.4678        .23657E-02   -1.5548    
   8  Prefactor     .10000E-03    3.6658        .15893E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    49.037        .47154E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    23.689        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     15.781        38.917        .10061E-03   -1.4913    
  12  Prefactor     27.071        34.701        .77001E-04   -1.4667    
  13  Prefactor     24.062        18.785        .81652E-04   -1.4727    
  14  Prefactor     .10000E-03    7.8170        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     27.115        15.318        .76928E-04   -1.4666    
  16  norm          .10000E-03    .87082        .77239E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.6887        4.1703        .13001E-03   -1.5231    
  18  Prefactor     .10000E-03    10.255        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    34.268        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    1194.1        .18262E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.8285        .73166        .39427E-04   -1.5438    
  22  Prefactor     .10000E-03    6.2304        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    42.297        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    5.5451        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .90496E-01    4.7490        .13121E-02   -1.5648    
  26  Prefactor     .10000E-03    5.2579        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    21.022        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1767        .24236        .28473E-03   -.87326    
  29  Prefactor     1.0732        .19618        .24705E-03   -.90329    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.89678e-09
Minuit parameter uncertainties:
  1  4.97625e-06
  2  5.38296e-06
  3  18.0933
  4  1.8921e-05
  5  1.28167e-05
  6  0.000127101
  7  4.93304
  8  8.61388e-07
  9  0.000435505
  10  3.63727e-06
  11  38.9796
  12  34.7272
  13  18.7894
  14  3.52371e-06
  15  15.3199
  16  2.81315e-06
  17  4.17047
  18  7.7213e-07
  19  2.0581e-05
  20  0.00163767
  21  0.731663
  22  6.37092e-06
  23  7.28929e-05
  24  5.42918e-06
  25  1.31051
  26  2.50439e-06
  27  2.92829e-06
  28  0.242588
  29  0.196309
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  2.707e+01  3.473e+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:  1.073e+00  1.963e-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.177e+00  2.426e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/311960/likelihoodResults_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.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) = 7228.63284411
delta logL = 0.0366146934894

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7228.61188587
delta logL = 0.0575729311386

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    19.459       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0190       1.0000          .0000       10.000    
     3 'Normalizat'    1.1602       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0832       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=   7228.612     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      266 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     19.432        44.528        .90795E-04   -.25042E-06
   2  Index         3.0199        1.6804        .96088E-02    .31814E-03
   3  Normalizat    1.1602        .24202        .28645E-03    .13042E-03
   4  Prefactor     1.0833        .19818        .24604E-03   -.15969E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 19.4316
  Index      = 3.01994
  Normalizat = 1.16021
  Prefactor  = 1.08326
 **********
 **   18 **HESSE 
 **********

 FCN=   7228.612     FROM HESSE     STATUS=OK            25 CALLS      291 TOTAL
                     EDM=   .37E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     19.432        37.408        .36318E-05   -1.4826    
   2  Index         3.0199        1.4187        .19218E-02   -.40717    
   3  Normalizat    1.1602        .24118        .11458E-04   -.87842    
   4  Prefactor     1.0833        .19757        .98417E-05   -.90003    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.66359e-10
Minuit parameter uncertainties:
  1  37.4533
  2  1.44232
  3  0.241412
  4  0.197704
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/311960': 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) = 7228.6118855
delta logL = 0.0575733026362

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.943e+01  3.745e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  3.020e+00  1.442e+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:  1.083e+00  1.977e-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.160e+00  2.414e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.02
Ra Dec: 181.203 4.120
Photon Index (Free Index): 3.02 +/- 1.44
Photon Flux (Free Index): 4.20e-08 +/- 5.59e-08
Energy Flux (Free Index): 8.30e-06 +/- 9.66e-06

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/311960/cmap_HighResolution_601430401_601689601_4FGL_J1204.8+0407_daily_bin1397.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.64e-03', comment='SUCCESS', energy_flux2='8.30e-06', dlogl='5.76e-02', photon_flux2='4.20e-08', job_status='DONE', time_completed='2021-09-04 23:37:18.182403', photon_index_error2='1.44', photon_index2='3.02', ts='0.89', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', photon_flux_upper_limit='1.23e-07', energy_flux_error2='9.66e-06', EG='1.18', time_epoch_completed='1630823838.18', return_code='0', job_id='311960', GAL2='1.08', EG2='1.16', return_code2='0', photon_flux_error2='5.59e-08', ts2='1.02', photon_index='2.58' WHERE bin_id='1397' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:37:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0217>
Subject: Job 311960: <4FGL_J1204.8+0407_daily_bin1397> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1397> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep  4 23:20:39 2021
Job was executed on host(s) <bullet0217>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:20:41 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:41 2021
Terminated at Sat Sep  4 23:37:18 2021
Results reported at Sat Sep  4 23:37:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1397 181.203 4.12 601430401 601689601 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 :                                   932.35 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             328.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   997 sec.
    Turnaround time :                            999 sec.

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

