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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1007
RA = 181.203, Dec = 4.12
tmin = 500342401, tmax = 500601601
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='310229', job_status='RUN', time_executed='2021-09-04 23:16:29.980246', time_epoch_executed='1630822589.98' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1007'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310229

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310229/ft1_4FGL_J1204.8+0407_daily_bin1007.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310229/ft1_4FGL_J1204.8+0407_daily_bin1007.fits outfile=/scratch/kocevski/310229/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1007.fits ra=181.203 dec=4.12 rad=12.0 tmin=500342401.0 tmax=500601601.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 4.80
user 4.44
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.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/310229/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1007.fits evtable="EVENTS" outfile="/scratch/kocevski/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.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.66
user 0.33
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits" evtable="EVENTS" scfile=/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits sctable="SC_DATA" outfile=/scratch/kocevski/310229/ltcube_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.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/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits
.....................!
real 12.82
user 12.24
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits evtable="EVENTS" scfile=/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits sctable="SC_DATA" expcube=/scratch/kocevski/310229/ltcube_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits outfile=/scratch/kocevski/310229/expmap_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.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/310229/ltcube_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits
.....................!
real 193.24
user 186.95
sys 5.11

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/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits scfile=/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits outfile=/scratch/kocevski/310229/cmap_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=181.203 yref=4.12 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits scfile=/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits outfile=/scratch/kocevski/310229/cmap_HighResolution_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=181.203 yref=4.12 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.38
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits', '/scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits', expMap='/scratch/kocevski/310229/expmap_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits', expCube='/scratch/kocevski/310229/ltcube_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/310229/Model_4FGL_J1204.8+0407_daily_bin1007.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/310229/ft1_filtered_4FGL_J1204.8+0407_daily_bin1007.fits
Spacecraft file(s): /scratch/kocevski/310229/ft2_4FGL_J1204.8+0407_daily_bin1007.fits
Exposure map: /scratch/kocevski/310229/expmap_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits
Exposure cube: /scratch/kocevski/310229/ltcube_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/310229/Model_4FGL_J1204.8+0407_daily_bin1007.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 6026.36166738

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .29549       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.7406       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10065E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    4.3155       1.0000         .10000E-03   10000.    
     8 'Prefactor '    46.141       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .66931       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10300E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11074E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    1.2737       1.0000         .10000E-03   10000.    
    17 'norm      '    7.6104       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .52791E-01   1.0000         .10000E-03   10000.    
    19 'norm      '    .10092E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.7612       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.3416       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.0415       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1424       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .96123       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=   6026.216     FROM MIGRAD    STATUS=CONVERGED    771 CALLS     3236 TOTAL
                     EDM=   .24E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .29524        1.7593        .51750E-06   -.29054E-03
   2  Prefactor     .10000E-03    11.098       -.77617E-07** at limit **
   3  Prefactor     5.7184        14.936        .35871E-06   -.40146E-05
   4  Prefactor     .10000E-03    93.583        .48805E-06** at limit **
   5  Prefactor     .10000E-03    9.1683        .36730E-07** at limit **
   6  Prefactor     .10000E-03    30.459       -.33420E-06** at limit **
   7  Prefactor     4.3165        5.0704        .66420E-07   -.11159E-04
   8  Prefactor     46.140        25.042       -.24776E-08   -.92734E-05
   9  Prefactor     .73459        11.278        .89515E-06   -.11912E-03
  10  Prefactor     .10000E-03    77.501       -.12311E-05** at limit **
  11  Prefactor     .10000E-03    14.387       -.23377E-07** at limit **
  12  Prefactor     .10000E-03    26.650        .14738E-06** at limit **
  13  Prefactor     .10000E-03    41.646        .77847E-06** at limit **
  14  Prefactor     .10000E-03    9.7653       -.79186E-07** at limit **
  15  Prefactor     .10000E-03    6.1644       -.85768E-07** at limit **
  16  norm          1.2745        2.2738        .44913E-06    .65830E-04
  17  norm          7.6097        3.9697        .93487E-06    .36796E-03
  18  Prefactor     .10142E-03    39.324       -.23928E-05** at limit **
  19  norm          .10000E-03    33.852       -.24710E-06** at limit **
  20  Prefactor     .10000E-03    97.954        .85613E-06** at limit **
  21  norm          1.7612        .64500       -.50395E-07   -.30458E-05
  22  Prefactor     .10000E-03    5.6113        .21367E-07** at limit **
  23  Prefactor     .10000E-03    10.925        .10309E-06** at limit **
  24  Prefactor     .10000E-03    3.4996        .18916E-07** at limit **
  25  norm          1.3415        1.3634        .58133E-07    .40141E-04
  26  Prefactor     .10000E-03    3.6521        .31207E-07** at limit **
  27  Prefactor     4.0173        95.648        .14750E-05    .58310E-05
  28  Normalizat    1.1425        .21168       -.82682E-06   -.73128E-04
  29  Prefactor     .96109        .16678       -.35492E-06   -.10093E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.295239
  Prefactor  = 0.0001
  Prefactor  = 5.71839
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.31655
  Prefactor  = 46.1404
  Prefactor  = 0.734589
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.27447
  norm       = 7.60966
  Prefactor  = 0.000101419
  norm       = 0.0001
  Prefactor  = 0.000100002
  norm       = 1.76119
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.34149
  Prefactor  = 0.0001
  Prefactor  = 4.01729
  Normalizat = 1.14245
  Prefactor  = 0.961086
 **********
 **   18 **HESSE 
 **********

 FCN=   6026.216     FROM HESSE     STATUS=OK           561 CALLS     3797 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .29524        3.3057        .18732E-02   -1.5599    
   2  Prefactor     .10000E-03    11.124        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.7184        14.926        .16764E-03   -1.5230    
   4  Prefactor     .10000E-03    93.783        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.2209        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    30.551        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     4.3165        5.0673        .18387E-03   -1.5292    
   8  Prefactor     46.140        25.160        .59027E-04   -1.4348    
   9  Prefactor     .73459        57.507        .47546E-02   -1.5537    
  10  Prefactor     .10000E-03    77.700        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    14.394        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    26.707        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    42.730        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    9.7719        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    6.1826        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.2745        2.2426        .14993E-03   -1.5482    
  17  norm          7.6097        3.9935        .51890E-03   -1.5156    
  18  Prefactor     .10142E-03    35.627        .13372       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    34.026        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    98.063        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.7612        .64079        .34714E-04   -1.5443    
  22  Prefactor     .10000E-03    5.6563        .17959E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    10.930        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    3.5098        .14182E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.3415        1.3414        .87284E-04   -1.5476    
  26  Prefactor     .10000E-03    3.6618        .14488E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     4.0173        95.232        .20058E-03   -1.5307    
  28  Normalizat    1.1425        .25027        .27125E-03   -.88400    
  29  Prefactor     .96109        .19754        .24407E-03   -.94038    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.70852e-08
Minuit parameter uncertainties:
  1  1.97562
  2  2.33378e-05
  3  14.9357
  4  0.00041337
  5  1.2513e-05
  6  0.000152029
  7  5.0678
  8  25.1663
  9  13.0111
  10  0.00102932
  11  3.27491e-06
  12  6.67257e-05
  13  0.000202374
  14  1.59726e-05
  15  1.43939e-05
  16  2.24279
  17  3.99364
  18  0.0142286
  19  7.55823e-05
  20  0.000883492
  21  0.640796
  22  3.53259e-06
  23  3.29141e-05
  24  5.94175e-07
  25  1.34146
  26  1.16168e-06
  27  39.1889
  28  0.250527
  29  0.197691
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  6.673e-05  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:  9.611e-01  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.142e+00  2.505e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 8.87e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.94e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310229/likelihoodResults_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.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) = 6026.21599906
delta logL = -0.000178366608452

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6026.06910727
delta logL = 0.146713419842

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.4551       1.0000         .10000E-03   10000.    
     2 'Index     '    1.1342       1.0000          .0000       10.000    
     3 'Normalizat'    1.1418       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95874       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=   6026.069     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      267 TOTAL
                     EDM=   .49E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 22.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.4513        16.142       -.90864E-05   -.52230E-03
   2  Index         1.1337        .95606       -.45139E-04    .10645E-03
   3  Normalizat    1.1419        .19729        .17010E-06    .11466E-03
   4  Prefactor     .95867        .16524        .14491E-06    .12418E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.45135
  Index      = 1.13366
  Normalizat = 1.14192
  Prefactor  = 0.958673
 **********
 **   18 **HESSE 
 **********

 FCN=   6026.069     FROM HESSE     STATUS=OK            33 CALLS      300 TOTAL
                     EDM=   .82E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.4513        14.978        .17204E-03   -1.5241    
   2  Index         1.1337        .88284        .12759E-01   -.88398    
   3  Normalizat    1.1419        .23229        .27126E-03   -.88417    
   4  Prefactor     .95867        .19466        .24429E-03   -.94120    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.15793e-10
Minuit parameter uncertainties:
  1  14.9884
  2  0.894667
  3  0.2325
  4  0.194804
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310229': 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) = 6026.06910699
delta logL = 0.146713701637

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  5.451e+00  1.499e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  1.134e+00  8.947e-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:  9.587e-01  1.948e-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.142e+00  2.325e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 181.203 4.120

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/310229/cmap_HighResolution_500342401_500601601_4FGL_J1204.8+0407_daily_bin1007.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.94e-03', job_status='DONE', photon_flux_upper_limit='8.87e-08', time_completed='2021-09-04 23:29:54.474767', job_id='310229', GAL2='0.96', fit_tolerance='1e-08', EG2='1.14', EG='1.14', time_epoch_completed='1630823394.47', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='1.47e-01', ts2='0.29', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1007' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:29:54 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0207>
Subject: Job 310229: <4FGL_J1204.8+0407_daily_bin1007> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1007> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:46 2021
Job was executed on host(s) <bullet0207>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:47 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:15:47 2021
Terminated at Sat Sep  4 23:29:55 2021
Results reported at Sat Sep  4 23:29:55 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1007 181.203 4.12 500342401 500601601 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 :                                   798.18 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             330.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   847 sec.
    Turnaround time :                            849 sec.

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

