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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin621
RA = 310.136, Dec = -17.0901
tmin = 400291201, tmax = 400550401
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='108635', job_status='RUN', time_executed='2021-09-25 15:50:11.313976', time_epoch_executed='1632610211.31' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='621'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/108635

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/108635/ft1_4FGL_J2040.5-1705_daily_bin621.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/108635/ft1_4FGL_J2040.5-1705_daily_bin621.fits outfile=/scratch/kocevski/108635/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin621.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=400291201.0 tmax=400550401.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.33
user 3.10
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits" evtable="EVENTS" scfile=/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits sctable="SC_DATA" outfile=/scratch/kocevski/108635/ltcube_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.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/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits
.....................!
real 14.53
user 14.14
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits evtable="EVENTS" scfile=/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits sctable="SC_DATA" expcube=/scratch/kocevski/108635/ltcube_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.fits outfile=/scratch/kocevski/108635/expmap_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.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/108635/ltcube_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.fits
.....................!
real 191.98
user 185.95
sys 4.63

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
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/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits scfile=/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits outfile=/scratch/kocevski/108635/cmap_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.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.58
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits scfile=/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits outfile=/scratch/kocevski/108635/cmap_HighResolution_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.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/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits evtable="EVENTS" scfile=/scratch/kocevski/108635/ft2_4FGL_J2040.5-1705_daily_bin621.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/108635/Model_4FGL_J2040.5-1705_daily_bin621.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/108635/ft1_filtered_4FGL_J2040.5-1705_daily_bin621.fits.....................!
real 60.43
user 59.05
sys 1.14

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .27229E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11619E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.4089       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10156E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    30.256       1.0000         .10000E-03   10000.    
     6 'norm      '    9.7115       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.0982       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    27.293       1.0000         .10000E-03   10000.    
    16 'norm      '    .22997E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .21675E-01   1.0000         .10000E-03   10000.    
    18 'Prefactor '    22.333       1.0000         .10000E-03   10000.    
    19 'Prefactor '    11.222       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10264E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.0233       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .94313       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=   6316.800     FROM MIGRAD    STATUS=CONVERGED    859 CALLS     3126 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    52.797        .15231    ** at limit **
   2  Prefactor     .10000E-03    53.038        .18142E-02** at limit **
   3  Prefactor     2.4094        2.5750        .12007E-03    .28054E-03
   4  Prefactor     .10000E-03    17.280        .18142E-02** at limit **
   5  norm          30.260        19.051        .72841E-04   -.53066E-05
   6  norm          9.7145        13.432        .12859E-03   -.37397E-04
   7  Prefactor     .10000E-03    86.019        .18142E-02** at limit **
   8  norm          .10000E-03    6.1305        .18142E-02** at limit **
   9  norm          .10000E-03    14.129        .18142E-02** at limit **
  10  norm          1.0984        1.0398        .77651E-04    .14494E-04
  11  Prefactor     .10000E-03    7.6574        .18142E-02** at limit **
  12  Prefactor     .10000E-03    5.2436        .17706E-02** at limit **
  13  norm          .10000E-03    1.6070        .98166E-03** at limit **
  14  Prefactor     .10000E-03    2.1816        .11397E-02** at limit **
  15  Prefactor     27.289        136.10        .76684E-04    .73534E-05
  16  norm          .10000E-03    46.868        .18142E-02** at limit **
  17  Prefactor     .10095E-03    12.983        .82634E-01** at limit **
  18  Prefactor     22.331        12.112        .84759E-04    .92147E-04
  19  Prefactor     11.218        20.045        .11959E-03    .22434E-04
  20  Prefactor     .10000E-03    47.176        .36285E-03** at limit **
  21  Normalizat    1.0238        .31401        .37858E-03    .26636E-04
  22  Prefactor     .94288        .13221        .16567E-03    .12791E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100016
  Prefactor  = 0.0001
  Prefactor  = 2.40941
  Prefactor  = 0.0001
  norm       = 30.2605
  norm       = 9.71447
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 1.09841
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 27.2891
  norm       = 0.0001
  Prefactor  = 0.000100948
  Prefactor  = 22.3315
  Prefactor  = 11.2178
  Prefactor  = 0.0001
  Normalizat = 1.02377
  Prefactor  = 0.94288
 **********
 **   18 **HESSE 
 **********

 FCN=   6316.800     FROM HESSE     STATUS=OK           340 CALLS     3466 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    53.846        .15031       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    53.046        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.4094        2.5745        .48029E-05   -1.5398    
   4  Prefactor     .10000E-03    17.282        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          30.260        19.051        .29136E-05   -1.4607    
   6  norm          9.7145        13.432        .51436E-05   -1.5085    
   7  Prefactor     .10000E-03    86.021        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    6.1307        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    14.130        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.0984        1.0398        .31060E-05   -1.5498    
  11  Prefactor     .10000E-03    7.6584        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.2450        .35413E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.6071        .19633E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.1820        .22794E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     27.289        136.08        .15337E-04   -1.4663    
  16  norm          .10000E-03    46.884        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10095E-03    12.619        .84449E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     22.331        12.113        .33904E-05   -1.4762    
  19  Prefactor     11.218        20.045        .47838E-05   -1.5038    
  20  Prefactor     .10000E-03    47.178        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.0238        .31428        .15143E-04   -.92238    
  22  Prefactor     .94288        .13233        .33135E-04   -.94658    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44224e-10
Minuit parameter uncertainties:
  1  0.00183624
  2  4.23507e-05
  3  2.57458
  4  5.34115e-05
  5  19.0553
  6  13.4358
  7  0.000143299
  8  6.65554e-07
  9  3.82745e-06
  10  1.03978
  11  3.88723e-06
  12  1.41845e-05
  13  1.87091e-06
  14  5.0447e-06
  15  122.325
  16  0.000122886
  17  0.00691953
  18  12.1139
  19  20.0566
  20  0.000109976
  21  0.314852
  22  0.132379
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  5.045e-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:  9.429e-01  1.324e-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.024e+00  3.149e-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.82e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/108635/likelihoodResults_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.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) = 6316.80264829
delta logL = -0.00218566744024

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6316.80046264
delta logL = -1.27947714645e-08

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 'Index     '    2.5436       1.0000          .0000       10.000    
     3 'Normalizat'    1.0238       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94287       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=   6316.800     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      240 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.9474        .11399E-02** at limit **
   2  Index         2.5460        6.0257        .50000       -.10124E-04
   3  Normalizat    1.0238        .29432        .37858E-03    .63062E-05
   4  Prefactor     .94288        .12530        .16567E-03    .91128E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.54599
  Normalizat = 1.02377
  Prefactor  = 0.942879
 **********
 **   18 **HESSE 
 **********

 FCN=   6316.800     FROM HESSE     STATUS=OK            29 CALLS      269 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.2338        .22798E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5460        6.2704        .50000       -.51301    
   3  Normalizat    1.0238        .29453        .15143E-04   -.92238    
   4  Prefactor     .94288        .12539        .33135E-04   -.94658    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.42349e-10
Minuit parameter uncertainties:
  1  4.47425e-05
  2  4.40862
  3  0.294998
  4  0.125431
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/108635': 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) = 6316.80046262
delta logL = 1.07575033326e-08

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  4.474e-05  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.546e+00  4.409e+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:  9.429e-01  1.254e-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.024e+00  2.950e-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/108635/cmap_HighResolution_400291201_400550401_4FGL_J2040.5-1705_daily_bin621.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.66e-03', job_status='DONE', photon_flux_upper_limit='9.82e-08', time_completed='2021-09-25 16:01:59.738416', job_id='108635', GAL2='0.94', fit_tolerance='1e-08', EG2='1.02', EG='1.02', time_epoch_completed='1632610919.74', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='1.08e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='621' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:01:59 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0051>
Subject: Job 108635: <4FGL_J2040.5-1705_daily_bin621> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin621> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 25 15:45:27 2021
Job was executed on host(s) <bullet0051>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:48:15 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 15:48:15 2021
Terminated at Sat Sep 25 16:02:00 2021
Results reported at Sat Sep 25 16:02:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin621 310.136 -17.0901 400291201 400550401 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 :                                   706.44 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             292.28 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   826 sec.
    Turnaround time :                            993 sec.

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

