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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1044
RA = 181.203, Dec = 4.12
tmin = 509932801, tmax = 510192001
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='310287', job_status='RUN', time_executed='2021-09-04 23:17:41.436938', time_epoch_executed='1630822661.44' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1044'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310287

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310287/ft1_4FGL_J1204.8+0407_daily_bin1044.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310287/ft1_4FGL_J1204.8+0407_daily_bin1044.fits outfile=/scratch/kocevski/310287/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1044.fits ra=181.203 dec=4.12 rad=12.0 tmin=509932801.0 tmax=510192001.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.54
user 3.32
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.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/310287/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1044.fits evtable="EVENTS" outfile="/scratch/kocevski/310287/ft1_filtered_4FGL_J1204.8+0407_daily_bin1044.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310287/ft1_filtered_4FGL_J1204.8+0407_daily_bin1044.fits" evtable="EVENTS" scfile=/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits sctable="SC_DATA" outfile=/scratch/kocevski/310287/ltcube_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.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/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits
.....................!
real 11.95
user 11.53
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310287/ft1_filtered_4FGL_J1204.8+0407_daily_bin1044.fits evtable="EVENTS" scfile=/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits sctable="SC_DATA" expcube=/scratch/kocevski/310287/ltcube_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.fits outfile=/scratch/kocevski/310287/expmap_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.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/310287/ltcube_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.fits
.....................!
real 190.27
user 185.41
sys 4.50

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/310287/ft1_filtered_4FGL_J1204.8+0407_daily_bin1044.fits scfile=/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits outfile=/scratch/kocevski/310287/cmap_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.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.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310287/ft1_filtered_4FGL_J1204.8+0407_daily_bin1044.fits scfile=/scratch/kocevski/310287/ft2_4FGL_J1204.8+0407_daily_bin1044.fits outfile=/scratch/kocevski/310287/cmap_HighResolution_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.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.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .85758E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    35.577       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.5550       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    13.012       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    37.820       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10118E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    51.361       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .14180E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.434       1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.559       1.0000         .10000E-03   10000.    
    16 'norm      '    6.1949       1.0000         .10000E-03   10000.    
    17 'norm      '    3.4504       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    2.0738       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.7641       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .14912E-02   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2841       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .76543       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=   6274.628     FROM MIGRAD    STATUS=CONVERGED    721 CALLS     3658 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .79752E-01    .93742        .32706E-07   -.14684E-03
   2  Prefactor     35.578        26.474        .30307E-06    .10847E-04
   3  Prefactor     2.5517        23.538        .15551E-05   -.46624E-03
   4  Prefactor     .10000E-03    37.643       -.10045E-04** at limit **
   5  Prefactor     13.012        10.832        .98845E-07   -.14757E-03
   6  Prefactor     .10000E-03    53.469        .10531E-04** at limit **
   7  Prefactor     .10000E-03    3.0615       -.90198E-08** at limit **
   8  Prefactor     37.820        20.871        .43381E-07   -.24616E-04
   9  Prefactor     .10000E-03    10.406        .71986E-07** at limit **
  10  Prefactor     .10000E-03    61.042        .11573E-04** at limit **
  11  Prefactor     51.371        45.199        .62717E-05    .10686E-03
  12  Prefactor     .10000E-03    76.310       -.13353E-04** at limit **
  13  Prefactor     .10000E-03    71.470       -.48810E-05** at limit **
  14  Prefactor     11.433        27.584       -.99966E-06    .71713E-05
  15  Prefactor     11.552        14.172       -.72529E-07    .41282E-04
  16  norm          6.1944        3.3330        .33804E-07    .98348E-04
  17  norm          3.4502        2.9772        .71409E-06   -.34913E-02
  18  Prefactor     .10000E-03    8.2291       -.63944E-07** at limit **
  19  norm          .10000E-03    15.234       -.73219E-06** at limit **
  20  Prefactor     .10000E-03    29.951       -.56506E-05** at limit **
  21  norm          2.0736        .71925       -.37998E-07    .37044E-03
  22  Prefactor     .10000E-03    4.8192        .54070E-08** at limit **
  23  Prefactor     .10000E-03    26.122        .72299E-05** at limit **
  24  Prefactor     .10000E-03    4.0161        .62614E-08** at limit **
  25  norm          1.7641        1.1682       -.51842E-08    .13353E-04
  26  Prefactor     .10004E-03    6.0000       -.48582E-06** at limit **
  27  Prefactor     .10000E-03    47.000        .36961E-05** at limit **
  28  Normalizat    1.2842        .20869       -.15464E-06    .74770E-04
  29  Prefactor     .76536        .16357       -.58546E-06    .60103E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.079752
  Prefactor  = 35.5783
  Prefactor  = 2.55173
  Prefactor  = 0.000100002
  Prefactor  = 13.0117
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 37.8199
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 51.3712
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 11.433
  Prefactor  = 11.5518
  norm       = 6.19437
  norm       = 3.45019
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  norm       = 2.07361
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 1.76408
  Prefactor  = 0.000100044
  Prefactor  = 0.0001
  Normalizat = 1.28417
  Prefactor  = 0.765356
 **********
 **   18 **HESSE 
 **********

 FCN=   6274.628     FROM HESSE     STATUS=OK           553 CALLS     4211 TOTAL
                     EDM=   .29E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .79752E-01    6.8090        .14766E-02   -1.5652    
   2  Prefactor     35.578        26.479        .67188E-04   -1.4514    
   3  Prefactor     2.5517        29.334        .12771E-02   -1.5388    
   4  Prefactor     .10000E-03    37.808        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     13.012        10.851        .55522E-03   -1.4986    
   6  Prefactor     .10000E-03    53.471        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    3.0699        .13535E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     37.820        20.935        .65172E-04   -1.4477    
   9  Prefactor     .10000E-03    10.452        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    61.299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     51.371        45.154        .55960E-04   -1.4273    
  12  Prefactor     .10000E-03    76.818        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    73.330        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     11.433        27.876        .11848E-03   -1.5032    
  15  Prefactor     11.552        14.216        .11783E-03   -1.5028    
  16  norm          6.1944        3.3448        .92545E-04   -1.5210    
  17  norm          3.4502        4.4328        .81060E-03   -1.5336    
  18  Prefactor     .10000E-03    8.2304        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    15.240        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    30.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          2.0736        .73537        .35573E-04   -1.5420    
  22  Prefactor     .10000E-03    4.8440        .16982E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    26.321        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    4.0240        .15500E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.7641        1.1655        .67306E-04   -1.5442    
  26  Prefactor     .10004E-03    47.403        .37401E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    47.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2842        .24718        .26453E-03   -.84040    
  29  Prefactor     .76536        .19223        .26787E-03   -1.0102    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.87986e-08
Minuit parameter uncertainties:
  1  1.47306
  2  26.4881
  3  17.3139
  4  0.000490244
  5  10.8531
  6  0.000406561
  7  2.16742e-06
  8  20.9394
  9  6.49637e-05
  10  0.00073158
  11  45.184
  12  0.000824841
  13  0.000194998
  14  27.9075
  15  14.2205
  16  3.34489
  17  4.43323
  18  7.35523e-07
  19  2.08095e-05
  20  0.000248668
  21  0.735375
  22  2.08121e-06
  23  0.00028552
  24  2.1832e-06
  25  1.16554
  26  0.00288853
  27  0.000215686
  28  0.247411
  29  0.192396
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  8.248e-04  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.654e-01  1.924e-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.284e+00  2.474e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/310287/likelihoodResults_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.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): 102
logL (Free Index) = 6274.62810147
delta logL = -6.19151205683e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6274.62803977
delta logL = -2.13848579733e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10192E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5280       1.0000          .0000       10.000    
     3 'Normalizat'    1.2842       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .76536       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=   6274.628     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      275 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10010E-03    8771.8        .18142E-02** at limit **
   2  Index         2.6380        7.6473        .50000       -.20019E-04
   3  Normalizat    1.2842        .54824E-01    .26453E-03    .80796E-04
   4  Prefactor     .76535        .44282E-01    .26787E-03   -.25040E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100104
  Index      = 2.63796
  Normalizat = 1.28417
  Prefactor  = 0.765355
 **********
 **   18 **HESSE 
 **********

 FCN=   6274.628     FROM HESSE     STATUS=OK            29 CALLS      304 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10010E-03    810.95        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6380        6.1141        .50000       -.49202    
   3  Normalizat    1.2842        .23270        .10581E-04   -.84040    
   4  Prefactor     .76535        .18802        .10715E-04   -1.0102    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05771e-09
Minuit parameter uncertainties:
  1  0.0186398
  2  11.5585
  3  0.232894
  4  0.188182
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310287': 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) = 6274.6280393
delta logL = 2.56209204963e-07

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.001e-04  1.864e-02  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.638e+00  1.156e+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.654e-01  1.882e-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.284e+00  2.329e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/310287/cmap_HighResolution_509932801_510192001_4FGL_J1204.8+0407_daily_bin1044.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.99e-03', job_status='DONE', photon_flux_upper_limit='1.15e-07', time_completed='2021-09-04 23:32:02.480270', job_id='310287', GAL2='0.77', fit_tolerance='1e-08', EG2='1.28', EG='1.28', time_epoch_completed='1630823522.48', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.77', dlogl='2.56e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1044' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:32:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0043>
Subject: Job 310287: <4FGL_J1204.8+0407_daily_bin1044> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1044> 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) <bullet0043>, 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:32:02 2021
Results reported at Sat Sep  4 23:32:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1044 181.203 4.12 509932801 510192001 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 :                                   840.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             291.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   970 sec.
    Turnaround time :                            972 sec.

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

