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


Performing analysis on: 4FGL_J1407.6-4301_daily_bin1252
RA = 211.919, Dec = -43.0234
tmin = 563846401, tmax = 564105601
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='215359', job_status='RUN', time_executed='2021-09-09 02:40:45.962471', time_epoch_executed='1631180445.96' WHERE source_name='4FGL J1407.6-4301' and cadence='daily' and bin_id='1252'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/215359

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/215359/ft1_4FGL_J1407.6-4301_daily_bin1252.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/215359/ft1_4FGL_J1407.6-4301_daily_bin1252.fits outfile=/scratch/kocevski/215359/ft1_filteredMKT_4FGL_J1407.6-4301_daily_bin1252.fits ra=211.919 dec=-43.0234 rad=12.0 tmin=563846401.0 tmax=564105601.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 2.83
user 2.64
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.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/215359/ft1_filteredMKT_4FGL_J1407.6-4301_daily_bin1252.fits evtable="EVENTS" outfile="/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.49
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits" evtable="EVENTS" scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits sctable="SC_DATA" outfile=/scratch/kocevski/215359/ltcube_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.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/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits
.....................!
real 12.09
user 11.73
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits evtable="EVENTS" scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits sctable="SC_DATA" expcube=/scratch/kocevski/215359/ltcube_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits outfile=/scratch/kocevski/215359/expmap_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.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/215359/ltcube_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits
.....................!
real 189.67
user 185.37
sys 3.96

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 CenA Lobes in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CenALobes.fits is the correct path to the extended template.
Extended source HESS J1356-645 in ROI with RadialDisk spatial model.
Extended source FGES J1409.1-6121 in ROI with RadialDisk spatial model.
Extended source HESS J1420-607 in ROI with RadialDisk spatial model.
Extended source RCW 86 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/RCW86.fits is the correct path to the extended template.
Extended source FHES J1501.0-6310 in ROI with RadialGaussian spatial model.
Extended source HESS J1507-622 in ROI with RadialDisk spatial model.
Extended source MSH 15-52 in ROI with RadialDisk spatial model.
Extended source HESS J1534-571 in ROI with RadialDisk spatial model.
Extended source MSH 15-56 PWN in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/MSH15-56_PWN.fits is the correct path to the extended template.
Extended source MSH 15-56 SNR in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/MSH15-56_SNRmask.fits is the correct path to the extended template.
Extended source FGES J1553.8-5325 in ROI with RadialDisk spatial model.
Added 293 point sources and 12 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 J1407.6-4301 @ 211.919 -43.0234

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits outfile=/scratch/kocevski/215359/cmap_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=211.919 yref=-43.0234 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.53
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits outfile=/scratch/kocevski/215359/cmap_HighResolution_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=211.919 yref=-43.0234 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.53
user 0.36
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits evtable="EVENTS" scfile=/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/215359/Model_4FGL_J1407.6-4301_daily_bin1252.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 CenA Lobes
adding source EG_v02
adding source FGES J1409.1-6121
adding source FGES J1553.8-5325
adding source FHES J1501.0-6310
adding source GAL_V02
adding source HESS J1356-645
adding source HESS J1420-607
adding source HESS J1507-622
adding source HESS J1534-571
adding source MSH 15-52
adding source MSH 15-56 PWN
adding source MSH 15-56 SNR
adding source RCW 86
Working on...
/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits.........................!
real 49.57
user 48.26
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits', '/scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits', expMap='/scratch/kocevski/215359/expmap_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits', expCube='/scratch/kocevski/215359/ltcube_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/215359/Model_4FGL_J1407.6-4301_daily_bin1252.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1407.6-4301'

4FGL J1407.6-4301
   Spectrum: PowerLaw
442    Prefactor:  9.218e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
443        Index:  2.103e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
444        Scale:  2.249e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/215359/ft1_filtered_4FGL_J1407.6-4301_daily_bin1252.fits
Spacecraft file(s): /scratch/kocevski/215359/ft2_4FGL_J1407.6-4301_daily_bin1252.fits
Exposure map: /scratch/kocevski/215359/expmap_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits
Exposure cube: /scratch/kocevski/215359/ltcube_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/215359/Model_4FGL_J1407.6-4301_daily_bin1252.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) = 657.937434509

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    9.5703       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10179E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    106.19       1.0000         .10000E-03   10000.    
     6 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .83431E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10272E-01   1.0000         .10000E-03   10000.    
    10 'Prefactor '   10000.0       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .23050E-02   1.0000         .10000E-03   10000.    
    12 'norm      '    .10957E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .12624E-01   1.0000         .10000E-03   10000.    
    14 'norm      '    10000.       1.0000         .10000E-03   10000.    
    15 'Prefactor '   10000.0       1.0000         .10000E-03   10000.    
    16 'norm      '    9999.9       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .28884E-01   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10090E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    .10002E-01   1.0000         .10000E-01   10.000    
    20 'Prefactor '    .14528       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1077E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   657.1996     FROM MIGRAD    STATUS=CONVERGED    799 CALLS     2813 TOTAL
                     EDM=   .20E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.2079        .12802E-07** at limit **
   2  norm          .10000E-03    9.1352       -.43054E-07** at limit **
   3  Prefactor     9.5710        8.7297        .28685E-06    .14209E-02
   4  Prefactor     .10413E-03    248.58       -.24385E-05** at limit **
   5  Prefactor     106.21        5.2316       -.48718E-07   -.17722E-02
   6  norm          .10002E-03    59.041       -.68320E-06** at limit **
   7  Prefactor     .10194E-03    125.95       -.20217E-05** at limit **
   8  Prefactor     .12064E-03    39.318        .73816E-06** at limit **
   9  Prefactor     .78738E-02    8.3086        .56243E-06    .27259E-03
  10  Prefactor    10000.0        26.660       -.97360E-06** at limit **
  11  Prefactor     .19598E-03    122.16        .11393E-05** at limit **
  12  norm          .59969E-03    529.11        .21637E-05** at limit **
  13  Prefactor     .94855E-03    307.87        .31194E-05** at limit **
  14  norm         10000.0        85.796       -.64197E-05** at limit **
  15  Prefactor    10000.0        2.1824       -.27917E-06   -.14139E-03
  16  norm          9999.9        17.934       -.83585E-06   -.38361E-03
  17  Prefactor     .75822E-02    326.40        .34271E-05    .11568E-02
  18  Prefactor     .10253E-03    87.947       -.45546E-05** at limit **
  19  Normalizat    .10000E-01    1.9334        .18280E-05** at limit **
  20  Prefactor     .14529        .66893E-01   -.92710E-07   -.54150E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 9.57099
  Prefactor  = 0.000104128
  Prefactor  = 106.21
  norm       = 0.000100016
  Prefactor  = 0.000101945
  Prefactor  = 0.000120645
  Prefactor  = 0.00787375
  Prefactor  = 10000
  Prefactor  = 0.000195975
  norm       = 0.000599686
  Prefactor  = 0.000948547
  norm       = 10000
  Prefactor  = 9999.99
  norm       = 9999.91
  Prefactor  = 0.00758216
  Prefactor  = 0.000102526
  Normalizat = 0.01
  Prefactor  = 0.145294
 **********
 **   18 **HESSE 
 **********

 FCN=   657.1996     FROM HESSE     STATUS=OK           317 CALLS     3130 TOTAL
                     EDM=   .65E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.2095        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    9.1334        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     9.5710        8.7415        .32385E-02   -1.5089    
   4  Prefactor     .10413E-03    249.86        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     106.21        176.57        .97563E-03   -1.3643    
   6  norm          .10002E-03    59.079        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10194E-03    126.64        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .12064E-03    1248.9        .10438E-01   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .78738E-02    9563.4        .90743E-02   -1.5690    
  10  Prefactor    10000.0        6989.9        .99912E-02    1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .19598E-03    1059.3        .10049E-01   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .59969E-03    824.76        .90712E-02   -1.5712    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .94855E-03    2023.8        .90860E-02   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm         10000.0        85.908        .90712E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor    10000.0        9456.0        .90828E-02    1.5687    
  16  norm          9999.9        9117.5        .95414E-02    1.5647    
  17  Prefactor     .75822E-02    6643.7        .91665E-02   -1.5691    
  18  Prefactor     .10253E-03    88.480        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .10000E-01    .92973        .19466       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .14529        .84033E-01    .34426E-01   -1.3291    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.52385e-06
Minuit parameter uncertainties:
  1  1.36969e-05
  2  5.18632e-05
  3  8.74265
  4  0.0645053
  5  177.457
  6  0.00196057
  7  0.0314559
  8  0.328235
  9  22.4249
  10  3.60198
  11  0.64953
  12  1.30227
  13  2.71847
  14  0.0148673
  15  39.1555
  16  122.988
  17  10.5782
  18  0.0299438
  19  2.25611e-05
  20  0.0841023
Done.

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

Extracting fit parameters...

4FGL J1407.6-4301
   Spectrum: PowerLaw
442    Prefactor:  1.000e+04  3.602e+00  1.000e-04  1.000e+04 ( 1.000e-14)
443        Index:  2.103e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
444        Scale:  2.249e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1048    Prefactor:  1.453e-01  8.410e-02  0.000e+00  1.000e+01 ( 1.000e+00)
1049        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1050        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1035   Normalization:  1.000e-02  2.256e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.32
Ra Dec: 211.919 -43.023
Photon Index (Fixed Index): 2.10 +/- 0.00
Photon Flux (Fixed Index): 6.32e-06 +/- 2.28e-09
Energy Flux (Fixed Index): 3.45e-03 +/- 1.24e-06
calc_int error: parameter max 10000.0 is not large enough
delta logLike = 7.4466015576e-08

TS (Fixed Index): 3.33
Ra Dec: 211.919 -43.023
Photon Flux Upper Limit: -1.00e+00 ph cm-2 s-1
Energy Flux Upper Limit: -7.56e+04 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/215359/likelihoodResults_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.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) = 600.351291356
delta logL = 56.8482865558

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 600.351261535
delta logL = 56.8483163767

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Index     '    4.8780       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1077E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   600.3513     FROM MIGRAD    STATUS=CONVERGED     14 CALLS       70 TOTAL
                     EDM=   .52E-13    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1    Index       4.8780        .69035E-01    .74558E-02    .16495E-04
                               ERR DEF=  .500    
Final values: 
  Index      = 4.87797
 **********
 **   18 **HESSE 
 **********

 FCN=   600.3513     FROM HESSE     STATUS=OK             7 CALLS       77 TOTAL
                     EDM=   .14E-17    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1    Index       4.8780        .69072E-01    .33062E-04   -.24408E-01
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41124e-18
Minuit parameter uncertainties:
  1  0.0690746
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/215359': 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) = 600.351261534
delta logL = 56.8483163777

Extracting fit parameters...

4FGL J1407.6-4301
   Spectrum: PowerLaw
442    Prefactor:  1.000e+04  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14) fixed
443        Index:  4.878e+00  6.907e-02  0.000e+00  1.000e+01 (-1.000e+00)
444        Scale:  2.249e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1048    Prefactor:  1.451e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
1049        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1050        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1035   Normalization:  1.014e-02  0.000e+00  1.000e-02  1.000e+01 ( 1.000e+00) fixed


TS (Free Index): 117.02
Ra Dec: 211.919 -43.023
Photon Index (Free Index): 4.88 +/- 0.07
Photon Flux (Free Index): 1.02e-02 +/- 2.00e-03
Energy Flux (Free Index): 1.37e+00 +/- 2.61e-01

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/215359/cmap_HighResolution_563846401_564105601_4FGL_J1407.6-4301_daily_bin1252.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='-7.56e+04', comment='SUCCESS', photon_flux='6.32e-06', energy_flux2='1.37e+00', photon_flux_error='2.28e-09', dlogl='5.68e+01', energy_flux='3.45e-03', photon_flux2='1.02e-02', job_status='DONE', time_completed='2021-09-09 02:48:27.499577', photon_index_error2='0.07', photon_index2='4.88', ts='3.32', fit_tolerance='1e-08', GAL='0.15', photon_index_error='0.00', photon_flux_upper_limit='-1.00e+00', energy_flux_error2='2.61e-01', EG='0.01', time_epoch_completed='1631180907.5', return_code='0', job_id='215359', GAL2='0.15', EG2='0.01', return_code2='0', energy_flux_error='1.24e-06', photon_flux_error2='2.00e-03', ts2='117.02', photon_index='2.10' WHERE bin_id='1252' AND source_name='4FGL J1407.6-4301' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  9 02:48:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0134>
Subject: Job 215359: <4FGL_J1407.6-4301_daily_bin1252> in cluster <slac> Done

Job <4FGL_J1407.6-4301_daily_bin1252> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Sep  9 02:40:25 2021
Job was executed on host(s) <bullet0134>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  9 02:40:26 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  9 02:40:26 2021
Terminated at Thu Sep  9 02:48:28 2021
Results reported at Thu Sep  9 02:48:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1407.6-4301_daily_bin1252 211.919 -43.0234 563846401 564105601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1407.6-4301 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   455.20 sec.
    Max Memory :                                 1259 MB
    Average Memory :                             328.29 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   481 sec.
    Turnaround time :                            483 sec.

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

