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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1218
RA = 181.203, Dec = 4.12
tmin = 555033601, tmax = 555292801
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='311702', job_status='RUN', time_executed='2021-09-04 23:21:41.170886', time_epoch_executed='1630822901.17' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1218'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/311702

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/311702/ft1_4FGL_J1204.8+0407_daily_bin1218.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/311702/ft2_4FGL_J1204.8+0407_daily_bin1218.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/311702/ft1_4FGL_J1204.8+0407_daily_bin1218.fits outfile=/scratch/kocevski/311702/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1218.fits ra=181.203 dec=4.12 rad=12.0 tmin=555033601.0 tmax=555292801.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.62
user 3.35
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/311702/ft2_4FGL_J1204.8+0407_daily_bin1218.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/311702/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1218.fits evtable="EVENTS" outfile="/scratch/kocevski/311702/ft1_filtered_4FGL_J1204.8+0407_daily_bin1218.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.49
user 0.34
sys 0.14

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/311702/ft1_filtered_4FGL_J1204.8+0407_daily_bin1218.fits evtable="EVENTS" scfile=/scratch/kocevski/311702/ft2_4FGL_J1204.8+0407_daily_bin1218.fits sctable="SC_DATA" expcube=/scratch/kocevski/311702/ltcube_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.fits outfile=/scratch/kocevski/311702/expmap_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.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/311702/ltcube_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.fits
.....................!
real 191.37
user 185.51
sys 5.09

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/311702/ft1_filtered_4FGL_J1204.8+0407_daily_bin1218.fits scfile=/scratch/kocevski/311702/ft2_4FGL_J1204.8+0407_daily_bin1218.fits outfile=/scratch/kocevski/311702/cmap_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/311702/ft1_filtered_4FGL_J1204.8+0407_daily_bin1218.fits scfile=/scratch/kocevski/311702/ft2_4FGL_J1204.8+0407_daily_bin1218.fits outfile=/scratch/kocevski/311702/cmap_HighResolution_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.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.57
user 0.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10793E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10126E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10055E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .20135E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    17.173       1.0000         .10000E-03   10000.    
     8 'Prefactor '    72.549       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10656E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .64647E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10116E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    119.12       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    107.67       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .21920E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    7.6944       1.0000         .10000E-03   10000.    
    17 'norm      '    .10186E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    16.486       1.0000         .10000E-03   10000.    
    19 'norm      '    13.517       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10133E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    11.463       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10095E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    4.8091       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10006E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.2687       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=   1399.743     FROM MIGRAD    STATUS=CONVERGED    720 CALLS     4277 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.7047        .93409E-08** at limit **
   2  Prefactor     .10002E-03    611.99        .24227E-05** at limit **
   3  Prefactor     .10000E-03    106.71        .46394E-06** at limit **
   4  Prefactor     .10000E-03    152.82       -.31805E-06** at limit **
   5  Prefactor     .10000E-03    20.595       -.46322E-07** at limit **
   6  Prefactor     .10014E-03    6717.7        .69494E-05** at limit **
   7  Prefactor     17.155        39.686        .25160E-07   -.31252E-04
   8  Prefactor     72.545        36.011       -.10745E-05   -.78420E-03
   9  Prefactor     .10000E-03    235.83       -.56296E-06** at limit **
  10  Prefactor     .10001E-03    6827.2       -.37804E-05** at limit **
  11  Prefactor     .10009E-03    1620.4        .55777E-05** at limit **
  12  Prefactor     119.18        135.70        .12170E-07   -.49413E-04
  13  Prefactor     .10000E-03    132.55        .90390E-07** at limit **
  14  Prefactor     107.62        88.935        .17141E-05   -.39773E-04
  15  Prefactor     .10000E-03    257.49        .13168E-05** at limit **
  16  norm          7.6883        11.944        .59224E-06    .55097E-03
  17  norm          .10009E-03    41.684        .64825E-05** at limit **
  18  Prefactor     16.490        39.531        .56147E-08   -.34867E-04
  19  norm          13.576        240.76        .12023E-04   -.23445E-04
  20  Prefactor     .10000E-03    126.35        .66757E-08** at limit **
  21  norm          .10000E-03    1.2689        .44390E-06** at limit **
  22  Prefactor     11.470        17.693       -.37268E-06   -.14511E-03
  23  Prefactor     .10000E-03    38.713        .15975E-06** at limit **
  24  Prefactor     .10000E-03    24.153        .37256E-07** at limit **
  25  norm          4.8088        4.1018        .67639E-07   -.29253E-03
  26  Prefactor     .10000E-03    19.661        .91397E-09** at limit **
  27  Prefactor     .10000E-03    51.995       -.24649E-07** at limit **
  28  Normalizat    .10000E-01    .35794        .40099E-05** at limit **
  29  Prefactor     1.2689        .20847       -.27668E-05   -.37805E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100017
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100142
  Prefactor  = 17.1548
  Prefactor  = 72.5452
  Prefactor  = 0.000100001
  Prefactor  = 0.000100011
  Prefactor  = 0.000100091
  Prefactor  = 119.177
  Prefactor  = 0.0001
  Prefactor  = 107.618
  Prefactor  = 0.000100004
  norm       = 7.68832
  norm       = 0.00010009
  Prefactor  = 16.4898
  norm       = 13.5765
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 11.4705
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.80878
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.01
  Prefactor  = 1.26891
 **********
 **   18 **HESSE 
 **********

 FCN=   1399.743     FROM HESSE     STATUS=OK           541 CALLS     4818 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.7052        .79268E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10002E-03    612.33        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    106.71        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    152.82        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    20.699        .16579E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10014E-03    6718.8        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     17.155        39.663        .96648E-04   -1.4879    
   8  Prefactor     72.545        36.476        .47134E-04   -1.4002    
   9  Prefactor     .10000E-03    235.85        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10001E-03    6842.4        .42048E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10009E-03    1622.0        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     119.18        135.58        .18435E-03   -1.3520    
  13  Prefactor     .10000E-03    132.67        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     107.62        88.617        .19380E-03   -1.3629    
  15  Prefactor     .10000E-03    259.69        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          7.6883        12.049        .14457E-03   -1.5153    
  17  norm          .10009E-03    51.035        .22654E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     16.490        39.553        .98642E-04   -1.4896    
  19  norm          13.576        241.04        .10895E-03   -1.4971    
  20  Prefactor     .10000E-03    126.35        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    1.9794        .77748E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     11.470        17.799        .11832E-03   -1.5030    
  23  Prefactor     .10000E-03    38.754        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    24.179        .17966E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          4.8088        4.1052        .64781E-04   -1.5269    
  26  Prefactor     .10000E-03    19.662        .16209E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    52.020        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .10000E-01    .68788        .11995E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     1.2689        .21763        .19207E-03   -.84236    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.84929e-09
Minuit parameter uncertainties:
  1  2.34918e-06
  2  0.00656458
  3  0.000451967
  4  0.000385709
  5  3.25871e-05
  6  0.0471466
  7  39.7245
  8  36.4875
  9  0.000945878
  10  0.0136109
  11  0.0250075
  12  135.939
  13  0.000234938
  14  88.7266
  15  0.00203344
  16  12.0524
  17  0.00429057
  18  39.6159
  19  114.955
  20  6.57558e-05
  21  2.01079e-07
  22  17.807
  23  9.1943e-05
  24  1.08905e-05
  25  4.10547
  26  5.15446e-06
  27  4.86032e-05
  28  1.96519e-05
  29  0.217787
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.192e+02  1.359e+02  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.269e+00  2.178e-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.000e-02  1.965e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.37
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 1.35e-07 +/- 1.54e-07
Energy Flux (Fixed Index): 3.62e-05 +/- 4.13e-05

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

Saving results to:
/scratch/kocevski/311702/likelihoodResults_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.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) = 1399.74176462
delta logL = 0.0011485302341

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 1399.74049369
delta logL = 0.00241946057236

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    110.19       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6666       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2691       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=   1399.740     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      260 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     110.23        190.07        .19159E-03   -.24159E-03
   2  Index         2.6661        1.3728        .58837E-02   -.16899E-03
   3  Normalizat    .10000E-01    .65903        .11920E-01** at limit **
   4  Prefactor     1.2690        .17916        .19205E-03    .33970E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 110.234
  Index      = 2.66606
  Normalizat = 0.01
  Prefactor  = 1.26903
 **********
 **   18 **HESSE 
 **********

 FCN=   1399.740     FROM HESSE     STATUS=OK            23 CALLS      283 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     110.23        177.64        .38317E-04   -1.3604    
   2  Index         2.6661        1.2848        .23535E-03   -.48565    
   3  Normalizat    .10000E-01    .65989        .23839E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.2690        .17875        .38411E-04   -.84233    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.63499e-09
Minuit parameter uncertainties:
  1  178.506
  2  1.30357
  3  7.65768e-06
  4  0.178831
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/311702': 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) = 1399.74049345
delta logL = 0.00241970454954

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.102e+02  1.785e+02  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.666e+00  1.304e+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.269e+00  1.788e-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.000e-02  7.658e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.40
Ra Dec: 181.203 4.120
Photon Index (Free Index): 2.67 +/- 1.30
Photon Flux (Free Index): 1.42e-07 +/- 1.71e-07
Energy Flux (Free Index): 3.50e-05 +/- 4.03e-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/311702/cmap_HighResolution_555033601_555292801_4FGL_J1204.8+0407_daily_bin1218.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.74e-02', comment='SUCCESS', photon_flux='1.35e-07', energy_flux2='3.50e-05', photon_flux_error='1.54e-07', dlogl='2.42e-03', energy_flux='3.62e-05', photon_flux2='1.42e-07', job_status='DONE', time_completed='2021-09-04 23:29:03.194545', photon_index_error2='1.30', photon_index2='2.67', ts='1.37', fit_tolerance='1e-08', GAL='1.27', photon_index_error='0.00', photon_flux_upper_limit='4.79e-07', energy_flux_error2='4.03e-05', EG='0.01', time_epoch_completed='1630823343.19', return_code='0', job_id='311702', GAL2='1.27', EG2='0.01', return_code2='0', energy_flux_error='4.13e-05', photon_flux_error2='1.71e-07', ts2='1.40', photon_index='2.58' WHERE bin_id='1218' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:29:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0042>
Subject: Job 311702: <4FGL_J1204.8+0407_daily_bin1218> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1218 181.203 4.12 555033601 555292801 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 :                                   439.01 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             295.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   521 sec.
    Turnaround time :                            523 sec.

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

