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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1457
RA = 181.203, Dec = 4.12
tmin = 616982401, tmax = 617241601
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='312044', job_status='RUN', time_executed='2021-09-04 23:22:55.707320', time_epoch_executed='1630822975.71' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1457'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/312044

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/312044/ft1_4FGL_J1204.8+0407_daily_bin1457.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/312044/ft2_4FGL_J1204.8+0407_daily_bin1457.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/312044/ft1_4FGL_J1204.8+0407_daily_bin1457.fits outfile=/scratch/kocevski/312044/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1457.fits ra=181.203 dec=4.12 rad=12.0 tmin=616982401.0 tmax=617241601.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 2.99
user 2.79
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/312044/ft1_filtered_4FGL_J1204.8+0407_daily_bin1457.fits evtable="EVENTS" scfile=/scratch/kocevski/312044/ft2_4FGL_J1204.8+0407_daily_bin1457.fits sctable="SC_DATA" expcube=/scratch/kocevski/312044/ltcube_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.fits outfile=/scratch/kocevski/312044/expmap_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.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/312044/ltcube_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.fits
.....................!
real 191.42
user 186.51
sys 4.52

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/312044/ft1_filtered_4FGL_J1204.8+0407_daily_bin1457.fits scfile=/scratch/kocevski/312044/ft2_4FGL_J1204.8+0407_daily_bin1457.fits outfile=/scratch/kocevski/312044/cmap_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.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.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/312044/ft1_filtered_4FGL_J1204.8+0407_daily_bin1457.fits scfile=/scratch/kocevski/312044/ft2_4FGL_J1204.8+0407_daily_bin1457.fits outfile=/scratch/kocevski/312044/cmap_HighResolution_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.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.55
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5641       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    17.508       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.3620       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.6808       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    63.795       1.0000         .10000E-03   10000.    
    13 'Prefactor '    35.145       1.0000         .10000E-03   10000.    
    14 'Prefactor '    8.0270       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10032E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.0896       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10038E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.5943       1.0000         .10000E-03   10000.    
    22 'Prefactor '    13.141       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10869E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    5.1047       1.0000         .10000E-03   10000.    
    26 'Prefactor '    5.4247       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.3245       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .71019       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=   7111.389     FROM MIGRAD    STATUS=CONVERGED    733 CALLS     3704 TOTAL
                     EDM=   .19E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5640        2.7460        .42331E-07   -.28103E-05
   2  Prefactor     .10000E-03    22.369        .15084E-05** at limit **
   3  Prefactor     .10000E-03    8.0860        .54752E-06** at limit **
   4  Prefactor     .10000E-03    78.962       -.56941E-05** at limit **
   5  Prefactor     17.504        10.075        .46437E-08   -.21690E-04
   6  Prefactor     .10000E-03    13.389        .16314E-05** at limit **
   7  Prefactor     6.3619        8.9020        .99506E-07    .26847E-05
   8  Prefactor     .10000E-03    5.3323       -.47572E-07** at limit **
   9  Prefactor     3.6806        11.240        .32402E-05    .16353E-03
  10  Prefactor     .10000E-03    125.86        .44355E-05** at limit **
  11  Prefactor     .10000E-03    13.434        .16380E-05** at limit **
  12  Prefactor     63.794        39.016       -.13362E-06   -.10872E-06
  13  Prefactor     35.149        20.529        .18253E-08   -.12564E-04
  14  Prefactor     7.9927        31.300        .27009E-05    .21274E-04
  15  Prefactor     .10000E-03    3.3503        .49312E-07** at limit **
  16  norm          .10000E-03    .79979        .35276E-07** at limit **
  17  norm          7.0895        3.6392        .18664E-06    .34736E-03
  18  Prefactor     .10000E-03    7.6517       -.72560E-06** at limit **
  19  norm          .10000E-03    16.658       -.29323E-05** at limit **
  20  Prefactor     .10000E-03    67.077        .11132E-05** at limit **
  21  norm          1.5944        .53616        .12992E-07   -.25470E-03
  22  Prefactor     13.142        8.0819        .52593E-08   -.11967E-04
  23  Prefactor     .10000E-03    6.4711        .56563E-07** at limit **
  24  Prefactor     .10001E-03    6.2439        .24839E-05** at limit **
  25  norm          5.1048        1.6977        .76639E-08   -.31249E-04
  26  Prefactor     5.4256        8.8305        .46924E-06   -.63030E-04
  27  Prefactor     .10000E-03    8.2589        .54196E-06** at limit **
  28  Normalizat    1.3245        .19456       -.59263E-06   -.54846E-04
  29  Prefactor     .71022        .15287        .10618E-06   -.90231E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.56399
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 17.5045
  Prefactor  = 0.0001
  Prefactor  = 6.36192
  Prefactor  = 0.0001
  Prefactor  = 3.68059
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 63.7942
  Prefactor  = 35.1489
  Prefactor  = 7.99273
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 7.08952
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.59436
  Prefactor  = 13.1416
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  norm       = 5.10476
  Prefactor  = 5.42559
  Prefactor  = 0.0001
  Normalizat = 1.32446
  Prefactor  = 0.710222
 **********
 **   18 **HESSE 
 **********

 FCN=   7111.389     FROM HESSE     STATUS=OK           553 CALLS     4257 TOTAL
                     EDM=   .75E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5640        2.7452        .10368E-03   -1.5281    
   2  Prefactor     .10000E-03    22.588        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    8.1002        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    79.251        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     17.504        10.088        .95721E-04   -1.4871    
   6  Prefactor     .10000E-03    13.411        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.3619        8.8858        .15913E-03   -1.5203    
   8  Prefactor     .10000E-03    5.3389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     3.6806        11.788        .10526E-02   -1.5324    
  10  Prefactor     .10000E-03    126.81        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    13.457        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     63.794        39.108        .50242E-04   -1.4109    
  13  Prefactor     35.149        20.491        .67599E-04   -1.4522    
  14  Prefactor     7.9927        31.254        .14152E-03   -1.5142    
  15  Prefactor     .10000E-03    3.3617        .15069E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    1.3669        .14573E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.0895        3.6548        .50886E-03   -1.5175    
  18  Prefactor     .10000E-03    7.6607        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    16.737        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    67.097        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.5944        .53243        .32843E-04   -1.5455    
  22  Prefactor     13.142        8.0840        .55247E-03   -1.4983    
  23  Prefactor     .10000E-03    6.4726        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10001E-03    10.916        .33168E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          5.1048        1.6972        .60144E-04   -1.5256    
  26  Prefactor     5.4256        8.7305        .17253E-03   -1.5242    
  27  Prefactor     .10000E-03    8.2654        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.3245        .23052        .26069E-03   -.82839    
  29  Prefactor     .71022        .17925        .28019E-03   -1.0313    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.47771e-10
Minuit parameter uncertainties:
  1  2.74526
  2  2.94455e-05
  3  8.88824e-06
  4  0.000315337
  5  10.0892
  6  3.69729e-05
  7  8.88765
  8  1.11212e-06
  9  11.7953
  10  0.000234433
  11  3.70061e-05
  12  39.1235
  13  20.4952
  14  31.3182
  15  1.20789e-06
  16  6.99733e-06
  17  3.65494
  18  1.5537e-05
  19  7.59909e-05
  20  3.60114e-05
  21  0.532431
  22  8.08468
  23  8.5972e-07
  24  0.000522572
  25  1.69722
  26  8.73255
  27  8.37621e-06
  28  0.2307
  29  0.179398
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  6.379e+01  3.912e+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:  7.102e-01  1.794e-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.324e+00  2.307e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.86
Ra Dec: 181.203 4.120
Photon Index (Fixed Index): 2.58 +/- 0.00
Photon Flux (Fixed Index): 7.25e-08 +/- 4.44e-08
Energy Flux (Fixed Index): 1.94e-05 +/- 1.19e-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) = 7111.11743873
delta logL = 0.271994786883

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7111.09296357
delta logL = 0.29646994906

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    40.782       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0713       1.0000          .0000       10.000    
     3 'Normalizat'    1.2944       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72828       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=   7111.093     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      275 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     40.763        44.844        .62770E-04   -.16746E-03
   2  Index         3.0728        .77275        .55191E-02   -.86754E-04
   3  Normalizat    1.2944        .22499        .26309E-03   -.16975E-02
   4  Prefactor     .72823        .18028        .27702E-03   -.15964E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 40.7629
  Index      = 3.0728
  Normalizat = 1.29442
  Prefactor  = 0.728232
 **********
 **   18 **HESSE 
 **********

 FCN=   7111.093     FROM HESSE     STATUS=OK            25 CALLS      300 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     40.763        39.721        .12554E-04   -1.4430    
   2  Index         3.0728        .68437        .22076E-03   -.39569    
   3  Normalizat    1.2944        .22491        .52618E-04   -.83733    
   4  Prefactor     .72823        .18019        .55405E-04   -1.0243    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.16124e-09
Minuit parameter uncertainties:
  1  39.7465
  2  0.686909
  3  0.225076
  4  0.180334
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/312044': 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) = 7111.09295793
delta logL = 0.296475585602

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  4.076e+01  3.975e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  3.073e+00  6.869e-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:  7.282e-01  1.803e-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.294e+00  2.251e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.52
Ra Dec: 181.203 4.120
Photon Index (Free Index): 3.07 +/- 0.69
Photon Flux (Free Index): 9.55e-08 +/- 5.71e-08
Energy Flux (Free Index): 1.84e-05 +/- 1.01e-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/312044/cmap_HighResolution_616982401_617241601_4FGL_J1204.8+0407_daily_bin1457.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.25e-08', energy_flux2='1.84e-05', photon_flux_error='4.44e-08', dlogl='2.96e-01', energy_flux='1.94e-05', photon_flux2='9.55e-08', job_status='DONE', time_completed='2021-09-04 23:36:36.554473', photon_index_error2='0.69', photon_index2='3.07', ts='4.86', fit_tolerance='1e-08', GAL='0.71', photon_index_error='0.00', energy_flux_error2='1.01e-05', EG='1.32', time_epoch_completed='1630823796.55', return_code='0', job_id='312044', GAL2='0.73', EG2='1.29', return_code2='0', energy_flux_error='1.19e-05', photon_flux_error2='5.71e-08', ts2='5.52', photon_index='2.58' WHERE bin_id='1457' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:36:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0122>
Subject: Job 312044: <4FGL_J1204.8+0407_daily_bin1457> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1457> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep  4 23:20:45 2021
Job was executed on host(s) <bullet0122>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:20:46 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 23:20:46 2021
Terminated at Sat Sep  4 23:36:37 2021
Results reported at Sat Sep  4 23:36:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1457 181.203 4.12 616982401 617241601 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 :                                   808.42 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             302.10 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   950 sec.
    Turnaround time :                            952 sec.

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

