/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 22 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 = 7638
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1290
RA = 310.136, Dec = -17.0901
tmin = 573696001, tmax = 573955201
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='113109', job_status='RUN', time_executed='2021-09-25 16:01:18.040548', time_epoch_executed='1632610878.04' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1290'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113109

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113109/ft1_4FGL_J2040.5-1705_daily_bin1290.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113109/ft1_4FGL_J2040.5-1705_daily_bin1290.fits outfile=/scratch/kocevski/113109/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1290.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=573696001.0 tmax=573955201.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 4.52
user 4.21
sys 0.27

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.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/113109/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1290.fits evtable="EVENTS" outfile="/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.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.52
user 0.34
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits" evtable="EVENTS" scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits sctable="SC_DATA" outfile=/scratch/kocevski/113109/ltcube_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.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/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits
.....................!
real 14.68
user 14.25
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits evtable="EVENTS" scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits sctable="SC_DATA" expcube=/scratch/kocevski/113109/ltcube_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits outfile=/scratch/kocevski/113109/expmap_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.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/113109/ltcube_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits
.....................!
real 192.59
user 185.45
sys 6.24

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
Added 181 point sources and 0 extended sources

Setting source of interest to:
4FGL J2040.5-1705 @ 310.136 -17.0901

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits outfile=/scratch/kocevski/113109/cmap_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.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=310.136 yref=-17.0901 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 2.27
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits outfile=/scratch/kocevski/113109/cmap_HighResolution_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.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=310.136 yref=-17.0901 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.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits evtable="EVENTS" scfile=/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113109/Model_4FGL_J2040.5-1705_daily_bin1290.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 GAL_V02
Working on...
/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits.....................!
real 62.45
user 60.99
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits', '/scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits', expMap='/scratch/kocevski/113109/expmap_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits', expCube='/scratch/kocevski/113109/ltcube_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/113109/Model_4FGL_J2040.5-1705_daily_bin1290.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2040.5-1705'

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.223e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/113109/ft1_filtered_4FGL_J2040.5-1705_daily_bin1290.fits
Spacecraft file(s): /scratch/kocevski/113109/ft2_4FGL_J2040.5-1705_daily_bin1290.fits
Exposure map: /scratch/kocevski/113109/expmap_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits
Exposure cube: /scratch/kocevski/113109/ltcube_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/113109/Model_4FGL_J2040.5-1705_daily_bin1290.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) = 6587.55620466

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    52.043       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.3407       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .33754E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10022E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    12.028       1.0000         .10000E-03   10000.    
     7 'Prefactor '    60.568       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10399E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10418E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .12204E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .19751E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10070E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    23.844       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    24.359       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .65194       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1513       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6587.548     FROM MIGRAD    STATUS=CONVERGED    495 CALLS     2430 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    26.943        .10944E-05** at limit **
   2  Prefactor     52.018        48.436       -.21396E-04    .10622E-04
   3  Prefactor     4.3372        2.6754        .15792E-06   -.34252E-03
   4  Prefactor     .10000E-03    22.269        .72830E-06** at limit **
   5  norm          .10000E-03    15.107        .11684E-05** at limit **
   6  norm          12.017        11.964        .12924E-05   -.11801E-02
   7  Prefactor     60.496        124.34       -.86694E-04    .15365E-05
   8  norm          .10000E-03    7.3187       -.24540E-07** at limit **
   9  norm          .10000E-03    15.226       -.13946E-05** at limit **
  10  norm          .10000E-03    .78771       -.26095E-06** at limit **
  11  Prefactor     .10053E-03    13.527        .18303E-05** at limit **
  12  Prefactor     .10001E-03    5.4973       -.11790E-05** at limit **
  13  norm          .10000E-03    2.2336       -.23102E-06** at limit **
  14  Prefactor     .10000E-03    1.8125       -.71313E-07** at limit **
  15  Prefactor     .10000E-03    83.354       -.21874E-06** at limit **
  16  norm          .10000E-03    10.442       -.19437E-07** at limit **
  17  Prefactor     23.855        23.266        .21073E-06   -.11714E-04
  18  Prefactor     .10000E-03    1.9429       -.47091E-07** at limit **
  19  Prefactor     24.362        20.014       -.58161E-06    .10484E-04
  20  Prefactor     .10000E-03    6.4960       -.38318E-07** at limit **
  21  Normalizat    .65113        .29692       -.17360E-05    .11265E-03
  22  Prefactor     1.1516        .12542        .33981E-05   -.39418E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 52.0184
  Prefactor  = 4.33718
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 12.017
  Prefactor  = 60.4963
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100531
  Prefactor  = 0.000100008
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 23.8553
  Prefactor  = 0.0001
  Prefactor  = 24.3622
  Prefactor  = 0.0001
  Normalizat = 0.651131
  Prefactor  = 1.15165
 **********
 **   18 **HESSE 
 **********

 FCN=   6587.548     FROM HESSE     STATUS=OK           344 CALLS     2774 TOTAL
                     EDM=   .91E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    27.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     52.018        48.428        .55594E-04   -1.4264    
   3  Prefactor     4.3372        2.4220        .88791E-04   -1.5291    
   4  Prefactor     .10000E-03    111.41        .62594E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    15.340        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          12.017        11.556        .57753E-03   -1.5015    
   7  Prefactor     60.496        123.65        .25778E-03   -1.4151    
   8  norm          .10000E-03    7.3324        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    15.237        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    1.4953        .13450E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10053E-03    80.411        .54921E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10001E-03    39.077        .36381E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    5.0355        .23558E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    1.8218        .10667E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    83.446        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    10.448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     23.855        23.199        .82033E-04   -1.4731    
  18  Prefactor     .10000E-03    1.9447        .11048E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     24.362        20.002        .81162E-04   -1.4720    
  20  Prefactor     .10000E-03    6.5035        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .65113        .32480        .47660E-03   -1.0585    
  22  Prefactor     1.1516        .14081        .15750E-03   -.87832    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.07493e-09
Minuit parameter uncertainties:
  1  8.72274e-05
  2  48.4643
  3  2.4221
  4  0.00035329
  5  9.38898e-05
  6  11.5579
  7  124.18
  8  2.28248e-07
  9  4.46541e-05
  10  2.87611e-05
  11  0.0130806
  12  0.00111701
  13  5.79274e-05
  14  4.52944e-06
  15  0.000120469
  16  1.1513e-05
  17  23.2076
  18  2.92265e-06
  19  20.0073
  20  9.13072e-06
  21  0.325756
  22  0.140853
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  4.529e-06  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.152e+00  1.409e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  6.511e-01  3.258e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 9.69e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.56e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113109/likelihoodResults_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.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) = 6587.55068893
delta logL = -0.00260585341402

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6587.54808372
delta logL = -6.41278347757e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10553E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5135       1.0000          .0000       10.000    
     3 'Normalizat'    .65116       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1517       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+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=   6587.548     FROM MIGRAD    STATUS=CONVERGED    104 CALLS      255 TOTAL
                     EDM=   .73E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    18.238        .11019E-01** at limit **
   2  Index         1.8433        5.4181        .50000       -.67409E-06
   3  Normalizat    .65112        .16088E-01    .47661E-03    .21468E-04
   4  Prefactor     1.1517        .69569E-02    .15749E-03    .95284E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Index      = 1.84329
  Normalizat = 0.651123
  Prefactor  = 1.15165
 **********
 **   18 **HESSE 
 **********

 FCN=   6587.548     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      284 TOTAL
                     EDM=   .57E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    144.27        .13878E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8433        8.3817        .50000       -.68328    
   3  Normalizat    .65112        .47236E-01    .19064E-04   -1.0586    
   4  Prefactor     1.1517        .20427E-01    .62998E-05   -.87832    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.74681e-08
Minuit parameter uncertainties:
  1  0.000975236
  2  475.557
  3  0.0472387
  4  0.0204274
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113109': 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) = 6587.54807175
delta logL = 1.1332318536e-05

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  9.752e-04  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  1.843e+00  4.756e+02  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.152e+00  2.043e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  6.511e-01  4.724e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 310.136 -17.090

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/113109/cmap_HighResolution_573696001_573955201_4FGL_J2040.5-1705_daily_bin1290.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.56e-03', job_status='DONE', photon_flux_upper_limit='9.69e-08', time_completed='2021-09-25 16:12:46.016158', job_id='113109', GAL2='1.15', fit_tolerance='1e-08', EG2='0.65', EG='0.65', time_epoch_completed='1632611566.02', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.15', dlogl='1.13e-05', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1290' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:12:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0152>
Subject: Job 113109: <4FGL_J2040.5-1705_daily_bin1290> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1290> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:33 2021
Job was executed on host(s) <bullet0152>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:00:42 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 16:00:42 2021
Terminated at Sat Sep 25 16:12:46 2021
Results reported at Sat Sep 25 16:12:46 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1290 310.136 -17.0901 573696001 573955201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2040.5-1705 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   679.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             322.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   726 sec.
    Turnaround time :                            733 sec.

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

