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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1339
RA = 310.136, Dec = -17.0901
tmin = 586396801, tmax = 586656001
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='113189', job_status='RUN', time_executed='2021-09-25 16:01:54.981698', time_epoch_executed='1632610914.98' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1339'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113189

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

Retrieving the FT1 file...

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

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

Retrieving 31 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113189/ft1_4FGL_J2040.5-1705_daily_bin1339.fits


Retrieving the FT1 file...

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

Retrieving 31 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113189/ft1_4FGL_J2040.5-1705_daily_bin1339.fits outfile=/scratch/kocevski/113189/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1339.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=586396801.0 tmax=586656001.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.77
user 2.37
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.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/113189/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1339.fits evtable="EVENTS" outfile="/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.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.32
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits" evtable="EVENTS" scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits sctable="SC_DATA" outfile=/scratch/kocevski/113189/ltcube_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.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/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits
.....................!
real 8.98
user 8.60
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits evtable="EVENTS" scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits sctable="SC_DATA" expcube=/scratch/kocevski/113189/ltcube_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits outfile=/scratch/kocevski/113189/expmap_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.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/113189/ltcube_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits
.....................!
real 192.35
user 186.39
sys 5.38

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/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits outfile=/scratch/kocevski/113189/cmap_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.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 0.54
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits outfile=/scratch/kocevski/113189/cmap_HighResolution_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.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.54
user 0.36
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits evtable="EVENTS" scfile=/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113189/Model_4FGL_J2040.5-1705_daily_bin1339.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/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits.....................!
real 53.07
user 51.54
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits', '/scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits', expMap='/scratch/kocevski/113189/expmap_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits', expCube='/scratch/kocevski/113189/ltcube_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/113189/Model_4FGL_J2040.5-1705_daily_bin1339.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/113189/ft1_filtered_4FGL_J2040.5-1705_daily_bin1339.fits
Spacecraft file(s): /scratch/kocevski/113189/ft2_4FGL_J2040.5-1705_daily_bin1339.fits
Exposure map: /scratch/kocevski/113189/expmap_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits
Exposure cube: /scratch/kocevski/113189/ltcube_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/113189/Model_4FGL_J2040.5-1705_daily_bin1339.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) = 5127.14631196

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    6.7580       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    31.027       1.0000         .10000E-03   10000.    
     6 'norm      '    .78466E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    16.103       1.0000         .10000E-03   10000.    
     9 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.9089       1.0000         .10000E-03   10000.    
    11 'Prefactor '    31.717       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.3857       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    13.140       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    26.562       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10155E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .69720       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1798       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=   5127.145     FROM MIGRAD    STATUS=CONVERGED    471 CALLS     2380 TOTAL
                     EDM=   .89E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.198        .15144E-05** at limit **
   2  Prefactor     .10000E-03    30.686       -.14670E-05** at limit **
   3  Prefactor     6.7571        3.0578        .66056E-08   -.85958E-04
   4  Prefactor     .10000E-03    10.981        .38050E-06** at limit **
   5  norm          31.024        19.975       -.18356E-06   -.49623E-04
   6  norm          .10000E-03    5.3053        .12797E-06** at limit **
   7  Prefactor     .10001E-03    60.197       -.52525E-05** at limit **
   8  norm          16.097        28.843       -.16924E-05   -.11361E-03
   9  norm          .10000E-03    25.023       -.30320E-05** at limit **
  10  norm          2.9086        2.2940        .11594E-06   -.37874E-04
  11  Prefactor     31.715        28.063       -.39534E-06   -.59315E-04
  12  Prefactor     4.3848        7.4619        .31761E-05   -.94346E-03
  13  norm          .10000E-03    1.3827        .45880E-08** at limit **
  14  Prefactor     .10000E-03    9.0074        .30018E-07** at limit **
  15  Prefactor     .10001E-03    39.427        .71772E-05** at limit **
  16  norm          13.139        18.681       -.12924E-06   -.11300E-04
  17  Prefactor     .10000E-03    16.614        .24972E-05** at limit **
  18  Prefactor     .10000E-03    5.1583        .14472E-08** at limit **
  19  Prefactor     26.558        33.923       -.10306E-05   -.67288E-04
  20  Prefactor     .10000E-03    14.351       -.28113E-05** at limit **
  21  Normalizat    .69716        .32750       -.49307E-06   -.13503E-04
  22  Prefactor     1.1798        .14193        .53989E-07   -.26598E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Prefactor  = 6.75709
  Prefactor  = 0.0001
  norm       = 31.0244
  norm       = 0.000100003
  Prefactor  = 0.000100008
  norm       = 16.0967
  norm       = 0.000100003
  norm       = 2.90863
  Prefactor  = 31.7152
  Prefactor  = 4.38475
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100015
  norm       = 13.1393
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 26.5584
  Prefactor  = 0.000100002
  Normalizat = 0.697158
  Prefactor  = 1.1798
 **********
 **   18 **HESSE 
 **********

 FCN=   5127.145     FROM HESSE     STATUS=OK           344 CALLS     2724 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.308        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    30.829        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     6.7571        3.0534        .80126E-04   -1.5188    
   4  Prefactor     .10000E-03    11.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          31.024        20.010        .71932E-04   -1.4593    
   6  norm          .10000E-03    58.283        .31796E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    61.496        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          16.097        29.095        .99810E-04   -1.4905    
   9  norm          .10000E-03    25.457        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.9086        2.2839        .83943E-04   -1.5367    
  11  Prefactor     31.715        28.073        .71147E-04   -1.4581    
  12  Prefactor     4.3848        8.5452        .96159E-03   -1.5289    
  13  norm          .10000E-03    1.3842        .82225E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    9.3551        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10001E-03    41.820        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          13.139        18.682        .11050E-03   -1.4983    
  17  Prefactor     .10000E-03    16.960        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    5.1853        .15881E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     26.558        33.978        .77729E-04   -1.4677    
  20  Prefactor     .10000E-03    14.674        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .69716        .35743        .48506E-03   -1.0401    
  22  Prefactor     1.1798        .15748        .16494E-03   -.86955    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.52642e-09
Minuit parameter uncertainties:
  1  0.000207843
  2  0.00028132
  3  3.05352
  4  4.15284e-05
  5  20.0142
  6  0.000787448
  7  0.00141083
  8  29.1206
  9  0.000512083
  10  2.28394
  11  28.0842
  12  8.54761
  13  1.54129e-07
  14  8.40817e-06
  15  0.0015804
  16  18.6902
  17  0.000345447
  18  2.46996e-06
  19  34.0024
  20  0.00034282
  21  0.358635
  22  0.157545
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  8.408e-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.180e+00  1.575e-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.972e-01  3.586e-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: 1.68e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.31e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113189/likelihoodResults_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.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) = 5127.14525411
delta logL = -0.000510357190251

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5127.14474416
delta logL = -4.00716999138e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10346E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5706       1.0000          .0000       10.000    
     3 'Normalizat'    .69686       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1799       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5127.140     FROM MIGRAD    STATUS=FAILED       164 CALLS      321 TOTAL
                     EDM=   .28E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .64205E-01    26.591        .29230E-02   -.51359E-01
   2  Index         4.0248        2.8096        .50000        .83199E-05
   3  Normalizat    .68763        .34116E-01    .48505E-03   -.36798E-05
   4  Prefactor     1.1820        .14827E-01    .16494E-03    .41700E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5127.140     FROM SIMPLEX   STATUS=UNCHANGED     80 CALLS      401 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .64205E-01    26.591        .16580E-03   -.51359E-01
   2  Index         4.0248        2.8096        .48171E-02    .83199E-05
   3  Normalizat    .68763        .34116E-01    .20316E-03   -.36798E-05
   4  Prefactor     1.1820        .14827E-01    .33482E-04    .41700E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5127.140     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      435 TOTAL
                     EDM=   .25E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .64205E-01    2.9349        .58461E-03   -.90466E-04
   2  Index         4.0248        6.9867        .99778E-02    .42910E-05
   3  Normalizat    .68763        .36150        .19402E-04   -.37501E-05
   4  Prefactor     1.1820        .15414        .65977E-05    .41700E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.064205
  Index      = 4.02477
  Normalizat = 0.68763
  Prefactor  = 1.18196
 **********
 **   18 **HESSE 
 **********

 FCN=   5127.140     FROM HESSE     STATUS=OK            27 CALLS      462 TOTAL
                     EDM=   .29E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .64205E-01    3.9265        .23384E-04   -1.5759    
   2  Index         4.0248        7.0105        .39911E-03   -.19630    
   3  Normalizat    .68763        .36244        .38804E-05   -1.0438    
   4  Prefactor     1.1820        .15426        .13195E-05   -.86888    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.89938e-11
Minuit parameter uncertainties:
  1  1.00348
  2  6.93246
  3  0.363708
  4  0.154317
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113189': 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) = 5127.13985115
delta logL = 0.00489260236736

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  6.421e-02  1.003e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  4.025e+00  6.932e+00  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.182e+00  1.543e-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.876e-01  3.637e-01  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/113189/cmap_HighResolution_586396801_586656001_4FGL_J2040.5-1705_daily_bin1339.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.31e-02', job_status='DONE', photon_flux_upper_limit='1.68e-07', time_completed='2021-09-25 16:11:51.955136', job_id='113189', GAL2='1.18', fit_tolerance='1e-08', EG2='0.69', EG='0.70', time_epoch_completed='1632611511.96', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.18', dlogl='4.89e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1339' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:11:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0128>
Subject: Job 113189: <4FGL_J2040.5-1705_daily_bin1339> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1339> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:39 2021
Job was executed on host(s) <bullet0128>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:00:53 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:53 2021
Terminated at Sat Sep 25 16:11:52 2021
Results reported at Sat Sep 25 16:11:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1339 310.136 -17.0901 586396801 586656001 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 :                                   594.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             283.90 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   659 sec.
    Turnaround time :                            673 sec.

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

