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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1631
RA = 310.136, Dec = -17.0901
tmin = 662083201, tmax = 662342401
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='560001', job_status='RUN', time_executed='2021-12-28 00:31:23.954898', time_epoch_executed='1640680283.95' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1631'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/560001

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/560001/ft1_4FGL_J2040.5-1705_daily_bin1631.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/560001/ft1_4FGL_J2040.5-1705_daily_bin1631.fits outfile=/scratch/kocevski/560001/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1631.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=662083201.0 tmax=662342401.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.88
user 3.64
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits" evtable="EVENTS" scfile=/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits sctable="SC_DATA" outfile=/scratch/kocevski/560001/ltcube_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.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/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits
.....................!
real 13.44
user 13.10
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits evtable="EVENTS" scfile=/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits sctable="SC_DATA" expcube=/scratch/kocevski/560001/ltcube_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.fits outfile=/scratch/kocevski/560001/expmap_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.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/560001/ltcube_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.fits
.....................!
real 190.62
user 184.89
sys 5.24

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/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits scfile=/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits outfile=/scratch/kocevski/560001/cmap_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.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.52
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits scfile=/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits outfile=/scratch/kocevski/560001/cmap_HighResolution_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.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.53
user 0.37
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits evtable="EVENTS" scfile=/scratch/kocevski/560001/ft2_4FGL_J2040.5-1705_daily_bin1631.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/560001/Model_4FGL_J2040.5-1705_daily_bin1631.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/560001/ft1_filtered_4FGL_J2040.5-1705_daily_bin1631.fits.....................!
real 60.78
user 59.47
sys 1.15

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    36.267       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.2549       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    5.0778       1.0000         .10000E-03   10000.    
     6 'norm      '    16.106       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    26.458       1.0000         .10000E-03   10000.    
     9 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.2372       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.3273       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10061E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10210E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    6.8606       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.6555       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .79994       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=   6217.432     FROM MIGRAD    STATUS=CONVERGED    487 CALLS     2349 TOTAL
                     EDM=   .64E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    17.076        .90712E-02** at limit **
   2  Prefactor     36.270        46.237        .16637E-02   -.42409E-03
   3  Prefactor     1.2565        2.6278        .99690E-02    .83998E-03
   4  Prefactor     .10001E-03    16.969        .90712E-02** at limit **
   5  norm          5.0786        16.097        .44608E-02    .13964E-03
   6  norm          16.106        14.809        .24950E-02    .19810E-03
   7  Prefactor     .10001E-03    194.41        .90712E-02** at limit **
   8  norm          26.460        22.062        .19470E-02    .96886E-04
   9  norm          .10000E-03    14.199        .90712E-02** at limit **
  10  norm          .10000E-03    .65954        .90712E-02** at limit **
  11  Prefactor     .10000E-03    21.701        .90712E-02** at limit **
  12  Prefactor     .10000E-03    9.5683        .90712E-02** at limit **
  13  norm          2.2374        3.3355        .68702E-02    .45022E-03
  14  Prefactor     1.3264        4.1892        .95356E-02    .10511E-02
  15  Prefactor     .10000E-03    84.881        .90712E-02** at limit **
  16  norm          .10000E-03    49.652        .90712E-02** at limit **
  17  Prefactor     6.8545        13.595        .38294E-02   -.75527E-03
  18  Prefactor     .10000E-03    2.4311        .90712E-02** at limit **
  19  Prefactor     .10000E-03    4.4632        .90712E-02** at limit **
  20  Prefactor     .10000E-03    3.4131        .90712E-02** at limit **
  21  Normalizat    1.6561        .26465        .71686E-01    .34543E-03
  22  Prefactor     .79971        .11630        .43717E-01    .36191E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100013
  Prefactor  = 36.2703
  Prefactor  = 1.25648
  Prefactor  = 0.000100011
  norm       = 5.07861
  norm       = 16.1061
  Prefactor  = 0.000100007
  norm       = 26.4605
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 2.23741
  Prefactor  = 1.32635
  Prefactor  = 0.000100001
  norm       = 0.000100001
  Prefactor  = 6.85447
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.65613
  Prefactor  = 0.79971
 **********
 **   18 **HESSE 
 **********

 FCN=   6217.432     FROM HESSE     STATUS=OK           334 CALLS     2683 TOTAL
                     EDM=   .51E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    17.081        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     36.270        46.378        .66548E-04   -1.4503    
   3  Prefactor     1.2565        2.6045        .17209E-03   -1.5484    
   4  Prefactor     .10001E-03    17.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.0786        16.101        .17843E-03   -1.5257    
   6  norm          16.106        14.746        .99798E-04   -1.4905    
   7  Prefactor     .10001E-03    194.89        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          26.460        22.110        .77882E-04   -1.4679    
   9  norm          .10000E-03    14.209        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    .68297        .12491E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    21.986        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    9.7426        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.2374        3.3182        .17025E-03   -1.5409    
  14  Prefactor     1.3264        4.1581        .27234E-03   -1.5478    
  15  Prefactor     .10000E-03    84.983        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    50.259        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     6.8545        13.612        .15318E-03   -1.5184    
  18  Prefactor     .10000E-03    2.4366        .12005E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.4662        .16269E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    3.4167        .14227E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.6561        .31950        .31714E-03   -.73481    
  22  Prefactor     .79971        .14106        .18680E-03   -.99739    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.08112e-09
Minuit parameter uncertainties:
  1  0.000955279
  2  46.4244
  3  2.60471
  4  0.000848491
  5  16.1147
  6  14.7493
  7  0.00241938
  8  22.1168
  9  0.000120317
  10  6.76113e-06
  11  0.000255864
  12  0.000100191
  13  3.31852
  14  4.15898
  15  0.000466653
  16  0.000544716
  17  13.6181
  18  6.57704e-06
  19  3.88901e-05
  20  1.93896e-05
  21  0.319892
  22  0.141123
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.326e+00  4.159e+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:  7.997e-01  1.411e-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.656e+00  3.199e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/560001/likelihoodResults_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.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) = 6217.28228354
delta logL = 0.149340703907

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6217.20864362
delta logL = 0.222980625321

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .29286       1.0000         .10000E-03   10000.    
     2 'Index     '    4.3412       1.0000          .0000       10.000    
     3 'Normalizat'    1.5994       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .81500       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=   6217.209     FROM MIGRAD    STATUS=FAILED        80 CALLS      251 TOTAL
                     EDM=   .10E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .29317        27.709        .57955E-04   -.65996E-02
   2  Index         4.3419        6.3964        .74342E-02   -.44772E-03
   3  Normalizat    1.5993        .25976        .32156E-03   -.42278E-03
   4  Prefactor     .81506        .11066        .18518E-03   -.44983E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6217.209     FROM SIMPLEX   STATUS=UNCHANGED     90 CALLS      341 TOTAL
                     EDM=   .10E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .29317        27.709        .84960E-04   -.65996E-02
   2  Index         4.3419        6.3964        .11968E-02   -.44772E-03
   3  Normalizat    1.5993        .25976        .14748E-03   -.42278E-03
   4  Prefactor     .81506        .11066        .66003E-04   -.44983E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6217.209     FROM MIGRAD    STATUS=CONVERGED     27 CALLS      368 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .29295        3.6169        .23182E-05   -.75111E-02
   2  Index         4.3423        3.5953        .29737E-03   -.34693E-03
   3  Normalizat    1.5993        .32435        .64312E-04   -.45322E-03
   4  Prefactor     .81506        .13635        .37036E-04   -.52804E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.292955
  Index      = 4.34229
  Normalizat = 1.59926
  Prefactor  = 0.815063
 **********
 **   18 **HESSE 
 **********

 FCN=   6217.209     FROM HESSE     STATUS=OK            23 CALLS      391 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .29295        3.1283        .46364E-06   -1.5600    
   2  Index         4.3423        3.3955        .59473E-04   -.13193    
   3  Normalizat    1.5993        .32438        .12862E-04   -.75026    
   4  Prefactor     .81506        .13633        .74071E-05   -.99175    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.08471e-09
Minuit parameter uncertainties:
  1  1.91443
  2  3.74066
  3  0.324805
  4  0.136388
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/560001': 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) = 6217.20864216
delta logL = 0.222982079873

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  8.151e-01  1.364e-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.599e+00  3.248e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.12
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/560001/cmap_HighResolution_662083201_662342401_4FGL_J2040.5-1705_daily_bin1631.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.13e-02', job_status='DONE', photon_flux_upper_limit='1.45e-07', time_completed='2021-12-28 00:42:15.395239', job_id='560001', GAL2='0.82', fit_tolerance='1e-08', EG2='1.60', EG='1.66', time_epoch_completed='1640680935.4', return_code2='0', ts='0.12', comment='SUCCESS', return_code='0', GAL='0.80', dlogl='2.23e-01', ts2='0.60', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1631' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Dec 28 00:42:15 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0227>
Subject: Job 560001: <4FGL_J2040.5-1705_daily_bin1631> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1631> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Tue Dec 28 00:30:34 2021
Job was executed on host(s) <bullet0227>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Dec 28 00:30:35 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Dec 28 00:30:35 2021
Terminated at Tue Dec 28 00:42:16 2021
Results reported at Tue Dec 28 00:42:16 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1631 310.136 -17.0901 662083201 662342401 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 :                                   653.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             327.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   700 sec.
    Turnaround time :                            702 sec.

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

