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


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1387
RA = 60.4867, Dec = -20.5804
tmin = 598838401, tmax = 599097601
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='165776', job_status='RUN', time_executed='2021-08-19 23:41:49.781506', time_epoch_executed='1629441709.78' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1387'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/165776

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/165776/ft1_4FGL_J0401.9-2034_daily_bin1387.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/165776/ft1_4FGL_J0401.9-2034_daily_bin1387.fits outfile=/scratch/kocevski/165776/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1387.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=598838401.0 tmax=599097601.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.15
user 2.66
sys 0.43

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.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/165776/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1387.fits evtable="EVENTS" outfile="/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.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.75
user 0.34
sys 0.39

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits" evtable="EVENTS" scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits sctable="SC_DATA" outfile=/scratch/kocevski/165776/ltcube_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.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/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits
.....................!
real 12.66
user 12.02
sys 0.61

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits evtable="EVENTS" scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits sctable="SC_DATA" expcube=/scratch/kocevski/165776/ltcube_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits outfile=/scratch/kocevski/165776/expmap_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.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/165776/ltcube_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits
.....................!
real 191.38
user 185.94
sys 5.02

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
Extended source Fornax A in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/FornaxA.fits is the correct path to the extended template.
Added 146 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0401.9-2034 @ 60.4867 -20.5804

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits outfile=/scratch/kocevski/165776/cmap_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.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=60.4867 yref=-20.5804 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.79
user 0.38
sys 0.39

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits outfile=/scratch/kocevski/165776/cmap_HighResolution_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.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=60.4867 yref=-20.5804 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.75
user 0.37
sys 0.38

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits evtable="EVENTS" scfile=/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/165776/Model_4FGL_J0401.9-2034_daily_bin1387.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 Fornax A
adding source GAL_V02
Working on...
/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits.....................!
real 159.17
user 157.36
sys 1.48

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits', '/scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits', expMap='/scratch/kocevski/165776/expmap_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits', expCube='/scratch/kocevski/165776/ltcube_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/165776/Model_4FGL_J0401.9-2034_daily_bin1387.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0401.9-2034'

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.016e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/165776/ft1_filtered_4FGL_J0401.9-2034_daily_bin1387.fits
Spacecraft file(s): /scratch/kocevski/165776/ft2_4FGL_J0401.9-2034_daily_bin1387.fits
Exposure map: /scratch/kocevski/165776/expmap_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits
Exposure cube: /scratch/kocevski/165776/ltcube_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/165776/Model_4FGL_J0401.9-2034_daily_bin1387.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) = 7490.6584748

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10183E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    6.1370       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    35.395       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10211E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .84851       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    11.234       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.281       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10189E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .79586       1.0000         .10000E-03   10000.    
    15 'norm      '    9.7690       1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.0579       1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.3489       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    23 'Normalizat'    .80034       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.4727       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4710E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7490.657     FROM MIGRAD    STATUS=CONVERGED    561 CALLS     2716 TOTAL
                     EDM=   .20E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    299.81        .19530E-05** at limit **
   2  Prefactor     .10000E-03    1.7718       -.47626E-08** at limit **
   3  Prefactor     6.1351        14.384       -.20617E-07   -.71750E-05
   4  Prefactor     .10000E-03    5.9613       -.39227E-08** at limit **
   5  Prefactor     35.396        44.791        .11081E-06    .11595E-05
   6  Prefactor     .10000E-03    21.664        .29301E-05** at limit **
   7  Prefactor     .10000E-03    1.1074       -.60855E-07** at limit **
   8  Prefactor     .84936        3.4637        .60586E-06   -.10486E-04
   9  Prefactor     .10000E-03    1.1443        .42198E-07** at limit **
  10  norm          11.234        1.6681        .50861E-08    .56929E-04
  11  Prefactor     15.276        23.498       -.11088E-05   -.83243E-05
  12  norm          .10000E-03    .53995        .17121E-07** at limit **
  13  Prefactor     .10000E-03    14.362        .21453E-06** at limit **
  14  Prefactor     .79672        2.7810        .45718E-06   -.14081E-04
  15  norm          9.7701        9.4292        .15576E-06    .11941E-04
  16  Prefactor     5.0525        25.819       -.17571E-05   -.41659E-05
  17  Prefactor     4.3498        8.1136        .20975E-05   -.28402E-05
  18  Prefactor     .10000E-03    1.3020        .79560E-09** at limit **
  19  Prefactor     .10000E-03    7.3572       -.32022E-07** at limit **
  20  Prefactor     .10000E-03    20.649       -.26949E-05** at limit **
  21  Prefactor     .10000E-03    3.1592       -.99024E-08** at limit **
  22  Prefactor     .10000E-03    33.088       -.51037E-06** at limit **
  23  Normalizat    .80035        .19409       -.41121E-06    .14219E-05
  24  Prefactor     1.4727        .16427        .89427E-07    .10207E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.13505
  Prefactor  = 0.0001
  Prefactor  = 35.3959
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.849357
  Prefactor  = 0.0001
  norm       = 11.2336
  Prefactor  = 15.2758
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.796719
  norm       = 9.77014
  Prefactor  = 5.05246
  Prefactor  = 4.34982
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.800345
  Prefactor  = 1.47265
 **********
 **   18 **HESSE 
 **********

 FCN=   7490.657     FROM HESSE     STATUS=OK           399 CALLS     3115 TOTAL
                     EDM=   .68E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    300.11        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.7992        .11244E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     6.1351        14.382        .16206E-03   -1.5213    
   4  Prefactor     .10000E-03    5.9780        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     35.396        44.801        .67361E-04   -1.4517    
   6  Prefactor     .10000E-03    21.658        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.0767        .17425E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .84936        3.4496        .29474E-03   -1.5524    
   9  Prefactor     .10000E-03    1.1509        .90237E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          11.234        1.6590        .39101E-04   -1.5038    
  11  Prefactor     15.276        23.531        .10246E-03   -1.4926    
  12  norm          .10000E-03    .86298        .11906E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    14.389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .79672        2.7424        .24749E-03   -1.5529    
  15  norm          9.7701        9.4216        .12821E-03   -1.5083    
  16  Prefactor     5.0525        25.722        .17879E-03   -1.5258    
  17  Prefactor     4.3498        8.1020        .96576E-03   -1.5291    
  18  Prefactor     .10000E-03    1.3073        .96423E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    7.3732        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    20.659        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    3.1646        .15024E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    33.144        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Normalizat    .80035        .22059        .33969E-03   -1.0006    
  24  Prefactor     1.4727        .18926        .23386E-03   -.78308    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.82541e-11
Minuit parameter uncertainties:
  1  7.19336e-05
  2  8.12756e-08
  3  14.3899
  4  8.72709e-07
  5  44.8437
  6  8.68756e-07
  7  1.88276e-07
  8  3.42356
  9  2.92897e-07
  10  1.65899
  11  23.545
  12  3.29194e-06
  13  9.11473e-06
  14  2.74285
  15  9.42299
  16  22.8155
  17  8.10401
  18  5.01992e-07
  19  2.45607e-06
  20  1.19827e-06
  21  8.40186e-07
  22  8.71274e-06
  23  0.220838
  24  0.189349
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  7.967e-01  2.743e+00  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.473e+00  1.893e-01  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  8.003e-01  2.208e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.09
Ra Dec: 60.487 -20.580
Photon Flux Upper Limit: 9.51e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.30e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/165776/likelihoodResults_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7490.59497015
delta logL = 0.0620173176849

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7490.51850056
delta logL = 0.138486911417

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7490.518     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      406 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .69466E-02    .34920E-03** at limit **
   2  Index         7.4918        3.2641        .23507        .96473E-04
   3  Normalizat    .77286        .35152E-01    .78008E-01   -.92731E-04
   4  Prefactor     1.4932        .31622E-01    .52606E-01   -.40925E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 7.4918
  Normalizat = 0.772863
  Prefactor  = 1.49325
 **********
 **   18 **HESSE 
 **********

 FCN=   7490.518     FROM HESSE     STATUS=NOT POSDEF    39 CALLS      445 TOTAL
                     EDM=   .78E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .23559E-01    .30966E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         7.4918        8.7339        .10542E-01    .52171    
   3  Normalizat    .77286        .69710E-01    .34535E-03   -1.0108    
   4  Prefactor     1.4932        .62987E-01    .23256E-03   -.77729    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.76363e-07
Minuit parameter uncertainties:
  1  7.77059e-07
  2  9.49604
  3  0.0697185
  4  0.0629905
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/165776': 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) = 7490.51849943
delta logL = 0.138488034937

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  7.771e-07  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  7.492e+00  9.496e+00  0.000e+00  1.000e+01 (-1.000e+00)
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.493e+00  6.299e-02  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  7.729e-01  6.972e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.09
Ra Dec: 60.487 -20.580

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/165776/cmap_HighResolution_598838401_599097601_4FGL_J0401.9-2034_daily_bin1387.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.30e-03', job_status='DONE', photon_flux_upper_limit='9.51e-08', time_completed='2021-08-19 23:55:02.269055', job_id='165776', GAL2='1.49', fit_tolerance='1e-08', EG2='0.77', EG='0.80', time_epoch_completed='1629442502.27', return_code2='102', ts='0.09', comment='SUCCESS', return_code='0', GAL='1.47', dlogl='1.38e-01', ts2='0.39', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1387' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug 19 23:55:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0268>
Subject: Job 165776: <4FGL_J0401.9-2034_daily_bin1387> in cluster <slac> Done

Job <4FGL_J0401.9-2034_daily_bin1387> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Aug 19 23:40:17 2021
Job was executed on host(s) <bullet0268>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug 19 23:40:19 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Aug 19 23:40:19 2021
Terminated at Thu Aug 19 23:55:03 2021
Results reported at Thu Aug 19 23:55:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0401.9-2034_daily_bin1387 60.4867 -20.5804 598838401 599097601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0401.9-2034 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   783.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             305.66 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   883 sec.
    Turnaround time :                            886 sec.

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

