/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 204 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 = 7424
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1404.8+6554_daily_bin1
RA = 211.216, Dec = 65.9048
tmin = 239587201, tmax = 239846401
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='166155', job_status='RUN', time_executed='2021-09-08 23:53:58.360426', time_epoch_executed='1631170438.36' WHERE source_name='4FGL J1404.8+6554' and cadence='daily' and bin_id='1'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/166155

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/166155/ft1_4FGL_J1404.8+6554_daily_bin1.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/166155/ft1_4FGL_J1404.8+6554_daily_bin1.fits outfile=/scratch/kocevski/166155/ft1_filteredMKT_4FGL_J1404.8+6554_daily_bin1.fits ra=211.216 dec=65.9048 rad=12.0 tmin=239587201.0 tmax=239846401.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 1.31
user 1.13
sys 0.16

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.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/166155/ft1_filteredMKT_4FGL_J1404.8+6554_daily_bin1.fits evtable="EVENTS" outfile="/scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.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.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits" evtable="EVENTS" scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits sctable="SC_DATA" outfile=/scratch/kocevski/166155/ltcube_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.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/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits
.....................!
real 12.64
user 12.22
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits evtable="EVENTS" scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits sctable="SC_DATA" expcube=/scratch/kocevski/166155/ltcube_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits outfile=/scratch/kocevski/166155/expmap_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.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/166155/ltcube_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits
.....................!
real 190.65
user 186.01
sys 4.26

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 223 point sources and 0 extended sources

Setting source of interest to:
4FGL J1404.8+6554 @ 211.216 65.9048

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits outfile=/scratch/kocevski/166155/cmap_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.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=211.216 yref=65.9048 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/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits outfile=/scratch/kocevski/166155/cmap_HighResolution_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.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=211.216 yref=65.9048 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/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits evtable="EVENTS" scfile=/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/166155/Model_4FGL_J1404.8+6554_daily_bin1.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/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits.....................!
real 42.83
user 41.52
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits', '/scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits', expMap='/scratch/kocevski/166155/expmap_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits', expCube='/scratch/kocevski/166155/ltcube_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/166155/Model_4FGL_J1404.8+6554_daily_bin1.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1404.8+6554'

4FGL J1404.8+6554
   Spectrum: PowerLaw
366    Prefactor:  7.015e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
367        Index:  1.926e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
368        Scale:  2.467e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/166155/ft1_filtered_4FGL_J1404.8+6554_daily_bin1.fits
Spacecraft file(s): /scratch/kocevski/166155/ft2_4FGL_J1404.8+6554_daily_bin1.fits
Exposure map: /scratch/kocevski/166155/expmap_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits
Exposure cube: /scratch/kocevski/166155/ltcube_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/166155/Model_4FGL_J1404.8+6554_daily_bin1.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) = 4107.60957575

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    3.7777       1.0000         .10000E-03   10000.    
     4 'Prefactor '    75.592       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10076E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.4847       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10128E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10496E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    43.725       1.0000         .10000E-03   10000.    
    16 'norm      '    .52235       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10782E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    3.1773       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    78.145       1.0000         .10000E-03   10000.    
    22 'Prefactor '    33.707       1.0000         .10000E-03   10000.    
    23 'Prefactor '    14.733       1.0000         .10000E-03   10000.    
    24 'Prefactor '    25.002       1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.3669       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    3.9389       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    .86516       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .98534       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4107.604     FROM MIGRAD    STATUS=CONVERGED    795 CALLS     4073 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.645       -.24747E-06** at limit **
   2  norm          .10000E-03    2.3018       -.44157E-07** at limit **
   3  norm          3.7778        2.7361       -.11285E-06    .26380E-04
   4  Prefactor     75.601        61.289        .38316E-05    .38091E-05
   5  Prefactor     .10000E-03    5.1759       -.54367E-07** at limit **
   6  Prefactor     .10000E-03    64.839        .28674E-06** at limit **
   7  Prefactor     .10000E-03    19.569        .34674E-05** at limit **
   8  Prefactor     .10000E-03    27.263        .17716E-05** at limit **
   9  Prefactor     5.4874        7.9074       -.95045E-06   -.22448E-03
  10  Prefactor     .10000E-03    36.735        .81318E-06** at limit **
  11  Prefactor     .10000E-03    21.239       -.44966E-05** at limit **
  12  Prefactor     .10000E-03    7.7601       -.17273E-06** at limit **
  13  Prefactor     .10000E-03    13.339        .73204E-06** at limit **
  14  norm          .10000E-03    37.104        .23507E-05** at limit **
  15  Prefactor     43.732        28.129        .31223E-06    .11804E-05
  16  norm          .52690        4.4301       -.50245E-06   -.11668E-03
  17  Prefactor     .10000E-03    26.681       -.45116E-06** at limit **
  18  Prefactor     .10000E-03    341.22       -.10104E-05** at limit **
  19  Prefactor     3.1780        5.1065       -.32043E-06   -.21168E-03
  20  Prefactor     .10000E-03    15.662       -.23633E-05** at limit **
  21  Prefactor     78.104        122.83       -.38519E-04   -.42185E-06
  22  Prefactor     33.709        33.705       -.41296E-06    .11084E-04
  23  Prefactor     14.734        20.092       -.51099E-06   -.46499E-05
  24  Prefactor     25.002        42.052        .32922E-05    .53611E-05
  25  Prefactor     4.3678        11.137       -.68266E-06   -.99487E-04
  26  Prefactor     .10000E-03    5.0468       -.25017E-06** at limit **
  27  Prefactor     .10000E-03    16.118        .13972E-05** at limit **
  28  norm          3.9390        3.2711       -.12091E-06    .25993E-04
  29  Prefactor     .10000E-03    38.611       -.44173E-05** at limit **
  30  Normalizat    .86499        .20629        .90334E-06    .53386E-04
  31  Prefactor     .98548        .20830        .13534E-05    .14642E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 3.77778
  Prefactor  = 75.6007
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.48744
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 43.732
  norm       = 0.526897
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.17803
  Prefactor  = 0.0001
  Prefactor  = 78.1043
  Prefactor  = 33.7087
  Prefactor  = 14.734
  Prefactor  = 25.0019
  Prefactor  = 4.36784
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.93898
  Prefactor  = 0.0001
  Normalizat = 0.864985
  Prefactor  = 0.985482
 **********
 **   18 **HESSE 
 **********

 FCN=   4107.604     FROM HESSE     STATUS=OK           618 CALLS     4691 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.654        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    2.3130        .94953E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          3.7778        2.7355        .87946E-04   -1.5319    
   4  Prefactor     75.601        61.409        .23091E-03   -1.3967    
   5  Prefactor     .10000E-03    5.2022        .14241E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    64.919        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    19.579        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    27.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     5.4874        8.0437        .17157E-03   -1.5239    
  10  Prefactor     .10000E-03    37.445        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    21.244        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    7.7657        .17415E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    13.573        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    37.102        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     43.732        28.133        .60628E-04   -1.4384    
  16  norm          .52690        17.812        .24416E-02   -1.5563    
  17  Prefactor     .10000E-03    26.699        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    341.22        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     3.1780        5.0786        .16687E-03   -1.5351    
  20  Prefactor     .10000E-03    15.668        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     78.104        122.82        .45428E-04   -1.3938    
  22  Prefactor     33.709        33.700        .69021E-04   -1.4546    
  23  Prefactor     14.734        20.099        .10435E-03   -1.4940    
  24  Prefactor     25.002        42.146        .80114E-04   -1.4708    
  25  Prefactor     4.3678        11.157        .19274E-03   -1.5290    
  26  Prefactor     .10000E-03    5.0510        .14062E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    16.153        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          3.9390        3.2731        .10256E-03   -1.5311    
  29  Prefactor     .10000E-03    38.621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .86499        .24942        .23388E-03   -.97702    
  31  Prefactor     .98548        .24971        .23891E-03   -.93215    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.42613e-10
Minuit parameter uncertainties:
  1  9.93954e-06
  2  3.26624e-06
  3  2.73559
  4  61.4605
  5  4.99032e-06
  6  1.77697e-05
  7  3.6009e-06
  8  1.86641e-06
  9  8.04524
  10  9.08391e-06
  11  4.05102e-06
  12  9.52508e-06
  13  0.000138669
  14  3.4275e-07
  15  28.1417
  16  6.12851
  17  6.83973e-07
  18  2.46395e-05
  19  5.07924
  20  1.4571e-06
  21  123.225
  22  33.7193
  23  20.1079
  24  42.196
  25  11.162
  26  5.09629e-06
  27  1.21405e-05
  28  3.27323
  29  9.87102e-06
  30  0.249755
  31  0.250004
Done.

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

Extracting fit parameters...

4FGL J1404.8+6554
   Spectrum: PowerLaw
366    Prefactor:  1.000e-04  6.840e-07  1.000e-04  1.000e+04 ( 1.000e-14)
367        Index:  1.926e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
368        Scale:  2.467e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
711    Prefactor:  9.855e-01  2.500e-01  0.000e+00  1.000e+01 ( 1.000e+00)
712        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
713        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
710   Normalization:  8.650e-01  2.498e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 211.216 65.905
Photon Flux Upper Limit: 5.79e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.31e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/166155/likelihoodResults_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.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) = 4107.60410503
delta logL = -0.000178353555384

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4107.60392671
delta logL = -4.07362676924e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4107.604     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      228 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7257.4        .90712E-02** at limit **
   2  Index         1.9945        5.0968        .50000        .22131E-05
   3  Normalizat    .86498        .11016        .44452E-01    .89655E-05
   4  Prefactor     .98548        .11992        .46085E-01    .13988E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.99455
  Normalizat = 0.864985
  Prefactor  = 0.985483
 **********
 **   18 **HESSE 
 **********

 FCN=   4107.604     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      261 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6952.4        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9945        5.9217        .50000       -.64487    
   3  Normalizat    .86498        .86972E-01    .23388E-03   -.97702    
   4  Prefactor     .98548        .94753E-01    .11945E-02   -.93215    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.81772e-10
Minuit parameter uncertainties:
  1  0.000659449
  2  52.9287
  3  0.0869858
  4  0.0947694
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/166155': 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) = 4107.60392671
delta logL = -3.43770807376e-08

Extracting fit parameters...

4FGL J1404.8+6554
   Spectrum: PowerLaw
366    Prefactor:  1.000e-04  6.594e-04  1.000e-04  1.000e+04 ( 1.000e-14)
367        Index:  1.995e+00  5.293e+01  0.000e+00  1.000e+01 (-1.000e+00)
368        Scale:  2.467e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
711    Prefactor:  9.855e-01  9.477e-02  0.000e+00  1.000e+01 ( 1.000e+00)
712        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
713        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
710   Normalization:  8.650e-01  8.699e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 211.216 65.905

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/166155/cmap_HighResolution_239587201_239846401_4FGL_J1404.8+6554_daily_bin1.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.31e-03', job_status='DONE', photon_flux_upper_limit='5.79e-08', time_completed='2021-09-09 00:06:37.333244', job_id='166155', GAL2='0.99', fit_tolerance='1e-08', EG2='0.86', EG='0.86', time_epoch_completed='1631171197.33', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='-3.44e-08', ts2='-0.00', photon_index_error='0.00', photon_index='1.93' WHERE bin_id='1' AND source_name='4FGL J1404.8+6554' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  9 00:06:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0203>
Subject: Job 166155: <4FGL_J1404.8+6554_daily_bin1> in cluster <slac> Done

Job <4FGL_J1404.8+6554_daily_bin1> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Sep  8 23:50:24 2021
Job was executed on host(s) <bullet0203>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 23:50:25 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 23:50:25 2021
Terminated at Thu Sep  9 00:06:37 2021
Results reported at Thu Sep  9 00:06:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1404.8+6554_daily_bin1 211.216 65.9048 239587201 239846401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1404.8+6554 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   757.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             253.73 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   972 sec.
    Turnaround time :                            973 sec.

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

