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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1429
RA = 310.136, Dec = -17.0901
tmin = 609724801, tmax = 609984001
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='113342', job_status='RUN', time_executed='2021-09-25 16:01:35.955282', time_epoch_executed='1632610895.96' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1429'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113342

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113342/ft1_4FGL_J2040.5-1705_daily_bin1429.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113342/ft1_4FGL_J2040.5-1705_daily_bin1429.fits outfile=/scratch/kocevski/113342/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1429.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=609724801.0 tmax=609984001.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.60
user 2.38
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits" evtable="EVENTS" scfile=/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits sctable="SC_DATA" outfile=/scratch/kocevski/113342/ltcube_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.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/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits
.....................!
real 15.58
user 15.23
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits evtable="EVENTS" scfile=/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits sctable="SC_DATA" expcube=/scratch/kocevski/113342/ltcube_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.fits outfile=/scratch/kocevski/113342/expmap_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.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/113342/ltcube_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.fits
.....................!
real 192.86
user 188.27
sys 4.14

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/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits scfile=/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits outfile=/scratch/kocevski/113342/cmap_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.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.55
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits scfile=/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits outfile=/scratch/kocevski/113342/cmap_HighResolution_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.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.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits evtable="EVENTS" scfile=/scratch/kocevski/113342/ft2_4FGL_J2040.5-1705_daily_bin1429.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113342/Model_4FGL_J2040.5-1705_daily_bin1429.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/113342/ft1_filtered_4FGL_J2040.5-1705_daily_bin1429.fits.....................!
real 86.56
user 85.22
sys 1.16

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    58.538       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.3900       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    3.8535       1.0000         .10000E-03   10000.    
     6 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    104.59       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .11289E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    16.000       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.6715       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.1783       1.0000         .10000E-03   10000.    
    13 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .14092E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    10.876       1.0000         .10000E-03   10000.    
    17 'Prefactor '    14.078       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    12.276       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .93716       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0334       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=   9562.830     FROM MIGRAD    STATUS=CONVERGED    471 CALLS     2400 TOTAL
                     EDM=   .39E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.255       -.23397E-06** at limit **
   2  Prefactor     58.540        43.125        .12538E-05   -.37615E-04
   3  Prefactor     1.3903        1.8316       -.46848E-06   -.13241E-02
   4  Prefactor     .10000E-03    11.590        .35560E-06** at limit **
   5  norm          3.8539        11.907        .44260E-06   -.13647E-03
   6  norm          .10000E-03    2.9428       -.25951E-07** at limit **
   7  Prefactor     104.58        90.663       -.84137E-05    .12379E-03
   8  norm          .10000E-03    5.6863        .31606E-07** at limit **
   9  norm          .10000E-03    58.736        .16237E-05** at limit **
  10  norm          16.000        2.3873        .33852E-08   -.36574E-05
  11  Prefactor     7.6691        14.208       -.12048E-05   -.15140E-04
  12  Prefactor     2.1763        6.6612       -.75114E-05   -.91939E-04
  13  norm          .10000E-03    1.9320       -.31260E-07** at limit **
  14  Prefactor     .10000E-03    1.1179       -.35633E-07** at limit **
  15  Prefactor     .10000E-03    89.384       -.17112E-05** at limit **
  16  norm          10.860        22.919       -.19888E-05    .80366E-04
  17  Prefactor     14.081        14.790        .58560E-06   -.10212E-03
  18  Prefactor     .10000E-03    1.4807        .24928E-07** at limit **
  19  Prefactor     12.276        11.656        .22684E-06   -.50533E-04
  20  Prefactor     .10000E-03    2.6277       -.44803E-07** at limit **
  21  Normalizat    .93704        .22769        .15756E-05    .39395E-04
  22  Prefactor     1.0334        .99387E-01    .20777E-06    .14414E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 58.5405
  Prefactor  = 1.39028
  Prefactor  = 0.0001
  norm       = 3.8539
  norm       = 0.0001
  Prefactor  = 104.578
  norm       = 0.0001
  norm       = 0.0001
  norm       = 15.9996
  Prefactor  = 7.66909
  Prefactor  = 2.17633
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 10.8596
  Prefactor  = 14.0806
  Prefactor  = 0.0001
  Prefactor  = 12.2765
  Prefactor  = 0.0001
  Normalizat = 0.937045
  Prefactor  = 1.03342
 **********
 **   18 **HESSE 
 **********

 FCN=   9562.830     FROM HESSE     STATUS=OK           338 CALLS     2738 TOTAL
                     EDM=   .76E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    14.270        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     58.540        43.232        .52436E-04   -1.4176    
   3  Prefactor     1.3903        1.8531        .14577E-03   -1.5472    
   4  Prefactor     .10000E-03    11.653        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          3.8539        11.904        .20558E-03   -1.5315    
   6  norm          .10000E-03    2.9551        .16379E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     104.58        89.650        .19660E-03   -1.3659    
   8  norm          .10000E-03    5.6917        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    59.847        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          16.000        2.3856        .53018E-04   -1.4908    
  11  Prefactor     7.6691        14.212        .14478E-03   -1.5154    
  12  Prefactor     2.1763        7.0282        .27895E-03   -1.5413    
  13  norm          .10000E-03    1.9785        .13269E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    1.1262        .10094E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    89.621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          10.860        22.873        .12149E-03   -1.5049    
  17  Prefactor     14.081        14.782        .10675E-03   -1.4957    
  18  Prefactor     .10000E-03    1.4844        .11620E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     12.276        11.652        .11433E-03   -1.5007    
  20  Prefactor     .10000E-03    2.6296        .15481E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .93704        .26655        .41118E-03   -.95170    
  22  Prefactor     1.0334        .11808        .17079E-03   -.91624    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.59321e-10
Minuit parameter uncertainties:
  1  1.25203e-05
  2  43.2552
  3  1.85321
  4  2.09499e-05
  5  11.9115
  6  5.48415e-06
  7  89.7666
  8  3.46277e-06
  9  0.000200817
  10  2.38564
  11  14.2186
  12  7.03083
  13  4.13904e-06
  14  1.507e-06
  15  0.000459172
  16  22.8918
  17  14.7857
  18  2.97926e-07
  19  11.6542
  20  1.2105e-06
  21  0.26693
  22  0.118114
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  1.507e-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:  1.033e+00  1.181e-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:  9.370e-01  2.669e-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: 6.21e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.84e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113342/likelihoodResults_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.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) = 9562.83399485
delta logL = -0.00421668618583

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9562.82977751
delta logL = 6.57077180222e-07

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.5216       1.0000          .0000       10.000    
     3 'Normalizat'    .93705       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0334       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=   9562.830     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      248 TOTAL
                     EDM=   .49E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.7301        .10253E-01** at limit **
   2  Index         2.0404        8.8036        .50000        .84328E-06
   3  Normalizat    .93705        .12246E-01    .41118E-03    .11862E-02
   4  Prefactor     1.0334        .53558E-02    .17079E-03    .29395E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.04035
  Normalizat = 0.937048
  Prefactor  = 1.03342
 **********
 **   18 **HESSE 
 **********

 FCN=   9562.830     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      277 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    67.973        .11306E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0404        8.6630        .50000       -.63345    
   3  Normalizat    .93705        .40850E-01    .82237E-04   -.95170    
   4  Prefactor     1.0334        .17866E-01    .34158E-04   -.91624    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.92983e-09
Minuit parameter uncertainties:
  1  7.76785e-05
  2  448.944
  3  0.0408518
  4  0.0178663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113342': 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) = 9562.82976925
delta logL = 8.91967647476e-06

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  7.768e-05  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.040e+00  4.489e+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:  1.033e+00  1.787e-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:  9.370e-01  4.085e-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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/113342/cmap_HighResolution_609724801_609984001_4FGL_J2040.5-1705_daily_bin1429.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.84e-03', job_status='DONE', photon_flux_upper_limit='6.21e-08', time_completed='2021-09-25 16:15:57.881845', job_id='113342', GAL2='1.03', fit_tolerance='1e-08', EG2='0.94', EG='0.94', time_epoch_completed='1632611757.88', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='8.92e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1429' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:15:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0065>
Subject: Job 113342: <4FGL_J2040.5-1705_daily_bin1429> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1429> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:52 2021
Job was executed on host(s) <bullet0065>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:01:13 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 16:01:13 2021
Terminated at Sat Sep 25 16:15:58 2021
Results reported at Sat Sep 25 16:15:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1429 310.136 -17.0901 609724801 609984001 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 :                                   859.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             332.74 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   885 sec.
    Turnaround time :                            906 sec.

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

