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


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1459
RA = 60.4867, Dec = -20.5804
tmin = 617500801, tmax = 617760001
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='165879', job_status='RUN', time_executed='2021-08-19 23:42:23.301718', time_epoch_executed='1629441743.3' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1459'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/165879

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/165879/ft1_4FGL_J0401.9-2034_daily_bin1459.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/165879/ft1_4FGL_J0401.9-2034_daily_bin1459.fits outfile=/scratch/kocevski/165879/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1459.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=617500801.0 tmax=617760001.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.19
user 2.42
sys 0.74

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.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/165879/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1459.fits evtable="EVENTS" outfile="/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.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 1.06
user 0.33
sys 0.72

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits" evtable="EVENTS" scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits sctable="SC_DATA" outfile=/scratch/kocevski/165879/ltcube_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.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/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits
.....................!
real 13.20
user 12.18
sys 0.99

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits evtable="EVENTS" scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits sctable="SC_DATA" expcube=/scratch/kocevski/165879/ltcube_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits outfile=/scratch/kocevski/165879/expmap_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.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/165879/ltcube_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits
.....................!
real 192.20
user 185.73
sys 6.14

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/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits outfile=/scratch/kocevski/165879/cmap_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.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 1.17
user 0.37
sys 0.68

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits outfile=/scratch/kocevski/165879/cmap_HighResolution_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.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 1.12
user 0.38
sys 0.70

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits evtable="EVENTS" scfile=/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/165879/Model_4FGL_J0401.9-2034_daily_bin1459.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/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits.....................!
real 152.29
user 149.69
sys 2.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits', '/scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits', expMap='/scratch/kocevski/165879/expmap_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits', expCube='/scratch/kocevski/165879/ltcube_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/165879/Model_4FGL_J0401.9-2034_daily_bin1459.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/165879/ft1_filtered_4FGL_J0401.9-2034_daily_bin1459.fits
Spacecraft file(s): /scratch/kocevski/165879/ft2_4FGL_J0401.9-2034_daily_bin1459.fits
Exposure map: /scratch/kocevski/165879/expmap_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits
Exposure cube: /scratch/kocevski/165879/ltcube_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/165879/Model_4FGL_J0401.9-2034_daily_bin1459.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) = 6663.05534396

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .17287E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.2776       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11570       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.5301       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .83405E-01   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .75514E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    9.0192       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.991       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    1.0603       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.7010       1.0000         .10000E-03   10000.    
    19 'Prefactor '    6.0629       1.0000         .10000E-03   10000.    
    20 'Prefactor '    1.9810       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    48.857       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .88958       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.2020       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6663.051     FROM MIGRAD    STATUS=FAILED      1007 CALLS     3276 TOTAL
                     EDM=   .29E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    328.50        .18142E-02** at limit **
   2  Prefactor     .10000E-03    1.2371        .88502E-03** at limit **
   3  Prefactor     1.2765        15.865        .39297E-03    .42267E-04
   4  Prefactor     .10000E-03    4.0399        .16006E-02** at limit **
   5  Prefactor     .10003E-03    55.842        .17036    ** at limit **
   6  Prefactor     .10000E-03    15.614        .18142E-02** at limit **
   7  Prefactor     2.5292        2.4081        .11811E-03    .59623E-03
   8  Prefactor     .65673E-01    39.684        .22689E-02    .82283E-03
   9  Prefactor     .10022E-03    22.495        .21961E-02** at limit **
  10  norm          9.0211        1.7592        .43504E-04    .79719E-03
  11  Prefactor     .10000E-03    7.3876        .18142E-02** at limit **
  12  norm          .10000E-03    .65224        .12642E-03** at limit **
  13  Prefactor     .10000E-03    12.755        .18142E-02** at limit **
  14  Prefactor     12.991        4.2105        .89697E-04    .69418E-03
  15  norm          .10000E-03    4.0633        .16066E-02** at limit **
  16  Prefactor     .10000E-03    8.2326        .18142E-02** at limit **
  17  Prefactor     1.0610        9.3841        .23206E-02    .14995E-02
  18  Prefactor     3.7011        4.1271        .16628E-03   -.14556E-03
  19  Prefactor     6.0594        14.920        .16306E-03    .38904E-04
  20  Prefactor     1.9703        27.852        .29448E-03    .15983E-04
  21  Prefactor     .10000E-03    4.8249        .17362E-02** at limit **
  22  Prefactor     48.855        45.231        .57370E-04   -.22789E-04
  23  Normalizat    .88965        .22369        .30234E-03    .92615E-04
  24  Prefactor     1.2020        .18588        .22852E-03   -.17708E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6663.051     FROM SIMPLEX   STATUS=UNCHANGED   1276 CALLS     4552 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    328.50        .27998E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.2371        .12517E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.2765        15.865        .11599E-05   -1.5482    
   4  Prefactor     .10000E-03    4.0399        .30804E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10003E-03    55.842        .72910E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    15.614        .50443E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     2.5292        2.4081        .11538E-05   -1.5390    
   8  Prefactor     .65673E-01    39.684        .14816E-05   -1.5657    
   9  Prefactor     .10022E-03    22.495        .14142E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          9.0211        1.7592        .11344E-05   -1.5107    
  11  Prefactor     .10000E-03    7.3876        .39877E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    .65224        .23523E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    12.755        .30257E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.991        4.2105        .11229E-05   -1.4987    
  15  norm          .10000E-03    4.0633        .18344E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    8.2326        .22992E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     1.0610        9.3841        .11609E-05   -1.5502    
  18  Prefactor     3.7011        4.1271        .11474E-05   -1.5323    
  19  Prefactor     6.0594        14.920        .11391E-05   -1.5216    
  20  Prefactor     1.9703        27.852        .11536E-05   -1.5427    
  21  Prefactor     .10000E-03    4.8249        .14913E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     48.855        45.231        .10713E-05   -1.4309    
  23  Normalizat    .88965        .22369        .72479E-06   -.96825    
  24  Prefactor     1.2020        .18588        .64596E-06   -.86270    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6663.051     FROM MIGRAD    STATUS=CONVERGED    390 CALLS     4942 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    328.52        .36285E-03** at limit **
   2  Prefactor     .10000E-03    1.2372        .17700E-03** at limit **
   3  Prefactor     1.2764        15.859        .15719E-04    .50627E-05
   4  Prefactor     .10000E-03    4.0401        .32012E-03** at limit **
   5  Prefactor     .10003E-03    58.661        .16495    ** at limit **
   6  Prefactor     .10000E-03    15.614        .36285E-03** at limit **
   7  Prefactor     2.5292        2.4067        .47242E-05    .27241E-03
   8  Prefactor     .65372E-01    40.367        .90758E-04    .56995E-04
   9  Prefactor     .10000E-03    22.791        .43922E-03** at limit **
  10  norm          9.0212        1.7465        .87009E-05    .11963E-02
  11  Prefactor     .10000E-03    7.3879        .36285E-03** at limit **
  12  norm          .10000E-03    .65225        .25284E-04** at limit **
  13  Prefactor     .10000E-03    12.759        .36285E-03** at limit **
  14  Prefactor     12.991        4.2102        .35879E-05    .16033E-03
  15  norm          .10000E-03    4.0634        .32132E-03** at limit **
  16  Prefactor     .10000E-03    8.2328        .36285E-03** at limit **
  17  Prefactor     1.0604        9.3453        .92825E-04   -.30619E-05
  18  Prefactor     3.7011        4.1264        .66513E-05    .22904E-04
  19  Prefactor     6.0592        14.917        .65224E-05    .20916E-05
  20  Prefactor     1.9702        27.846        .11779E-04    .57909E-06
  21  Prefactor     .10000E-03    4.8278        .34724E-03** at limit **
  22  Prefactor     48.855        45.216        .22948E-05    .99083E-06
  23  Normalizat    .88965        .22319        .12094E-04    .19271E-03
  24  Prefactor     1.2020        .18592        .45704E-04    .19407E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.27638
  Prefactor  = 0.0001
  Prefactor  = 0.00010003
  Prefactor  = 0.0001
  Prefactor  = 2.52921
  Prefactor  = 0.0653719
  Prefactor  = 0.000100001
  norm       = 9.02115
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 12.9911
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.06037
  Prefactor  = 3.70109
  Prefactor  = 6.05923
  Prefactor  = 1.97022
  Prefactor  = 0.0001
  Prefactor  = 48.8548
  Normalizat = 0.889652
  Prefactor  = 1.20199
 **********
 **   18 **HESSE 
 **********

 FCN=   6663.051     FROM HESSE     STATUS=OK           383 CALLS     5325 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    328.52        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.2372        .35401E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.2764        15.862        .31438E-05   -1.5482    
   4  Prefactor     .10000E-03    4.0401        .64025E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10003E-03    57.747        .16665       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    15.614        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     2.5292        2.4065        .94485E-06   -1.5390    
   8  Prefactor     .65372E-01    40.248        .36303E-05   -1.5657    
   9  Prefactor     .10000E-03    22.803        .87843E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          9.0212        1.7457        .17402E-05   -1.5107    
  11  Prefactor     .10000E-03    7.3879        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    .65224        .50568E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    12.759        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.991        4.2092        .71758E-06   -1.4987    
  15  norm          .10000E-03    4.0634        .64265E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    8.2328        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     1.0604        9.3395        .37130E-05   -1.5502    
  18  Prefactor     3.7011        4.1254        .13303E-05   -1.5323    
  19  Prefactor     6.0592        14.919        .13045E-05   -1.5216    
  20  Prefactor     1.9702        27.850        .23559E-05   -1.5427    
  21  Prefactor     .10000E-03    4.8279        .69447E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     48.855        44.794        .45896E-06   -1.4309    
  23  Normalizat    .88965        .22322        .24187E-05   -.96825    
  24  Prefactor     1.2020        .18583        .91407E-05   -.86270    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.42364e-10
Minuit parameter uncertainties:
  1  2.17892e-05
  2  8.54218e-08
  3  9.00166
  4  3.38451e-07
  5  0.00263695
  6  8.07303e-07
  7  2.40664
  8  3.24384
  9  0.000220751
  10  1.74574
  11  3.10335e-08
  12  2.46356e-08
  13  2.2339e-06
  14  4.20926
  15  6.04498e-08
  16  2.61494e-07
  17  6.29494
  18  4.12568
  19  14.9282
  20  14.823
  21  1.44768e-06
  22  44.825
  23  0.223451
  24  0.185928
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.299e+01  4.209e+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.202e+00  1.859e-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.897e-01  2.235e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 19.56
Ra Dec: 60.487 -20.580
Photon Index (Fixed Index): 2.31 +/- 0.00
Photon Flux (Fixed Index): 1.70e-07 +/- 5.52e-08
Energy Flux (Fixed Index): 6.36e-05 +/- 2.06e-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) = 6662.9971196
delta logL = 0.0540484183994

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6662.97149897
delta logL = 0.0796690475272

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.163       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2017       1.0000          .0000       10.000    
     3 'Normalizat'    .90231       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1948       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6662.971     FROM MIGRAD    STATUS=CONVERGED     97 CALLS      284 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.164        5.3804        .47355E-03   -.42901E-04
   2  Index         2.2018        .26932        .40246E-02    .38492E-03
   3  Normalizat    .90245        .21474        .30045E-03    .64326E-05
   4  Prefactor     1.1947        .18402        .22909E-03    .86349E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.1641
  Index      = 2.20183
  Normalizat = 0.902446
  Prefactor  = 1.19474
 **********
 **   18 **HESSE 
 **********

 FCN=   6662.971     FROM HESSE     STATUS=OK            27 CALLS      311 TOTAL
                     EDM=   .53E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.164        5.2961        .18942E-04   -1.4955    
   2  Index         2.2018        .26499        .80492E-03   -.59394    
   3  Normalizat    .90245        .21488        .12018E-04   -.96374    
   4  Prefactor     1.1947        .18413        .91635E-05   -.86493    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.28864e-13
Minuit parameter uncertainties:
  1  5.29629
  2  0.265175
  3  0.21508
  4  0.184228
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/165879': 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) = 6662.97149836
delta logL = 0.0796696548277

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.416e+01  5.296e+00  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.202e+00  2.652e-01  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.195e+00  1.842e-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:  9.024e-01  2.151e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 19.60
Ra Dec: 60.487 -20.580
Photon Index (Free Index): 2.20 +/- 0.27
Photon Flux (Free Index): 1.59e-07 +/- 5.94e-08
Energy Flux (Free Index): 7.13e-05 +/- 3.17e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/165879/cmap_HighResolution_617500801_617760001_4FGL_J0401.9-2034_daily_bin1459.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.70e-07', energy_flux2='7.13e-05', photon_flux_error='5.52e-08', dlogl='7.97e-02', energy_flux='6.36e-05', photon_flux2='1.59e-07', job_status='DONE', time_completed='2021-08-19 23:56:23.165689', photon_index_error2='0.27', photon_index2='2.20', ts='19.56', fit_tolerance='1e-08', GAL='1.20', photon_index_error='0.00', energy_flux_error2='3.17e-05', EG='0.89', time_epoch_completed='1629442583.17', return_code='0', job_id='165879', GAL2='1.19', EG2='0.90', return_code2='0', energy_flux_error='2.06e-05', photon_flux_error2='5.94e-08', ts2='19.60', photon_index='2.31' WHERE bin_id='1459' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug 19 23:56:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0031>
Subject: Job 165879: <4FGL_J0401.9-2034_daily_bin1459> in cluster <slac> Done

Job <4FGL_J0401.9-2034_daily_bin1459> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Aug 19 23:40:25 2021
Job was executed on host(s) <bullet0031>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug 19 23:40:27 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:27 2021
Terminated at Thu Aug 19 23:56:24 2021
Results reported at Thu Aug 19 23:56:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0401.9-2034_daily_bin1459 60.4867 -20.5804 617500801 617760001 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 :                                   832.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             336.93 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   956 sec.
    Turnaround time :                            959 sec.

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

