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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1084
RA = 181.203, Dec = 4.12
tmin = 520300801, tmax = 520560001
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='310351', job_status='RUN', time_executed='2021-09-04 23:16:51.155339', time_epoch_executed='1630822611.16' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1084'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310351

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310351/ft1_4FGL_J1204.8+0407_daily_bin1084.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310351/ft2_4FGL_J1204.8+0407_daily_bin1084.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310351/ft1_4FGL_J1204.8+0407_daily_bin1084.fits outfile=/scratch/kocevski/310351/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1084.fits ra=181.203 dec=4.12 rad=12.0 tmin=520300801.0 tmax=520560001.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 6.08
user 5.80
sys 0.26

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310351/ft1_filtered_4FGL_J1204.8+0407_daily_bin1084.fits evtable="EVENTS" scfile=/scratch/kocevski/310351/ft2_4FGL_J1204.8+0407_daily_bin1084.fits sctable="SC_DATA" expcube=/scratch/kocevski/310351/ltcube_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.fits outfile=/scratch/kocevski/310351/expmap_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.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/310351/ltcube_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.fits
.....................!
real 191.33
user 185.70
sys 4.98

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/310351/ft1_filtered_4FGL_J1204.8+0407_daily_bin1084.fits scfile=/scratch/kocevski/310351/ft2_4FGL_J1204.8+0407_daily_bin1084.fits outfile=/scratch/kocevski/310351/cmap_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.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.52
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310351/ft1_filtered_4FGL_J1204.8+0407_daily_bin1084.fits scfile=/scratch/kocevski/310351/ft2_4FGL_J1204.8+0407_daily_bin1084.fits outfile=/scratch/kocevski/310351/cmap_HighResolution_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.4725       1.0000         .10000E-03   10000.    
     2 'Prefactor '    19.982       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10683E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    9.0910       1.0000         .10000E-03   10000.    
    10 'Prefactor '    41.135       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    57.312       1.0000         .10000E-03   10000.    
    13 'Prefactor '    56.210       1.0000         .10000E-03   10000.    
    14 'Prefactor '    24.690       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .58271       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    4.3651       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    16.590       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.0661       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2338       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .99787       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=   4039.564     FROM MIGRAD    STATUS=CONVERGED    736 CALLS     3705 TOTAL
                     EDM=   .70E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.4726        2.8765       -.22466E-07   -.35986E-04
   2  Prefactor     19.983        27.137       -.10594E-05    .16195E-04
   3  Prefactor     .10000E-03    19.952        .76540E-05** at limit **
   4  Prefactor     .10000E-03    704.06       -.67329E-05** at limit **
   5  Prefactor     .10000E-03    7.8347       -.14408E-06** at limit **
   6  Prefactor     .10000E-03    24.552        .49018E-05** at limit **
   7  Prefactor     .10000E-03    12.936       -.15623E-05** at limit **
   8  Prefactor     .10000E-03    7.8201        .14921E-06** at limit **
   9  Prefactor     9.0914        15.825        .32794E-06   -.30829E-04
  10  Prefactor     41.130        63.654       -.78799E-06    .62073E-05
  11  Prefactor     .10000E-03    21.491       -.63576E-05** at limit **
  12  Prefactor     57.302        54.445        .17389E-05   -.12658E-04
  13  Prefactor     56.212        34.171       -.15260E-05    .68329E-04
  14  Prefactor     24.691        25.125       -.72133E-06    .27111E-04
  15  Prefactor     .10000E-03    11.636        .14252E-05** at limit **
  16  norm          .58267        2.4502       -.86050E-06   -.89795E-03
  17  norm          .10000E-03    1.7521        .35863E-08** at limit **
  18  Prefactor     .10000E-03    10.426       -.31121E-05** at limit **
  19  norm          .10000E-03    21.138       -.50753E-05** at limit **
  20  Prefactor     .10000E-03    81.232        .57491E-06** at limit **
  21  norm          4.3651        1.1293        .24669E-07    .11052E-03
  22  Prefactor     .10000E-03    4.4765        .26277E-07** at limit **
  23  Prefactor     16.591        32.418       -.18609E-05    .20686E-04
  24  Prefactor     .10000E-03    10.096        .21219E-05** at limit **
  25  norm          1.0664        2.5523       -.46103E-06   -.69407E-03
  26  Prefactor     .10000E-03    11.309        .71208E-06** at limit **
  27  Prefactor     .10000E-03    39.667       -.90942E-06** at limit **
  28  Normalizat    1.2337        .27748        .26404E-06    .15800E-04
  29  Prefactor     .99794        .22849        .36358E-06    .76835E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.47256
  Prefactor  = 19.9828
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.09144
  Prefactor  = 41.1302
  Prefactor  = 0.000100001
  Prefactor  = 57.3017
  Prefactor  = 56.2119
  Prefactor  = 24.6909
  Prefactor  = 0.0001
  norm       = 0.582673
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 4.36509
  Prefactor  = 0.0001
  Prefactor  = 16.5913
  Prefactor  = 0.0001
  norm       = 1.06637
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.23374
  Prefactor  = 0.997938
 **********
 **   18 **HESSE 
 **********

 FCN=   4039.564     FROM HESSE     STATUS=OK           543 CALLS     4248 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.4726        2.8766        .83439E-04   -1.5285    
   2  Prefactor     19.983        27.144        .89601E-04   -1.4814    
   3  Prefactor     .10000E-03    19.498        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    713.20        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    7.8668        .17372E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    24.361        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    13.052        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    7.8324        .17356E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     9.0914        15.815        .13293E-03   -1.5105    
  10  Prefactor     41.130        63.693        .62500E-04   -1.4424    
  11  Prefactor     .10000E-03    21.174        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     57.302        54.472        .52991E-04   -1.4193    
  13  Prefactor     56.212        33.967        .53505E-04   -1.4207    
  14  Prefactor     24.691        25.120        .80617E-04   -1.4714    
  15  Prefactor     .10000E-03    11.695        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .58267        2.5694        .19965E-03   -1.5555    
  17  norm          .10000E-03    1.7641        .82085E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    10.349        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    20.934        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    81.242        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          4.3651        1.1272        .31492E-04   -1.5290    
  22  Prefactor     .10000E-03    4.4793        .13132E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     16.591        32.425        .98331E-04   -1.4893    
  24  Prefactor     .10000E-03    10.103        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.0664        2.5669        .14721E-03   -1.5501    
  26  Prefactor     .10000E-03    11.340        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    39.719        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2337        .33277        .28145E-03   -.85567    
  29  Prefactor     .99794        .27296        .26207E-03   -.92798    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.33836e-09
Minuit parameter uncertainties:
  1  2.8767
  2  27.1611
  3  0.000285578
  4  0.000907964
  5  1.51135e-06
  6  0.000204036
  7  2.96666e-05
  8  2.69598e-06
  9  15.8219
  10  63.7989
  11  0.000242284
  12  54.5196
  13  33.9786
  14  25.1309
  15  2.10521e-05
  16  2.44712
  17  2.81467e-07
  18  8.39125e-05
  19  0.000194407
  20  4.08462e-05
  21  1.12716
  22  2.75371e-06
  23  32.4596
  24  6.02978e-05
  25  2.56712
  26  2.40723e-05
  27  4.99082e-05
  28  0.333346
  29  0.273341
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  5.730e+01  5.452e+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:  9.979e-01  2.733e-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.234e+00  3.333e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.62
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 6.51e-08 +/- 6.19e-08
Energy Flux (Fixed Index): 1.74e-05 +/- 1.66e-05

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

Saving results to:
/scratch/kocevski/310351/likelihoodResults_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.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) = 4039.46571926
delta logL = 0.0982299132306

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4039.45986784
delta logL = 0.104081334816

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    72.963       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2551       1.0000          .0000       10.000    
     3 'Normalizat'    1.2522       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98536       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=   4039.460     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      292 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     72.969        71.328        .47001E-04   -.40660E-03
   2  Index         2.2550        .67984        .73456E-02   -.28615E-03
   3  Normalizat    1.2520        .32126        .27969E-03    .15757E-03
   4  Prefactor     .98549        .27071        .26343E-03    .19315E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 72.9687
  Index      = 2.25505
  Normalizat = 1.25204
  Prefactor  = 0.985487
 **********
 **   18 **HESSE 
 **********

 FCN=   4039.460     FROM HESSE     STATUS=OK            23 CALLS      315 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     72.969        70.628        .94003E-05   -1.3997    
   2  Index         2.2550        .67293        .29382E-03   -.58116    
   3  Normalizat    1.2520        .32152        .55938E-04   -.85010    
   4  Prefactor     .98549        .27090        .52685E-04   -.93215    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.75792e-09
Minuit parameter uncertainties:
  1  70.7097
  2  0.675875
  3  0.322036
  4  0.271271
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310351': 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) = 4039.45986772
delta logL = 0.104081456144

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  7.297e+01  7.071e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.255e+00  6.759e-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.855e-01  2.713e-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.252e+00  3.220e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.82
Ra Dec: 181.203 4.120
Photon Index (Free Index): 2.26 +/- 0.68
Photon Flux (Free Index): 5.44e-08 +/- 6.01e-08
Energy Flux (Free Index): 2.22e-05 +/- 2.42e-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/310351/cmap_HighResolution_520300801_520560001_4FGL_J1204.8+0407_daily_bin1084.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.57e-02', comment='SUCCESS', photon_flux='6.51e-08', energy_flux2='2.22e-05', photon_flux_error='6.19e-08', dlogl='1.04e-01', energy_flux='1.74e-05', photon_flux2='5.44e-08', job_status='DONE', time_completed='2021-09-04 23:28:37.574930', photon_index_error2='0.68', photon_index2='2.26', ts='1.62', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='2.01e-07', energy_flux_error2='2.42e-05', EG='1.23', time_epoch_completed='1630823317.58', return_code='0', job_id='310351', GAL2='0.99', EG2='1.25', return_code2='0', energy_flux_error='1.66e-05', photon_flux_error2='6.01e-08', ts2='1.82', photon_index='2.58' WHERE bin_id='1084' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:28:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0088>
Subject: Job 310351: <4FGL_J1204.8+0407_daily_bin1084> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1084> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:56 2021
Job was executed on host(s) <bullet0088>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:58 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:58 2021
Terminated at Sat Sep  4 23:28:38 2021
Results reported at Sat Sep  4 23:28:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1084 181.203 4.12 520300801 520560001 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 :                                   693.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             290.71 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   759 sec.
    Turnaround time :                            762 sec.

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

