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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1414
RA = 310.136, Dec = -17.0901
tmin = 605836801, tmax = 606096001
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='113320', job_status='RUN', time_executed='2021-09-25 16:01:48.220945', time_epoch_executed='1632610908.22' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1414'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113320

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113320/ft1_4FGL_J2040.5-1705_daily_bin1414.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113320/ft1_4FGL_J2040.5-1705_daily_bin1414.fits outfile=/scratch/kocevski/113320/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1414.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=605836801.0 tmax=606096001.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 3.72
user 3.39
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.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/113320/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1414.fits evtable="EVENTS" outfile="/scratch/kocevski/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.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.53
user 0.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits" evtable="EVENTS" scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits sctable="SC_DATA" outfile=/scratch/kocevski/113320/ltcube_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.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/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits
.....................!
real 14.47
user 13.85
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits evtable="EVENTS" scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits sctable="SC_DATA" expcube=/scratch/kocevski/113320/ltcube_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.fits outfile=/scratch/kocevski/113320/expmap_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.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/113320/ltcube_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.fits
.....................!
real 191.93
user 186.10
sys 5.19

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/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits outfile=/scratch/kocevski/113320/cmap_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.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.56
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits outfile=/scratch/kocevski/113320/cmap_HighResolution_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.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.58
user 0.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits evtable="EVENTS" scfile=/scratch/kocevski/113320/ft2_4FGL_J2040.5-1705_daily_bin1414.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113320/Model_4FGL_J2040.5-1705_daily_bin1414.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/113320/ft1_filtered_4FGL_J2040.5-1705_daily_bin1414.fits.....................!
real 66.76
user 64.96
sys 1.47

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10048E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.739       1.0000         .10000E-03   10000.    
     5 'norm      '    15.278       1.0000         .10000E-03   10000.    
     6 'norm      '    4.8627       1.0000         .10000E-03   10000.    
     7 'Prefactor '    137.23       1.0000         .10000E-03   10000.    
     8 'norm      '    .11810       1.0000         .10000E-03   10000.    
     9 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.2739       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .43267E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.9540       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .49193E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    .10407E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    22.992       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    25.461       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.4366       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .85050       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=   6957.895     FROM MIGRAD    STATUS=CONVERGED    873 CALLS     2794 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    13.100        .18142E-02** at limit **
   2  Prefactor     .10000E-03    13.599        .18142E-02** at limit **
   3  Prefactor     .10000E-03    1.2877        .18161E-03** at limit **
   4  Prefactor     16.748        18.405        .97892E-04    .18280E-03
   5  norm          15.281        12.631        .10247E-03    .33506E-04
   6  norm          4.8633        11.169        .18242E-03    .84946E-04
   7  Prefactor     137.22        125.79        .34383E-04    .70759E-05
   8  norm          .18110        15.580        .91831E-01    .21875E-03
   9  norm          .10000E-03    10.956        .18142E-02** at limit **
  10  norm          1.2741        1.3335        .95602E-04    .13461E-03
  11  Prefactor     .10000E-03    7.1930        .18142E-02** at limit **
  12  Prefactor     .10000E-03    5.2667        .18142E-02** at limit **
  13  norm          .48850E-01    2.6900        .45829E-01    .54020E-03
  14  Prefactor     4.9571        5.1537        .90346E-03    .21769E-04
  15  Prefactor     .10000E-03    187.21        .19225E-02** at limit **
  16  norm          .10000E-03    60.582        .18142E-02** at limit **
  17  Prefactor     23.005        19.879        .83536E-04    .17148E-04
  18  Prefactor     .10000E-03    5.9923        .18142E-02** at limit **
  19  Prefactor     .10000E-03    13.051        .18142E-02** at limit **
  20  Prefactor     25.474        19.368        .79389E-04   -.25776E-04
  21  Normalizat    1.4358        .32449        .34619E-03   -.68635E-04
  22  Prefactor     .85056        .13300        .17954E-03   -.31454E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 16.7484
  norm       = 15.2808
  norm       = 4.86327
  Prefactor  = 137.216
  norm       = 0.181096
  norm       = 0.0001
  norm       = 1.2741
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.04885
  Prefactor  = 4.95712
  Prefactor  = 0.000100001
  norm       = 0.000100001
  Prefactor  = 23.0053
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 25.4743
  Normalizat = 1.43584
  Prefactor  = 0.850561
 **********
 **   18 **HESSE 
 **********

 FCN=   6957.895     FROM HESSE     STATUS=OK           342 CALLS     3136 TOTAL
                     EDM=   .94E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    13.100        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    13.600        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.2877        .36323E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     16.748        18.401        .39157E-05   -1.4889    
   5  norm          15.281        12.631        .40988E-05   -1.4926    
   6  norm          4.8633        11.165        .72966E-05   -1.5267    
   7  Prefactor     137.22        125.79        .68765E-05   -1.3360    
   8  norm          .18110        14.253        .98583E-01   -1.5623    
   9  norm          .10000E-03    10.956        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.2741        1.3335        .38241E-05   -1.5482    
  11  Prefactor     .10000E-03    7.1938        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.2691        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .48850E-01    2.7074        .45552E-01   -1.5664    
  14  Prefactor     4.9571        5.1516        .36138E-04   -1.5263    
  15  Prefactor     .10000E-03    187.26        .38449E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    60.642        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     23.005        19.878        .33414E-05   -1.4748    
  18  Prefactor     .10000E-03    5.9962        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    13.051        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     25.474        19.368        .31756E-05   -1.4698    
  21  Normalizat    1.4358        .32470        .13847E-04   -.79598    
  22  Prefactor     .85056        .13307        .35908E-04   -.97891    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.38591e-10
Minuit parameter uncertainties:
  1  1.2144e-05
  2  2.60986e-05
  3  1.19639e-05
  4  18.4073
  5  12.6329
  6  11.17
  7  126.035
  8  3.21305
  9  5.27359e-06
  10  1.33349
  11  4.84585e-06
  12  3.7155e-05
  13  0.726636
  14  5.15211
  15  0.000870478
  16  0.000575598
  17  19.8838
  18  5.39555e-05
  19  4.95883e-05
  20  19.3724
  21  0.325171
  22  0.133119
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.957e+00  5.152e+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

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  8.506e-01  1.331e-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:  1.436e+00  3.252e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.29
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 5.81e-08 +/- 6.03e-08
Energy Flux (Fixed Index): 1.61e-05 +/- 1.68e-05

TS (Fixed Index): 1.29
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 1.87e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.46e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113320/likelihoodResults_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.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) = 6957.81725548
delta logL = 0.0781298362945

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6957.81324937
delta logL = 0.0821359483343

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.7284       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8829       1.0000          .0000       10.000    
     3 'Normalizat'    1.4179       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .85561       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=   6957.813     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      298 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.7277        5.7956        .14604E-03    .43460E-03
   2  Index         2.8827        .97929        .85319E-02    .81371E-04
   3  Normalizat    1.4180        .31848        .34799E-03   -.67894E-03
   4  Prefactor     .85563        .12957        .17905E-03   -.13170E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.72769
  Index      = 2.88271
  Normalizat = 1.41796
  Prefactor  = 0.855633
 **********
 **   18 **HESSE 
 **********

 FCN=   6957.813     FROM HESSE     STATUS=OK            25 CALLS      323 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.7277        5.1529        .58418E-05   -1.5322    
   2  Index         2.8827        .87106        .34128E-03   -.43726    
   3  Normalizat    1.4180        .31877        .69599E-04   -.80111    
   4  Prefactor     .85563        .12961        .35811E-04   -.97709    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.16566e-09
Minuit parameter uncertainties:
  1  5.15352
  2  0.876521
  3  0.319221
  4  0.129661
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113320': 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) = 6957.81324904
delta logL = 0.0821362749493

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.728e+00  5.154e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.883e+00  8.765e-01  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:  8.556e-01  1.297e-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:  1.418e+00  3.192e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.46
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.88 +/- 0.88
Photon Flux (Free Index): 7.19e-08 +/- 7.35e-08
Energy Flux (Free Index): 1.53e-05 +/- 1.50e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/113320/cmap_HighResolution_605836801_606096001_4FGL_J2040.5-1705_daily_bin1414.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.46e-02', comment='SUCCESS', photon_flux='5.81e-08', energy_flux2='1.53e-05', photon_flux_error='6.03e-08', dlogl='8.21e-02', energy_flux='1.61e-05', photon_flux2='7.19e-08', job_status='DONE', time_completed='2021-09-25 16:14:12.465390', photon_index_error2='0.88', photon_index2='2.88', ts='1.29', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='1.87e-07', energy_flux_error2='1.50e-05', EG='1.44', time_epoch_completed='1632611652.47', return_code='0', job_id='113320', GAL2='0.86', EG2='1.42', return_code2='0', energy_flux_error='1.68e-05', photon_flux_error2='7.35e-08', ts2='1.46', photon_index='2.54' WHERE bin_id='1414' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:14:12 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0140>
Subject: Job 113320: <4FGL_J2040.5-1705_daily_bin1414> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1414> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:50 2021
Job was executed on host(s) <bullet0140>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:01:07 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:01:07 2021
Terminated at Sat Sep 25 16:14:13 2021
Results reported at Sat Sep 25 16:14:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1414 310.136 -17.0901 605836801 606096001 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 :                                   740.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             304.19 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   785 sec.
    Turnaround time :                            803 sec.

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

