aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 171 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 = 7471
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1686
RA = 310.136, Dec = -17.0901
tmin = 676339201, tmax = 676598401
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='520465', job_status='RUN', time_executed='2022-06-11 00:44:59.275542', time_epoch_executed='1654933499.28' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1686'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/520465

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/520465/ft1_4FGL_J2040.5-1705_daily_bin1686.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/520465/ft1_4FGL_J2040.5-1705_daily_bin1686.fits outfile=/scratch/kocevski/520465/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1686.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=676339201.0 tmax=676598401.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.81
user 2.58
sys 0.20

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

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

Number of photons that the gtmktime cut: 567

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits" evtable="EVENTS" scfile=/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits sctable="SC_DATA" outfile=/scratch/kocevski/520465/ltcube_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.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/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits
.....................!
real 15.98
user 15.55
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits evtable="EVENTS" scfile=/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits sctable="SC_DATA" expcube=/scratch/kocevski/520465/ltcube_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.fits outfile=/scratch/kocevski/520465/expmap_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.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/520465/ltcube_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.fits
.....................!
real 193.04
user 187.36
sys 5.18

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/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits scfile=/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits outfile=/scratch/kocevski/520465/cmap_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.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.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits scfile=/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits outfile=/scratch/kocevski/520465/cmap_HighResolution_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.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.57
user 0.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits evtable="EVENTS" scfile=/scratch/kocevski/520465/ft2_4FGL_J2040.5-1705_daily_bin1686.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/520465/Model_4FGL_J2040.5-1705_daily_bin1686.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/520465/ft1_filtered_4FGL_J2040.5-1705_daily_bin1686.fits.....................!
real 58.55
user 57.05
sys 1.30

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    80.271       1.0000         .10000E-03   10000.    
     2 'Prefactor '    54.148       1.0000         .10000E-03   10000.    
     3 'Prefactor '    7.9997       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    13.379       1.0000         .10000E-03   10000.    
     6 'norm      '    .10138E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    117.71       1.0000         .10000E-03   10000.    
     8 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    36.450       1.0000         .10000E-03   10000.    
    10 'norm      '    .74012       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10751E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10023E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .20032E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    90.080       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    8.7329       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.5429       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .89540       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=   6203.660     FROM MIGRAD    STATUS=CONVERGED    491 CALLS     2744 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     80.188        73.329       -.13853E-05   -.87800E-04
   2  Prefactor     54.116        72.188       -.72391E-06   -.31362E-04
   3  Prefactor     7.9989        4.5486        .63466E-06   -.15430E-02
   4  Prefactor     .10000E-03    13.570       -.16292E-06** at limit **
   5  norm          13.375        17.680       -.61601E-07    .20861E-04
   6  norm          .10000E-03    8.2731       -.35837E-06** at limit **
   7  Prefactor     117.58        123.58       -.11712E-05   -.70186E-04
   8  norm          .10000E-03    9.9015       -.96725E-07** at limit **
   9  norm          36.489        31.115       -.32249E-06   -.24131E-04
  10  norm          .73666        1.9638        .25240E-05   -.17196E-03
  11  Prefactor     .10486E-03    22.356       -.48262E-05** at limit **
  12  Prefactor     .10000E-03    4.5764        .73946E-07** at limit **
  13  norm          .10000E-03    2.1562        .15283E-07** at limit **
  14  Prefactor     .10000E-03    3.1109        .18846E-06** at limit **
  15  Prefactor     90.090        102.23        .60915E-06    .78744E-05
  16  norm          .10000E-03    33.803        .29247E-06** at limit **
  17  Prefactor     8.7308        14.107        .29613E-06   -.93454E-05
  18  Prefactor     .10000E-03    2.7155        .77549E-07** at limit **
  19  Prefactor     .10000E-03    10.973        .74479E-07** at limit **
  20  Prefactor     .10000E-03    10.338        .11639E-06** at limit **
  21  Normalizat    1.5427        .29289       -.24335E-05    .19147E-03
  22  Prefactor     .89564        .13086        .91532E-06   -.35088E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 80.1882
  Prefactor  = 54.1156
  Prefactor  = 7.9989
  Prefactor  = 0.0001
  norm       = 13.3753
  norm       = 0.0001
  Prefactor  = 117.58
  norm       = 0.0001
  norm       = 36.4894
  norm       = 0.736662
  Prefactor  = 0.000104855
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 90.09
  norm       = 0.0001
  Prefactor  = 8.73077
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.54265
  Prefactor  = 0.895636
 **********
 **   18 **HESSE 
 **********

 FCN=   6203.660     FROM HESSE     STATUS=OK           342 CALLS     3086 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     80.188        73.009        .22413E-03   -1.3915    
   2  Prefactor     54.116        72.224        .54509E-04   -1.4235    
   3  Prefactor     7.9989        4.4506        .57652E-03   -1.5142    
   4  Prefactor     .10000E-03    13.589        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          13.375        17.714        .10951E-03   -1.4976    
   6  norm          .10000E-03    8.3047        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     117.58        123.90        .18544E-03   -1.3535    
   8  norm          .10000E-03    9.9091        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          36.489        31.121        .66381E-04   -1.4499    
  10  norm          .73666        2.5049        .16861E-03   -1.5536    
  11  Prefactor     .10486E-03    35.341        .90422E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.6009        .16454E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.1966        .11292E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    6.4069        .26729E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     90.090        102.38        .42337E-04   -1.3807    
  16  norm          .10000E-03    33.890        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     8.7308        14.113        .13564E-03   -1.5117    
  18  Prefactor     .10000E-03    2.7292        .12673E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    11.021        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    10.589        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.5427        .35418        .33729E-03   -.76587    
  22  Prefactor     .89564        .16055        .19133E-03   -.96294    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.13751e-09
Minuit parameter uncertainties:
  1  73.0905
  2  72.3415
  3  4.45077
  4  8.22179e-06
  5  17.721
  6  4.59772e-05
  7  124.171
  8  3.82314e-06
  9  31.1352
  10  2.50524
  11  0.026214
  12  6.11637e-06
  13  5.19651e-06
  14  3.35543e-05
  15  102.578
  16  0.00010771
  17  14.1186
  18  4.84915e-06
  19  6.33607e-06
  20  8.48886e-06
  21  0.354752
  22  0.160635
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  3.355e-05  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.956e-01  1.606e-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.543e+00  3.548e-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.26e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.81e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/520465/likelihoodResults_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.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) = 6203.66046161
delta logL = -0.000742303912375

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6203.65971857
delta logL = 7.34406057745e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4914       1.0000          .0000       10.000    
     3 'Normalizat'    1.5427       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89563       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=   6203.660     FROM MIGRAD    STATUS=FAILED       102 CALLS      275 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11784E-03    80.170        .28308E-02** at limit **
   2  Index         2.2488        5.7919        .50000        .35987E-04
   3  Normalizat    1.5426        .18961E-01    .33729E-03   -.27672E-04
   4  Prefactor     .89564        .85379E-02    .19133E-03   -.60429E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6203.660     FROM SIMPLEX   STATUS=PROGRESS     107 CALLS      382 TOTAL
                     EDM=   .64E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11393E-03    80.170        .44612E-03** at limit **
   2  Index         2.2477        5.7919        .35830E-03    .35987E-04
   3  Normalizat    1.5426        .18961E-01    .27006E-05   -.27672E-04
   4  Prefactor     .89564        .85379E-02    .20022E-05   -.60429E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6203.660     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      442 TOTAL
                     EDM=   .72E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    72.768        .56616E-02** at limit **
   2  Index         1.9988        8.8936        .50000       -.20718E-06
   3  Normalizat    1.5426        .16201E-01    .13492E-04    .23931E-04
   4  Prefactor     .89564        .72951E-02    .76533E-05    .31789E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.99885
  Normalizat = 1.54264
  Prefactor  = 0.895641
 **********
 **   18 **HESSE 
 **********

 FCN=   6203.660     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      471 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1508.2        .22646E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9988        6.1541        .50000       -.64379    
   3  Normalizat    1.5426        .86638E-01    .26983E-05   -.76587    
   4  Prefactor     .89564        .39009E-01    .15307E-05   -.96294    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.51081e-09
Minuit parameter uncertainties:
  1  0.000190227
  2  877.437
  3  0.0866462
  4  0.0390106
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/520465': 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) = 6203.65971501
delta logL = 4.29429201176e-06

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  8.956e-01  3.901e-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:  1.543e+00  8.665e-02  1.000e-02  1.000e+01 ( 1.000e+00)


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

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/520465/cmap_HighResolution_676339201_676598401_4FGL_J2040.5-1705_daily_bin1686.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.81e-03', job_status='DONE', photon_flux_upper_limit='1.26e-07', time_completed='2022-06-11 00:56:27.063903', job_id='520465', GAL2='0.90', fit_tolerance='1e-08', EG2='1.54', EG='1.54', time_epoch_completed='1654934187.06', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='4.29e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1686' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Jun 11 00:56:27 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0240>
Subject: Job 520465: <4FGL_J2040.5-1705_daily_bin1686> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1686> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Jun 11 00:40:25 2022
Job was executed on host(s) <bullet0240>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Jun 11 00:41:59 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Jun 11 00:41:59 2022
Terminated at Sat Jun 11 00:56:27 2022
Results reported at Sat Jun 11 00:56:27 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1686 310.136 -17.0901 676339201 676598401 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 :                                   690.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             285.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   869 sec.
    Turnaround time :                            962 sec.

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

