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


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1056
RA = 60.4867, Dec = -20.5804
tmin = 513043201, tmax = 513302401
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='163151', job_status='RUN', time_executed='2021-08-19 23:33:41.301656', time_epoch_executed='1629441221.3' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1056'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/163151

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/163151/ft1_4FGL_J0401.9-2034_daily_bin1056.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/163151/ft1_4FGL_J0401.9-2034_daily_bin1056.fits outfile=/scratch/kocevski/163151/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1056.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=513043201.0 tmax=513302401.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.73
user 6.11
sys 6.56

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits" evtable="EVENTS" scfile=/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits sctable="SC_DATA" outfile=/scratch/kocevski/163151/ltcube_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.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/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits
.....................!
real 21.88
user 14.71
sys 7.07

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits evtable="EVENTS" scfile=/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits sctable="SC_DATA" expcube=/scratch/kocevski/163151/ltcube_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.fits outfile=/scratch/kocevski/163151/expmap_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.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/163151/ltcube_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.fits
.....................!
real 198.36
user 185.30
sys 12.63

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/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits scfile=/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits outfile=/scratch/kocevski/163151/cmap_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.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 6.77
user 0.37
sys 6.26

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits scfile=/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits outfile=/scratch/kocevski/163151/cmap_HighResolution_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.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 6.76
user 0.37
sys 6.27

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits evtable="EVENTS" scfile=/scratch/kocevski/163151/ft2_4FGL_J0401.9-2034_daily_bin1056.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/163151/Model_4FGL_J0401.9-2034_daily_bin1056.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/163151/ft1_filtered_4FGL_J0401.9-2034_daily_bin1056.fits.....................!
real 102.13
user 92.26
sys 9.56

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.4959       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.2261       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10349E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10457E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    8.8777       1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.941       1.0000         .10000E-03   10000.    
    12 'norm      '    .10420E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .13707E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10169E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10151E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    15.955       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .25490E-02   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10170E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    23.888       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .12755       1.0000         .10000E-03   10000.    
    22 'Prefactor '    58.663       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .73509       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.2781       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=   4098.980     FROM MIGRAD    STATUS=CONVERGED    570 CALLS     2768 TOTAL
                     EDM=   .54E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    90.047       -.83126E-05** at limit **
   2  Prefactor     .10000E-03    1.3848        .61512E-07** at limit **
   3  Prefactor     .10000E-03    7.6607        .80173E-07** at limit **
   4  Prefactor     6.4984        13.778        .18349E-05   -.65335E-04
   5  Prefactor     .10000E-03    91.796        .10717E-05** at limit **
   6  Prefactor     .10000E-03    26.919        .45571E-06** at limit **
   7  Prefactor     2.2249        3.1309        .33556E-06   -.49472E-03
   8  Prefactor     .10000E-03    5.4522       -.22107E-07** at limit **
   9  Prefactor     .10000E-03    4.3202       -.50150E-07** at limit **
  10  norm          8.8810        2.2031       -.25282E-07   -.35170E-03
  11  Prefactor     32.920        35.547       -.37626E-05   -.25607E-03
  12  norm          .10000E-03    1.1399        .10408E-06** at limit **
  13  Prefactor     .10000E-03    133.52        .34102E-04** at limit **
  14  Prefactor     .10000E-03    2.3431       -.10207E-06** at limit **
  15  norm          .10000E-03    6.7743       -.19494E-06** at limit **
  16  Prefactor     16.009        37.553        .31507E-04   -.29282E-04
  17  Prefactor     .10081E-03    10.546        .17066E-05** at limit **
  18  Prefactor     .10000E-03    4.6301        .10536E-06** at limit **
  19  Prefactor     .10000E-03    13.982       -.49879E-06** at limit **
  20  Prefactor     23.884        35.624       -.19829E-06   -.19037E-04
  21  Prefactor     .12968        7.4335       -.73745E-06   -.22788E-03
  22  Prefactor     58.711        71.906        .45566E-04   -.17863E-05
  23  Normalizat    .73386        .24231       -.86652E-05   -.27597E-03
  24  Prefactor     1.2788        .20088       -.97321E-06   -.44986E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.49839
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.22488
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 8.88099
  Prefactor  = 32.9198
  norm       = 0.0001
  Prefactor  = 0.000100005
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 16.0088
  Prefactor  = 0.000100812
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.8837
  Prefactor  = 0.129683
  Prefactor  = 58.7114
  Normalizat = 0.733858
  Prefactor  = 1.27879
 **********
 **   18 **HESSE 
 **********

 FCN=   4098.980     FROM HESSE     STATUS=OK           399 CALLS     3167 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    90.039        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.3854        .73579E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.6773        .17307E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     6.4984        13.776        .15746E-03   -1.5198    
   5  Prefactor     .10000E-03    91.939        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    26.937        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     2.2249        3.0292        .12427E-03   -1.5410    
   8  Prefactor     .10000E-03    5.5042        .14569E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    4.3959        .12972E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          8.8810        2.2118        .44281E-04   -1.5112    
  11  Prefactor     32.920        35.558        .69817E-04   -1.4560    
  12  norm          .10000E-03    12.753        .12589E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    136.97        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.3780        .95571E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    6.7775        .16275E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     16.009        37.556        .10027E-03   -1.4908    
  17  Prefactor     .10081E-03    13.955        .56373E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    4.8029        .26885E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    14.008        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     23.884        35.681        .81957E-04   -1.4730    
  21  Prefactor     .12968        73.342        .33802E-02   -1.5636    
  22  Prefactor     58.711        71.886        .52381E-04   -1.4174    
  23  Normalizat    .73386        .27857        .32531E-03   -1.0257    
  24  Prefactor     1.2788        .23440        .21854E-03   -.83940    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.87695e-09
Minuit parameter uncertainties:
  1  4.70928e-05
  2  3.13408e-06
  3  2.64664e-05
  4  13.7828
  5  0.000232839
  6  5.27051e-05
  7  3.02943
  8  1.83835e-06
  9  1.67159e-05
  10  2.21177
  11  35.5814
  12  2.16566e-05
  13  0.00162959
  14  9.33835e-06
  15  5.4238e-05
  16  37.6111
  17  0.00673524
  18  1.08993e-05
  19  0.000115015
  20  35.7128
  21  6.17329
  22  71.9928
  23  0.279111
  24  0.234589
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  9.338e-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:  1.279e+00  2.346e-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:  7.339e-01  2.791e-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: 1.05e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.10e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/163151/likelihoodResults_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.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) = 4098.98189866
delta logL = -0.00199459127361

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4098.97990417
delta logL = -1.00119905255e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3179       1.0000          .0000       10.000    
     3 'Normalizat'    .73389       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2788       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=   4098.980     FROM MIGRAD    STATUS=FAILED        87 CALLS      242 TOTAL
                     EDM=   .78E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10106E-03    150.39        .95802E-03** at limit **
   2  Index         2.4019        8.6722        .50000       -.24540E-04
   3  Normalizat    .73386        .50852E-01    .32531E-03   -.16845E-04
   4  Prefactor     1.2788        .44079E-01    .21854E-03   -.14972E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4098.980     FROM SIMPLEX   STATUS=UNCHANGED    135 CALLS      377 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10106E-03    150.39        .28118E-03** at limit **
   2  Index         2.4019        8.6722        .10949E-03   -.24540E-04
   3  Normalizat    .73386        .50852E-01    .27519E-05   -.16845E-04
   4  Prefactor     1.2788        .44079E-01    .15153E-05   -.14972E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4098.980     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      420 TOTAL
                     EDM=   .13E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    19.002        .19160E-02** at limit **
   2  Index         2.7767        8.4880        .50000        .22897E-07
   3  Normalizat    .73386        .16472E-01    .13012E-04   -.53120E-04
   4  Prefactor     1.2788        .14295E-01    .43707E-04   -.11502E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.7767
  Normalizat = 0.733858
  Prefactor  = 1.27879
 **********
 **   18 **HESSE 
 **********

 FCN=   4098.980     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      449 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    164.95        .38321E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.7767        8.4799        .50000       -.46080    
   3  Normalizat    .73386        .52371E-01    .26025E-05   -1.0257    
   4  Prefactor     1.2788        .45219E-01    .87414E-05   -.83940    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.26581e-11
Minuit parameter uncertainties:
  1  4.18764e-06
  2  723.981
  3  0.0523741
  4  0.0452208
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/163151': 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) = 4098.97990245
delta logL = 1.61992102221e-06

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  4.188e-06  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.777e+00  7.240e+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:  1.279e+00  4.522e-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.339e-01  5.237e-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/163151/cmap_HighResolution_513043201_513302401_4FGL_J0401.9-2034_daily_bin1056.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.10e-03', job_status='DONE', photon_flux_upper_limit='1.05e-07', time_completed='2021-08-19 23:45:02.382874', job_id='163151', GAL2='1.28', fit_tolerance='1e-08', EG2='0.73', EG='0.73', time_epoch_completed='1629441902.38', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.28', dlogl='1.62e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1056' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug 19 23:45:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0057>
Subject: Job 163151: <4FGL_J0401.9-2034_daily_bin1056> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0401.9-2034_daily_bin1056 60.4867 -20.5804 513043201 513302401 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 :                                   772.11 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             268.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   856 sec.
    Turnaround time :                            859 sec.

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

