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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1004
RA = 181.203, Dec = 4.12
tmin = 499564801, tmax = 499824001
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='310224', job_status='RUN', time_executed='2021-09-04 23:17:25.714239', time_epoch_executed='1630822645.71' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1004'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310224

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310224/ft1_4FGL_J1204.8+0407_daily_bin1004.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310224/ft2_4FGL_J1204.8+0407_daily_bin1004.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310224/ft1_4FGL_J1204.8+0407_daily_bin1004.fits outfile=/scratch/kocevski/310224/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1004.fits ra=181.203 dec=4.12 rad=12.0 tmin=499564801.0 tmax=499824001.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 5.06
user 4.82
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310224/ft1_filtered_4FGL_J1204.8+0407_daily_bin1004.fits evtable="EVENTS" scfile=/scratch/kocevski/310224/ft2_4FGL_J1204.8+0407_daily_bin1004.fits sctable="SC_DATA" expcube=/scratch/kocevski/310224/ltcube_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.fits outfile=/scratch/kocevski/310224/expmap_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.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/310224/ltcube_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.fits
.....................!
real 190.55
user 184.95
sys 5.17

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/310224/ft1_filtered_4FGL_J1204.8+0407_daily_bin1004.fits scfile=/scratch/kocevski/310224/ft2_4FGL_J1204.8+0407_daily_bin1004.fits outfile=/scratch/kocevski/310224/cmap_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.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.55
user 0.35
sys 0.17

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.9329       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10229E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    19.009       1.0000         .10000E-03   10000.    
     7 'Prefactor '    4.2477       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    37.069       1.0000         .10000E-03   10000.    
    12 'Prefactor '    49.080       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    4.6846       1.0000         .10000E-03   10000.    
    16 'norm      '    3.5127       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    4.4952       1.0000         .10000E-03   10000.    
    20 'Prefactor '    68.366       1.0000         .10000E-03   10000.    
    21 'norm      '    .96375       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10389E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    14.604       1.0000         .10000E-03   10000.    
    24 'Prefactor '    4.5958       1.0000         .10000E-03   10000.    
    25 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1039       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .82421       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=   5310.176     FROM MIGRAD    STATUS=CONVERGED    731 CALLS     3722 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.9334        2.9059        .26271E-07   -.87712E-04
   2  Prefactor     .10001E-03    21.564        .73186E-05** at limit **
   3  Prefactor     .10000E-03    13.183       -.12073E-05** at limit **
   4  Prefactor     .10001E-03    149.33       -.46914E-05** at limit **
   5  Prefactor     .10000E-03    5.1685        .68942E-08** at limit **
   6  Prefactor     19.009        21.090       -.93503E-08    .87035E-06
   7  Prefactor     4.2488        7.4208        .36272E-07   -.56943E-04
   8  Prefactor     .10000E-03    6.3957       -.89161E-07** at limit **
   9  Prefactor     .10000E-03    8.2190       -.79660E-06** at limit **
  10  Prefactor     .10000E-03    80.563        .30180E-05** at limit **
  11  Prefactor     37.070        30.530        .18565E-07    .40968E-05
  12  Prefactor     49.085        43.673        .10030E-05    .86555E-04
  13  Prefactor     .10000E-03    5.3689        .39270E-07** at limit **
  14  Prefactor     .10000E-03    11.054        .10738E-05** at limit **
  15  Prefactor     4.6853        11.135        .40184E-07   -.46047E-04
  16  norm          3.5127        2.6204       -.25911E-07   -.19564E-04
  17  norm          .10000E-03    1.6900       -.82576E-07** at limit **
  18  Prefactor     .10001E-03    23.026       -.72771E-05** at limit **
  19  norm          4.4931        22.364        .38175E-05   -.23571E-03
  20  Prefactor     68.358        126.64       -.28826E-05   -.28817E-04
  21  norm          .96388        .53078       -.67304E-07   -.19253E-03
  22  Prefactor     .10000E-03    7.5929        .57529E-06** at limit **
  23  Prefactor     14.597        39.687       -.17794E-05   -.67387E-04
  24  Prefactor     4.5953        6.0354        .23900E-05   -.14092E-02
  25  norm          .10000E-03    .57279        .91656E-08** at limit **
  26  Prefactor     .10000E-03    2.3967       -.31443E-07** at limit **
  27  Prefactor     .10000E-03    23.709       -.18961E-07** at limit **
  28  Normalizat    1.1037        .19564       -.18660E-06   -.56668E-05
  29  Prefactor     .82438        .15718       -.13974E-06   -.15814E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.9334
  Prefactor  = 0.000100012
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  Prefactor  = 19.0092
  Prefactor  = 4.2488
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 37.0695
  Prefactor  = 49.0852
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.68527
  norm       = 3.51274
  norm       = 0.0001
  Prefactor  = 0.000100013
  norm       = 4.49305
  Prefactor  = 68.3583
  norm       = 0.963881
  Prefactor  = 0.0001
  Prefactor  = 14.5968
  Prefactor  = 4.59533
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.10369
  Prefactor  = 0.824382
 **********
 **   18 **HESSE 
 **********

 FCN=   5310.176     FROM HESSE     STATUS=OK           547 CALLS     4269 TOTAL
                     EDM=   .39E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.9334        2.9130        .82730E-04   -1.5221    
   2  Prefactor     .10001E-03    23.077        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    13.254        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10001E-03    150.43        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    5.2130        .16178E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     19.009        21.090        .91865E-04   -1.4836    
   7  Prefactor     4.2488        7.4065        .19550E-03   -1.5296    
   8  Prefactor     .10000E-03    6.4021        .17999E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    8.2984        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    80.959        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     37.070        30.533        .65826E-04   -1.4490    
  12  Prefactor     49.085        43.971        .57240E-04   -1.4306    
  13  Prefactor     .10000E-03    5.3714        .16490E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    11.091        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     4.6853        11.071        .18593E-03   -1.5275    
  16  norm          3.5127        2.6107        .89287E-04   -1.5333    
  17  norm          .10000E-03    1.7317        .18455E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10001E-03    24.448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          4.4931        23.859        .94950E-03   -1.5284    
  20  Prefactor     68.358        126.69        .48545E-04   -1.4052    
  21  norm          .96388        .52582        .36195E-04   -1.5512    
  22  Prefactor     .10000E-03    7.6340        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     14.597        39.821        .10481E-03   -1.4944    
  24  Prefactor     4.5953        6.8983        .93879E-03   -1.5279    
  25  norm          .10000E-03    .78751        .10677E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    2.3991        .11018E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    23.784        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1037        .22763        .25075E-03   -.89633    
  29  Prefactor     .82438        .18213        .23793E-03   -.98836    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.91741e-09
Minuit parameter uncertainties:
  1  2.91311
  2  0.00107348
  3  0.000140252
  4  0.00189928
  5  4.50962e-07
  6  21.0979
  7  7.40809
  8  7.14935e-06
  9  7.22379e-05
  10  0.000855305
  11  30.5462
  12  43.9996
  13  2.3832e-06
  14  0.000112471
  15  11.0757
  16  2.61082
  17  2.69176e-06
  18  0.0011145
  19  20.7201
  20  127.198
  21  0.525825
  22  7.5527e-05
  23  39.8932
  24  6.89954
  25  1.54651e-06
  26  1.56232e-06
  27  3.96622e-06
  28  0.227829
  29  0.182259
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  4.909e+01  4.400e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  8.244e-01  1.823e-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.104e+00  2.278e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.80
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 5.58e-08 +/- 4.99e-08
Energy Flux (Fixed Index): 1.49e-05 +/- 1.34e-05

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

Saving results to:
/scratch/kocevski/310224/likelihoodResults_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.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) = 5308.50051031
delta logL = 1.67572857

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5308.16542447
delta logL = 2.01081441102

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .80253E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    9.2833       1.0000          .0000       10.000    
     3 'Normalizat'    .99576       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90212       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5308.165     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      402 TOTAL
                     EDM=   .18E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .76306E-03    .81284E-02    .29846E-03** at limit **
   2  Index         9.3106        7.6907        .17249       -.16420E-03
   3  Normalizat    .99563        .67730E-01    .46114E-01   -.75870E-04
   4  Prefactor     .90201        .56788E-01    .45032E-01   -.25431E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00076306
  Index      = 9.31058
  Normalizat = 0.995633
  Prefactor  = 0.90201
 **********
 **   18 **HESSE 
 **********

 FCN=   5308.165     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      437 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .76306E-03    .13014E-01    .11355E-04   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         9.3106        8.4275        .79070E-02    1.0394    
   3  Normalizat    .99563        .18959        .26157E-03   -.93177    
   4  Prefactor     .90201        .15607        .22890E-03   -.96071    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.19109e-10
Minuit parameter uncertainties:
  1  0.00587502
  2  3.98615
  3  0.189718
  4  0.156146
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310224': 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): 102
logL (Free Index) = 5308.16539739
delta logL = 2.01084148754

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  7.631e-04  5.875e-03  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  9.311e+00  3.986e+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:  9.020e-01  1.561e-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:  9.956e-01  1.897e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.25
Ra Dec: 181.203 4.120
Photon Index (Free Index): 9.31 +/- 3.99
Photon Flux (Free Index): 1.29e-07 +/- 6.82e-08
Energy Flux (Free Index): 1.46e-05 +/- 8.04e-06

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/310224/cmap_HighResolution_499564801_499824001_4FGL_J1204.8+0407_daily_bin1004.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.24e-02', comment='SUCCESS', photon_flux='5.58e-08', energy_flux2='1.46e-05', photon_flux_error='4.99e-08', dlogl='2.01e+00', energy_flux='1.49e-05', photon_flux2='1.29e-07', job_status='DONE', time_completed='2021-09-04 23:30:37.448615', photon_index_error2='3.99', photon_index2='9.31', ts='1.80', fit_tolerance='1e-08', GAL='0.82', photon_index_error='0.00', photon_flux_upper_limit='1.58e-07', energy_flux_error2='8.04e-06', EG='1.10', time_epoch_completed='1630823437.45', return_code='0', job_id='310224', GAL2='0.90', EG2='1.00', return_code2='102', energy_flux_error='1.34e-05', photon_flux_error2='6.82e-08', ts2='6.25', photon_index='2.58' WHERE bin_id='1004' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:30:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0082>
Subject: Job 310224: <4FGL_J1204.8+0407_daily_bin1004> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1004> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:45 2021
Job was executed on host(s) <bullet0082>, 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:30:38 2021
Results reported at Sat Sep  4 23:30:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1004 181.203 4.12 499564801 499824001 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 :                                   787.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             301.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   891 sec.
    Turnaround time :                            893 sec.

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

