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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1042
RA = 181.203, Dec = 4.12
tmin = 509414401, tmax = 509673601
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='310284', job_status='RUN', time_executed='2021-09-04 23:17:31.257439', time_epoch_executed='1630822651.26' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1042'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310284

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310284/ft1_4FGL_J1204.8+0407_daily_bin1042.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310284/ft1_4FGL_J1204.8+0407_daily_bin1042.fits outfile=/scratch/kocevski/310284/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1042.fits ra=181.203 dec=4.12 rad=12.0 tmin=509414401.0 tmax=509673601.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.64
user 3.45
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits" evtable="EVENTS" scfile=/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits sctable="SC_DATA" outfile=/scratch/kocevski/310284/ltcube_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.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/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits
.....................!
real 11.87
user 11.47
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits evtable="EVENTS" scfile=/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits sctable="SC_DATA" expcube=/scratch/kocevski/310284/ltcube_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.fits outfile=/scratch/kocevski/310284/expmap_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.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/310284/ltcube_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.fits
.....................!
real 189.76
user 184.82
sys 4.53

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/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits scfile=/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits outfile=/scratch/kocevski/310284/cmap_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.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.38
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits scfile=/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits outfile=/scratch/kocevski/310284/cmap_HighResolution_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.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/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits evtable="EVENTS" scfile=/scratch/kocevski/310284/ft2_4FGL_J1204.8+0407_daily_bin1042.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/310284/Model_4FGL_J1204.8+0407_daily_bin1042.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/310284/ft1_filtered_4FGL_J1204.8+0407_daily_bin1042.fits.....................!
real 63.64
user 62.22
sys 1.19

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.8701       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10056E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.0338       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.4941       1.0000         .10000E-03   10000.    
     6 'Prefactor '    43.595       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    72.006       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    14.425       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .12744E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    4.1475       1.0000         .10000E-03   10000.    
    17 'norm      '    3.4634       1.0000         .10000E-03   10000.    
    18 'Prefactor '    32.542       1.0000         .10000E-03   10000.    
    19 'norm      '    .10030E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10713E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.6856       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .58881E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    29.126       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10677E-02   1.0000         .10000E-03   10000.    
    25 'norm      '    1.1459       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .77228       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.4091       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=   7497.869     FROM MIGRAD    STATUS=CONVERGED    719 CALLS     3751 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .77287       -.21833E-08** at limit **
   2  Prefactor     5.8645        21.017        .57165E-06   -.79671E-05
   3  Prefactor     .10000E-03    13.284       -.37458E-06** at limit **
   4  Prefactor     8.0826        293.96        .11219E-04    .23476E-04
   5  Prefactor     7.4914        8.8173        .18720E-05    .29149E-04
   6  Prefactor     43.599        38.668        .50230E-06    .21622E-04
   7  Prefactor     .10000E-03    4.4941       -.42918E-06** at limit **
   8  Prefactor     .10000E-03    8.1155       -.12444E-06** at limit **
   9  Prefactor     .10000E-03    9.2167        .21090E-06** at limit **
  10  Prefactor     .10000E-03    34.399        .85804E-06** at limit **
  11  Prefactor     .10000E-03    26.864       -.97893E-06** at limit **
  12  Prefactor     71.970        42.862       -.20455E-05   -.27990E-03
  13  Prefactor     .10000E-03    13.572       -.95242E-07** at limit **
  14  Prefactor     14.410        25.384       -.36154E-06   -.67052E-04
  15  Prefactor     .10063E-03    6.2868        .12165E-05** at limit **
  16  norm          4.1461        2.5346        .17998E-06   -.73747E-03
  17  norm          3.4643        3.7801        .31869E-06   -.20050E-03
  18  Prefactor     32.526        25.516       -.66937E-06   -.14857E-03
  19  norm          .10000E-03    19.990        .11134E-05** at limit **
  20  Prefactor     .10000E-03    73.448       -.11530E-06** at limit **
  21  norm          1.6856        .63969        .15030E-07   -.87803E-03
  22  Prefactor     .10068E-03    11.968        .44449E-05** at limit **
  23  Prefactor     29.148        38.414       -.43584E-05   -.45492E-03
  24  Prefactor     .10015E-03    6.1962       -.43678E-06** at limit **
  25  norm          1.1457        1.4723        .23077E-06   -.46954E-04
  26  Prefactor     .10000E-03    7.4651        .43907E-07** at limit **
  27  Prefactor     .10000E-03    24.430       -.80403E-06** at limit **
  28  Normalizat    .77234        .20320        .46270E-06   -.44393E-03
  29  Prefactor     1.4092        .16996       -.12406E-05   -.57037E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 5.86454
  Prefactor  = 0.0001
  Prefactor  = 8.08264
  Prefactor  = 7.49143
  Prefactor  = 43.5995
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 71.9699
  Prefactor  = 0.0001
  Prefactor  = 14.4104
  Prefactor  = 0.000100625
  norm       = 4.1461
  norm       = 3.46434
  Prefactor  = 32.526
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.68557
  Prefactor  = 0.000100682
  Prefactor  = 29.1478
  Prefactor  = 0.000100149
  norm       = 1.1457
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.772342
  Prefactor  = 1.40918
 **********
 **   18 **HESSE 
 **********

 FCN=   7497.869     FROM HESSE     STATUS=OK           553 CALLS     4304 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .78326        .74280E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.8645        21.000        .16575E-03   -1.5224    
   3  Prefactor     .10000E-03    13.316        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.0826        299.43        .14146E-03   -1.5139    
   5  Prefactor     7.4914        8.7302        .73250E-03   -1.5160    
   6  Prefactor     43.599        38.674        .60719E-04   -1.4386    
   7  Prefactor     .10000E-03    4.5221        .17896E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    8.1498        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    9.3303        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    34.422        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    26.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     71.970        43.237        .47310E-04   -1.4009    
  13  Prefactor     .10000E-03    13.628        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     14.410        25.328        .10546E-03   -1.4949    
  15  Prefactor     .10063E-03    73.976        .37802E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.1461        2.3775        .97154E-04   -1.5301    
  17  norm          3.4643        3.7457        .15335E-03   -1.5336    
  18  Prefactor     32.526        25.532        .70243E-04   -1.4567    
  19  norm          .10000E-03    20.016        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    73.466        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.6856        .62439        .37480E-04   -1.5448    
  22  Prefactor     .10068E-03    67.533        .47482E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     29.148        38.087        .74237E-04   -1.4628    
  24  Prefactor     .10015E-03    98.967        .40522E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.1457        1.4349        .11229E-03   -1.5494    
  26  Prefactor     .10000E-03    7.5015        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    24.517        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .77234        .23670        .34014E-03   -1.0110    
  29  Prefactor     1.4092        .19949        .22576E-03   -.80116    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.01464e-08
Minuit parameter uncertainties:
  1  1.1555e-06
  2  21.0263
  3  2.2565e-05
  4  98.9292
  5  8.73166
  6  38.6965
  7  5.65028e-06
  8  1.34213e-05
  9  1.89832e-05
  10  0.000129276
  11  0.000145002
  12  43.2559
  13  1.45662e-07
  14  25.3471
  15  0.0136174
  16  2.37755
  17  3.74599
  18  25.5402
  19  0.000130983
  20  6.88007e-06
  21  0.624393
  22  0.0135931
  23  38.1184
  24  0.00768453
  25  1.43495
  26  1.11787e-05
  27  0.000101971
  28  0.237017
  29  0.199599
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  1.409e+00  1.996e-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:  7.723e-01  2.370e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.39
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 8.18e-08 +/- 4.91e-08
Energy Flux (Fixed Index): 2.19e-05 +/- 1.32e-05

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) = 7497.72896045
delta logL = 0.13988365839

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7497.72190016
delta logL = 0.146943939955

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    52.054       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9340       1.0000          .0000       10.000    
     3 'Normalizat'    .74396       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.4279       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=   7497.722     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      291 TOTAL
                     EDM=   .50E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     52.027        59.509        .55589E-04   -.37176E-03
   2  Index         2.9357        .82551        .56805E-02   -.14687E-03
   3  Normalizat    .74415        .23721        .34594E-03    .18748E-03
   4  Prefactor     1.4279        .20221        .22455E-03    .76855E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 52.0269
  Index      = 2.9357
  Normalizat = 0.744153
  Prefactor  = 1.4279
 **********
 **   18 **HESSE 
 **********

 FCN=   7497.722     FROM HESSE     STATUS=OK            25 CALLS      316 TOTAL
                     EDM=   .54E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     52.027        51.839        .11118E-04   -1.4264    
   2  Index         2.9357        .71890        .22722E-03   -.42559    
   3  Normalizat    .74415        .23651        .13838E-04   -1.0217    
   4  Prefactor     1.4279        .20160        .44910E-04   -.79579    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.41182e-10
Minuit parameter uncertainties:
  1  51.8839
  2  0.721924
  3  0.236837
  4  0.201711
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310284': 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) = 7497.72188957
delta logL = 0.146954537246

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  5.203e+01  5.188e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.936e+00  7.219e-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:  1.428e+00  2.017e-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:  7.442e-01  2.368e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.77
Ra Dec: 181.203 4.120
Photon Index (Free Index): 2.94 +/- 0.72
Photon Flux (Free Index): 9.90e-08 +/- 6.07e-08
Energy Flux (Free Index): 2.04e-05 +/- 1.18e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/310284/cmap_HighResolution_509414401_509673601_4FGL_J1204.8+0407_daily_bin1042.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.18e-08', energy_flux2='2.04e-05', photon_flux_error='4.91e-08', dlogl='1.47e-01', energy_flux='2.19e-05', photon_flux2='9.90e-08', job_status='DONE', time_completed='2021-09-04 23:31:40.212575', photon_index_error2='0.72', photon_index2='2.94', ts='4.39', fit_tolerance='1e-08', GAL='1.41', photon_index_error='0.00', energy_flux_error2='1.18e-05', EG='0.77', time_epoch_completed='1630823500.21', return_code='0', job_id='310284', GAL2='1.43', EG2='0.74', return_code2='0', energy_flux_error='1.32e-05', photon_flux_error2='6.07e-08', ts2='4.77', photon_index='2.58' WHERE bin_id='1042' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:31:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0283>
Subject: Job 310284: <4FGL_J1204.8+0407_daily_bin1042> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1042> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:50 2021
Job was executed on host(s) <bullet0283>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:52 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:52 2021
Terminated at Sat Sep  4 23:31:40 2021
Results reported at Sat Sep  4 23:31:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1042 181.203 4.12 509414401 509673601 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 :                                   836.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             339.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   948 sec.
    Turnaround time :                            950 sec.

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

