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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1013
RA = 310.136, Dec = -17.0901
tmin = 501897601, tmax = 502156801
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='111531', job_status='RUN', time_executed='2021-09-25 15:57:13.744823', time_epoch_executed='1632610633.74' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1013'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111531

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111531/ft1_4FGL_J2040.5-1705_daily_bin1013.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111531/ft1_4FGL_J2040.5-1705_daily_bin1013.fits outfile=/scratch/kocevski/111531/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1013.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=501897601.0 tmax=502156801.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.48
user 3.26
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.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/111531/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1013.fits evtable="EVENTS" outfile="/scratch/kocevski/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.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/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits" evtable="EVENTS" scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits sctable="SC_DATA" outfile=/scratch/kocevski/111531/ltcube_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.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/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits
.....................!
real 18.72
user 18.25
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits evtable="EVENTS" scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits sctable="SC_DATA" expcube=/scratch/kocevski/111531/ltcube_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.fits outfile=/scratch/kocevski/111531/expmap_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.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/111531/ltcube_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.fits
.....................!
real 190.76
user 185.73
sys 4.42

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/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits outfile=/scratch/kocevski/111531/cmap_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits outfile=/scratch/kocevski/111531/cmap_HighResolution_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.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.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits evtable="EVENTS" scfile=/scratch/kocevski/111531/ft2_4FGL_J2040.5-1705_daily_bin1013.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/111531/Model_4FGL_J2040.5-1705_daily_bin1013.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/111531/ft1_filtered_4FGL_J2040.5-1705_daily_bin1013.fits.....................!
real 79.23
user 77.79
sys 1.18

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    36.692       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .74691       1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.798       1.0000         .10000E-03   10000.    
     5 'norm      '    10.196       1.0000         .10000E-03   10000.    
     6 'norm      '    31.385       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.5550       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.2151       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      '    .53051       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.3606       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10889E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    14.710       1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.5872       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.4542       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .59900       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1063       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=   9002.842     FROM MIGRAD    STATUS=CONVERGED    474 CALLS     2049 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    71.940       -.18710E-05** at limit **
   2  Prefactor     36.686        30.617       -.15166E-06   -.80613E-04
   3  Prefactor     .74628        1.6074        .60172E-06   -.73690E-04
   4  Prefactor     12.798        12.329       -.42385E-06   -.53522E-04
   5  norm          10.198        13.529        .23194E-05   -.16895E-03
   6  norm          31.386        11.917        .33327E-07   -.63870E-04
   7  Prefactor     .10001E-03    39.930        .22511E-05** at limit **
   8  norm          4.5554        6.8517        .11004E-06    .21104E-04
   9  norm          .10000E-03    13.927       -.41000E-07** at limit **
  10  norm          2.2150        1.1275        .14562E-07   -.10849E-03
  11  Prefactor     .10000E-03    6.2121        .12039E-07** at limit **
  12  Prefactor     .10000E-03    3.9382        .51009E-07** at limit **
  13  norm          .53053        2.2529        .20006E-05   -.15901E-03
  14  Prefactor     5.3605        3.7770        .18996E-06   -.24286E-04
  15  Prefactor     .10000E-03    16.935        .18658E-06** at limit **
  16  norm          .10000E-03    30.883       -.19204E-05** at limit **
  17  Prefactor     14.708        15.822        .26463E-06   -.22942E-04
  18  Prefactor     1.5877        4.8115        .20876E-05   -.19297E-05
  19  Prefactor     .10000E-03    3.9332        .12884E-07** at limit **
  20  Prefactor     7.4541        6.9804        .59624E-07   -.55120E-05
  21  Normalizat    .59919        .22895       -.17511E-05   -.79140E-04
  22  Prefactor     1.1062        .10205       -.21236E-06   -.74741E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100005
  Prefactor  = 36.6859
  Prefactor  = 0.746281
  Prefactor  = 12.7984
  norm       = 10.198
  norm       = 31.3856
  Prefactor  = 0.000100012
  norm       = 4.55535
  norm       = 0.0001
  norm       = 2.21504
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.530526
  Prefactor  = 5.36055
  Prefactor  = 0.0001
  norm       = 0.000100004
  Prefactor  = 14.7083
  Prefactor  = 1.58771
  Prefactor  = 0.0001
  Prefactor  = 7.45406
  Normalizat = 0.599185
  Prefactor  = 1.10616
 **********
 **   18 **HESSE 
 **********

 FCN=   9002.842     FROM HESSE     STATUS=OK           346 CALLS     2395 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    73.469        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     36.686        30.708        .66163E-04   -1.4496    
   3  Prefactor     .74628        1.5656        .15846E-03   -1.5535    
   4  Prefactor     12.798        12.122        .11197E-03   -1.4992    
   5  norm          10.198        13.554        .62743E-03   -1.5069    
   6  norm          31.386        11.892        .71521E-04   -1.4587    
   7  Prefactor     .10001E-03    41.461        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.5554        6.8449        .18862E-03   -1.5281    
   9  norm          .10000E-03    13.953        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.2150        1.1264        .69512E-04   -1.5410    
  11  Prefactor     .10000E-03    6.2344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.9925        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .53053        2.2312        .27889E-03   -1.5562    
  14  Prefactor     5.3605        3.7707        .14632E-03   -1.5245    
  15  Prefactor     .10000E-03    16.948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    32.146        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     14.708        15.804        .10443E-03   -1.4941    
  18  Prefactor     1.5877        4.8051        .33691E-03   -1.5456    
  19  Prefactor     .10000E-03    3.9356        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     7.4541        6.9818        .14689E-03   -1.5162    
  21  Normalizat    .59919        .25355        .45757E-03   -1.0802    
  22  Prefactor     1.1062        .11480        .15543E-03   -.89270    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.37591e-10
Minuit parameter uncertainties:
  1  0.00122805
  2  30.7213
  3  1.56567
  4  12.124
  5  13.5576
  6  11.8929
  7  0.0014394
  8  6.84607
  9  2.19795e-05
  10  1.12642
  11  1.46423e-06
  12  4.55164e-06
  13  2.1759
  14  3.77084
  15  7.12681e-05
  16  0.000718323
  17  15.8081
  18  4.80625
  19  1.32229e-06
  20  6.98257
  21  0.254038
  22  0.114822
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  5.361e+00  3.771e+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:  1.106e+00  1.148e-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:  5.992e-01  2.540e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.50
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 6.28e-08 +/- 4.41e-08
Energy Flux (Fixed Index): 1.74e-05 +/- 1.23e-05

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

Saving results to:
/scratch/kocevski/111531/likelihoodResults_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.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) = 9002.58576502
delta logL = 0.256466871468

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9002.57770533
delta logL = 0.264526552914

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.5896       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0610       1.0000          .0000       10.000    
     3 'Normalizat'    .56068       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1168       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=   9002.578     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      247 TOTAL
                     EDM=   .71E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.5879        40.763        .53321E-02    .50247E-03
   2  Index         3.0612        3.4882        .13680        .17383E-03
   3  Normalizat    .55985        .86098E-01    .10657        .57400E-04
   4  Prefactor     1.1171        .33490E-01    .36982E-01   -.11186E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.58794
  Index      = 3.0612
  Normalizat = 0.559853
  Prefactor  = 1.11713
 **********
 **   18 **HESSE 
 **********

 FCN=   9002.578     FROM HESSE     STATUS=OK            33 CALLS      280 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.5879        4.5482        .10474E-03   -1.5329    
   2  Index         3.0612        .90638        .70041E-02   -.39820    
   3  Normalizat    .55985        .25437        .47243E-03   -1.0972    
   4  Prefactor     1.1171        .11247        .15473E-03   -.88921    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.91573e-08
Minuit parameter uncertainties:
  1  4.54863
  2  0.912324
  3  0.2549
  4  0.112493
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111531': 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) = 9002.57769932
delta logL = 0.2645325701

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.588e+00  4.549e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  3.061e+00  9.123e-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:  1.117e+00  1.125e-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:  5.599e-01  2.549e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.11
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 3.06 +/- 0.91
Photon Flux (Free Index): 9.10e-08 +/- 6.36e-08
Energy Flux (Free Index): 1.77e-05 +/- 1.11e-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/111531/cmap_HighResolution_501897601_502156801_4FGL_J2040.5-1705_daily_bin1013.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.21e-02', comment='SUCCESS', photon_flux='6.28e-08', energy_flux2='1.77e-05', photon_flux_error='4.41e-08', dlogl='2.65e-01', energy_flux='1.74e-05', photon_flux2='9.10e-08', job_status='DONE', time_completed='2021-09-25 16:10:18.868397', photon_index_error2='0.91', photon_index2='3.06', ts='3.50', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='1.55e-07', energy_flux_error2='1.11e-05', EG='0.60', time_epoch_completed='1632611418.87', return_code='0', job_id='111531', GAL2='1.12', EG2='0.56', return_code2='0', energy_flux_error='1.23e-05', photon_flux_error2='6.36e-08', ts2='4.11', photon_index='2.54' WHERE bin_id='1013' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:10:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0195>
Subject: Job 111531: <4FGL_J2040.5-1705_daily_bin1013> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1013> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 25 15:55:25 2021
Job was executed on host(s) <bullet0195>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:55:40 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:55:40 2021
Terminated at Sat Sep 25 16:10:19 2021
Results reported at Sat Sep 25 16:10:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1013 310.136 -17.0901 501897601 502156801 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 :                                   783.31 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             322.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   879 sec.
    Turnaround time :                            894 sec.

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

