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


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1035
RA = 60.4867, Dec = -20.5804
tmin = 507600001, tmax = 507859201
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='163122', job_status='RUN', time_executed='2021-08-19 23:34:19.773092', time_epoch_executed='1629441259.77' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1035'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/163122

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/163122/ft1_4FGL_J0401.9-2034_daily_bin1035.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/163122/ft1_4FGL_J0401.9-2034_daily_bin1035.fits outfile=/scratch/kocevski/163122/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1035.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=507600001.0 tmax=507859201.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 12.48
user 3.35
sys 9.08

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.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/163122/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1035.fits evtable="EVENTS" outfile="/scratch/kocevski/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.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 9.45
user 0.32
sys 9.09

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits" evtable="EVENTS" scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits sctable="SC_DATA" outfile=/scratch/kocevski/163122/ltcube_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.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/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits
.....................!
real 22.66
user 12.24
sys 10.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits evtable="EVENTS" scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits sctable="SC_DATA" expcube=/scratch/kocevski/163122/ltcube_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.fits outfile=/scratch/kocevski/163122/expmap_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.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/163122/ltcube_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.fits
.....................!
real 202.12
user 185.77
sys 15.99

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/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits outfile=/scratch/kocevski/163122/cmap_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.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 9.28
user 0.36
sys 8.89

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits outfile=/scratch/kocevski/163122/cmap_HighResolution_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.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 9.31
user 0.38
sys 8.90

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits evtable="EVENTS" scfile=/scratch/kocevski/163122/ft2_4FGL_J0401.9-2034_daily_bin1035.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/163122/Model_4FGL_J0401.9-2034_daily_bin1035.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/163122/ft1_filtered_4FGL_J0401.9-2034_daily_bin1035.fits.....................!
real 126.38
user 113.23
sys 12.91

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .25193E-02   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.0969       1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.5826       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10468E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.2633       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .85020       1.0000         .10000E-03   10000.    
    11 'Prefactor '    16.867       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .12087E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10386E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .22217E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    18.846       1.0000         .10000E-03   10000.    
    20 'Prefactor '    15.400       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    12.892       1.0000         .10000E-03   10000.    
    23 'Normalizat'    1.1813       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .84587       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=   4930.126     FROM MIGRAD    STATUS=CONVERGED    557 CALLS     2735 TOTAL
                     EDM=   .57E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    92.002        .39653E-04** at limit **
   2  Prefactor     .10000E-03    2.4352       -.21775E-06** at limit **
   3  Prefactor     5.1017        12.928        .25047E-05   -.21965E-04
   4  Prefactor     4.5882        16.732        .23274E-05   -.51649E-04
   5  Prefactor     .10000E-03    24.740        .69618E-08** at limit **
   6  Prefactor     .10000E-03    137.39       -.28756E-04** at limit **
   7  Prefactor     2.2630        2.2200       -.16627E-07   -.18393E-03
   8  Prefactor     .10000E-03    1.8719       -.12979E-06** at limit **
   9  Prefactor     .10000E-03    2.3476       -.36908E-07** at limit **
  10  norm          .85046        .82134       -.10118E-07   -.55283E-04
  11  Prefactor     16.858        20.046        .24241E-06    .31418E-04
  12  norm          .10000E-03    .33980        .81421E-07** at limit **
  13  Prefactor     .10000E-03    10.484        .65510E-06** at limit **
  14  Prefactor     .10000E-03    2.0692        .12299E-06** at limit **
  15  norm          .10000E-03    5.4849       -.33621E-06** at limit **
  16  Prefactor     .10000E-03    75.008       -.22671E-04** at limit **
  17  Prefactor     .10000E-03    3.0107       -.35003E-07** at limit **
  18  Prefactor     .10000E-03    3.1854        .18952E-07** at limit **
  19  Prefactor     18.844        21.100       -.79765E-06   -.13739E-04
  20  Prefactor     15.403        18.452        .27529E-06   -.36355E-05
  21  Prefactor     .10000E-03    2.1913       -.79179E-07** at limit **
  22  Prefactor     12.902        47.109        .14281E-04   -.26481E-05
  23  Normalizat    1.1811        .19143       -.21396E-07    .18131E-03
  24  Prefactor     .84579        .15957       -.56930E-06    .18990E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.10166
  Prefactor  = 4.58822
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.263
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.850463
  Prefactor  = 16.8582
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.8436
  Prefactor  = 15.403
  Prefactor  = 0.0001
  Prefactor  = 12.9024
  Normalizat = 1.18109
  Prefactor  = 0.845786
 **********
 **   18 **HESSE 
 **********

 FCN=   4930.126     FROM HESSE     STATUS=OK           395 CALLS     3130 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    92.304        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    23.576        .21021E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.1017        12.762        .17809E-03   -1.5256    
   4  Prefactor     4.5882        16.680        .18804E-03   -1.5280    
   5  Prefactor     .10000E-03    24.754        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    138.41        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     2.2630        2.2075        .99387E-04   -1.5407    
   8  Prefactor     .10000E-03    1.8833        .93750E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.3915        .10497E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .85046        .80679        .59931E-04   -1.5524    
  11  Prefactor     16.858        20.047        .97520E-04   -1.4887    
  12  norm          .10000E-03    .34158        .39949E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    10.501        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.1583        .19702E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    5.4962        .16060E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    75.868        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    3.0192        .11896E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    6.1672        .24073E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     18.844        21.100        .92261E-04   -1.4840    
  20  Prefactor     15.403        18.456        .10206E-03   -1.4923    
  21  Prefactor     .10000E-03    2.1934        .10151E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     12.902        47.012        .11156E-03   -1.4989    
  23  Normalizat    1.1811        .22003        .23730E-03   -.87189    
  24  Prefactor     .84579        .18397        .23217E-03   -.98062    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.2605e-10
Minuit parameter uncertainties:
  1  2.14458e-05
  2  0.000132398
  3  12.769
  4  16.697
  5  4.49072e-06
  6  0.000159495
  7  2.20759
  8  1.76506e-06
  9  3.06849e-06
  10  0.806802
  11  20.0546
  12  2.18715e-07
  13  4.70231e-07
  14  3.60707e-06
  15  5.98627e-06
  16  0.000409929
  17  7.94906e-07
  18  3.31994e-05
  19  21.1085
  20  18.4625
  21  1.0048e-06
  22  47.1478
  23  0.2202
  24  0.184104
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  3.607e-06  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:  8.458e-01  1.841e-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:  1.181e+00  2.202e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/163122/likelihoodResults_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.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) = 4930.12835214
delta logL = -0.00221065225651

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4930.12614188
delta logL = -4.01052602683e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10197E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2923       1.0000          .0000       10.000    
     3 'Normalizat'    1.1811       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84580       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.

 FCN=   4930.126     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      242 TOTAL
                     EDM=   .63E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10073E-03    21.319        .19930E-02** at limit **
   2  Index         2.2472        6.4218        .50000        .47282E-04
   3  Normalizat    1.1811        .15485E-01    .23730E-03   -.12247E-03
   4  Prefactor     .84579        .13120E-01    .23217E-03   -.85789E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100727
  Index      = 2.24719
  Normalizat = 1.18109
  Prefactor  = 0.845785
 **********
 **   18 **HESSE 
 **********

 FCN=   4930.126     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      271 TOTAL
                     EDM=   .30E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10073E-03    95.401        .39860E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2472        7.6550        .50000       -.58304    
   3  Normalizat    1.1811        .34035E-01    .47460E-04   -.87189    
   4  Prefactor     .84579        .28834E-01    .92869E-05   -.98062    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.03046e-08
Minuit parameter uncertainties:
  1  0.0166881
  2  327.63
  3  0.0340355
  4  0.0288342
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/163122': 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) = 4930.12614079
delta logL = 6.95526978234e-07

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.007e-04  1.669e-02  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.247e+00  3.276e+02  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:  8.458e-01  2.883e-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:  1.181e+00  3.404e-02  1.000e-02  1.000e+01 ( 1.000e+00)


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

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/163122/cmap_HighResolution_507600001_507859201_4FGL_J0401.9-2034_daily_bin1035.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.82e-03', job_status='DONE', photon_flux_upper_limit='7.58e-08', time_completed='2021-08-19 23:46:51.145618', job_id='163122', GAL2='0.85', fit_tolerance='1e-08', EG2='1.18', EG='1.18', time_epoch_completed='1629442011.15', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.85', dlogl='6.96e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1035' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug 19 23:46:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0222>
Subject: Job 163122: <4FGL_J0401.9-2034_daily_bin1035> in cluster <slac> Done

Job <4FGL_J0401.9-2034_daily_bin1035> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Aug 19 23:30:42 2021
Job was executed on host(s) <bullet0222>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug 19 23:30:45 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:30:45 2021
Terminated at Thu Aug 19 23:46:53 2021
Results reported at Thu Aug 19 23:46:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0401.9-2034_daily_bin1035 60.4867 -20.5804 507600001 507859201 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 :                                   887.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             237.10 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   967 sec.
    Turnaround time :                            971 sec.

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

