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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin500
RA = 310.136, Dec = -17.0901
tmin = 368928001, tmax = 369187201
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='108458', job_status='RUN', time_executed='2021-09-25 15:45:42.176560', time_epoch_executed='1632609942.18' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='500'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/108458

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/108458/ft1_4FGL_J2040.5-1705_daily_bin500.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/108458/ft1_4FGL_J2040.5-1705_daily_bin500.fits outfile=/scratch/kocevski/108458/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin500.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=368928001.0 tmax=369187201.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.46
user 3.19
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits" evtable="EVENTS" scfile=/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits sctable="SC_DATA" outfile=/scratch/kocevski/108458/ltcube_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.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/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits
.....................!
real 16.28
user 15.77
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits evtable="EVENTS" scfile=/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits sctable="SC_DATA" expcube=/scratch/kocevski/108458/ltcube_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.fits outfile=/scratch/kocevski/108458/expmap_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.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/108458/ltcube_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.fits
.....................!
real 193.04
user 187.40
sys 5.07

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/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits scfile=/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits outfile=/scratch/kocevski/108458/cmap_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits scfile=/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits outfile=/scratch/kocevski/108458/cmap_HighResolution_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.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.56
user 0.38
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits evtable="EVENTS" scfile=/scratch/kocevski/108458/ft2_4FGL_J2040.5-1705_daily_bin500.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/108458/Model_4FGL_J2040.5-1705_daily_bin500.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/108458/ft1_filtered_4FGL_J2040.5-1705_daily_bin500.fits.....................!
real 75.20
user 73.79
sys 1.12

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    33.442       1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.0681       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .58594       1.0000         .10000E-03   10000.    
     4 'Prefactor '    20.949       1.0000         .10000E-03   10000.    
     5 'norm      '    29.505       1.0000         .10000E-03   10000.    
     6 'norm      '    .11664E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    97.620       1.0000         .10000E-03   10000.    
     8 'norm      '    15.174       1.0000         .10000E-03   10000.    
     9 'norm      '    18.069       1.0000         .10000E-03   10000.    
    10 'norm      '    1.2874       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .87668       1.0000         .10000E-03   10000.    
    13 'norm      '    .65553       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .13232E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    79.658       1.0000         .10000E-03   10000.    
    16 'norm      '    13.244       1.0000         .10000E-03   10000.    
    17 'Prefactor '    28.171       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    15.611       1.0000         .10000E-03   10000.    
    20 'Prefactor '    21.350       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .86626       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .94152       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=   8656.148     FROM MIGRAD    STATUS=CONVERGED    475 CALLS     2410 TOTAL
                     EDM=   .98E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  9.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     33.458        28.182        .42396E-07   -.26260E-03
   2  Prefactor     8.0698        40.251        .11359E-05    .14900E-04
   3  Prefactor     .58024        2.3256       -.25221E-05   -.29141E-03
   4  Prefactor     20.999        18.658        .27122E-05   -.83247E-04
   5  norm          29.501        14.750        .21370E-06    .21676E-03
   6  norm          .10001E-03    64.376        .16756E-04** at limit **
   7  Prefactor     97.632        88.050        .24543E-06   -.94520E-04
   8  norm          15.172        15.534       -.69606E-07   -.31229E-04
   9  norm          18.069        18.316       -.65239E-07   -.25601E-04
  10  norm          1.2871        1.0940        .25287E-07    .13151E-03
  11  Prefactor     .10000E-03    12.189        .55543E-06** at limit **
  12  Prefactor     .87567        5.0510        .19737E-06    .36249E-03
  13  norm          .65487        1.8404        .25503E-06    .46127E-03
  14  Prefactor     .10000E-03    1.4833        .23333E-06** at limit **
  15  Prefactor     79.653        60.910        .28224E-06    .29781E-04
  16  norm          13.243        16.320       -.11579E-06   -.28068E-04
  17  Prefactor     28.172        17.668        .72241E-07   -.12905E-03
  18  Prefactor     .10000E-03    2.8386        .72942E-06** at limit **
  19  Prefactor     15.613        14.644       -.11760E-06   -.19786E-03
  20  Prefactor     21.341        16.327        .18982E-06   -.13691E-03
  21  Normalizat    .86619        .22979       -.39028E-05   -.24064E-03
  22  Prefactor     .94164        .10075        .71821E-06   -.11883E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 33.4575
  Prefactor  = 8.06982
  Prefactor  = 0.580238
  Prefactor  = 20.9995
  norm       = 29.5011
  norm       = 0.000100005
  Prefactor  = 97.632
  norm       = 15.1723
  norm       = 18.0691
  norm       = 1.28709
  Prefactor  = 0.0001
  Prefactor  = 0.875674
  norm       = 0.654868
  Prefactor  = 0.000100001
  Prefactor  = 79.6526
  norm       = 13.2428
  Prefactor  = 28.1717
  Prefactor  = 0.0001
  Prefactor  = 15.6134
  Prefactor  = 21.3406
  Normalizat = 0.866194
  Prefactor  = 0.941636
 **********
 **   18 **HESSE 
 **********

 FCN=   8656.148     FROM HESSE     STATUS=OK           352 CALLS     2762 TOTAL
                     EDM=   .84E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     33.458        28.347        .34646E-03   -1.4550    
   2  Prefactor     8.0698        40.730        .14115E-03   -1.5140    
   3  Prefactor     .58024        2.5331        .21035E-02   -1.5556    
   4  Prefactor     20.999        19.308        .87510E-04   -1.4791    
   5  norm          29.501        14.790        .73759E-04   -1.4621    
   6  norm          .10001E-03    62.146        .40980E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     97.632        87.825        .20342E-03   -1.3729    
   8  norm          15.172        15.546        .10282E-03   -1.4929    
   9  norm          18.069        18.316        .94222E-04   -1.4858    
  10  norm          1.2871        1.0737        .86190E-04   -1.5481    
  11  Prefactor     .10000E-03    12.288        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .87567        5.2043        .40807E-03   -1.5521    
  13  norm          .65487        1.8770        .20615E-03   -1.5546    
  14  Prefactor     .10000E-03    6.1864        .21514E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     79.653        60.941        .44998E-04   -1.3921    
  16  norm          13.243        16.319        .11006E-03   -1.4980    
  17  Prefactor     28.172        17.690        .75482E-04   -1.4646    
  18  Prefactor     .10000E-03    2.8894        .15364E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     15.613        14.643        .10137E-03   -1.4917    
  20  Prefactor     21.341        16.329        .86686E-04   -1.4784    
  21  Normalizat    .86619        .25817        .38266E-03   -.97658    
  22  Prefactor     .94164        .11627        .16227E-03   -.94701    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.36605e-08
Minuit parameter uncertainties:
  1  28.3582
  2  36.2984
  3  2.42469
  4  19.3138
  5  14.7918
  6  0.00114957
  7  87.942
  8  15.5506
  9  18.322
  10  1.07369
  11  7.70373e-05
  12  4.26987
  13  1.87716
  14  0.000115003
  15  60.9892
  16  16.3246
  17  17.6935
  18  3.93181e-05
  19  14.6459
  20  16.3326
  21  0.258536
  22  0.116303
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  1.150e-04  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.416e-01  1.163e-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:  8.662e-01  2.585e-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: 8.48e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.61e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/108458/likelihoodResults_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.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) = 8656.1486361
delta logL = -0.000769790667619

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8656.14786862
delta logL = -2.311748176e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13336E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5797       1.0000          .0000       10.000    
     3 'Normalizat'    .86636       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94160       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.

 FCN=   8656.148     FROM MIGRAD    STATUS=CONVERGED     64 CALLS      237 TOTAL
                     EDM=   .39E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.5968        .60120E-01** at limit **
   2  Index         2.6226        6.3090        .50000       -.60158E-04
   3  Normalizat    .86619        .58857E-02    .86414E-01    .19302E-03
   4  Prefactor     .94164        .26085E-02    .45533E-01    .45315E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 2.62258
  Normalizat = 0.86619
  Prefactor  = 0.941639
 **********
 **   18 **HESSE 
 **********

 FCN=   8656.148     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      270 TOTAL
                     EDM=   .11E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1511.0        .20549E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6226        5.5029        .50000       -.49552    
   3  Normalizat    .86619        .15165        .38266E-03   -.97659    
   4  Prefactor     .94164        .65888E-01    .16227E-03   -.94701    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.1299e-06
Minuit parameter uncertainties:
  1  0.0023509
  2  65.6914
  3  0.151726
  4  0.0658941
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/108458': 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) = 8656.1478652
delta logL = 1.11002555059e-06

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  2.351e-03  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.623e+00  6.569e+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:  9.416e-01  6.589e-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:  8.662e-01  1.517e-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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/108458/cmap_HighResolution_368928001_369187201_4FGL_J2040.5-1705_daily_bin500.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.61e-03', job_status='DONE', photon_flux_upper_limit='8.48e-08', time_completed='2021-09-25 15:59:04.072221', job_id='108458', GAL2='0.94', fit_tolerance='1e-08', EG2='0.87', EG='0.87', time_epoch_completed='1632610744.07', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='1.11e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='500' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:59:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0015>
Subject: Job 108458: <4FGL_J2040.5-1705_daily_bin500> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin500> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 25 15:45:14 2021
Job was executed on host(s) <bullet0015>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:45:32 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:45:32 2021
Terminated at Sat Sep 25 15:59:04 2021
Results reported at Sat Sep 25 15:59:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin500 310.136 -17.0901 368928001 369187201 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 :                                   799.53 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             376.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   812 sec.
    Turnaround time :                            830 sec.

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

