/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 27 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 = 7477
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin392
RA = 310.136, Dec = -17.0901
tmin = 340934401, tmax = 341193601
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='107277', job_status='RUN', time_executed='2021-09-25 15:42:57.914069', time_epoch_executed='1632609777.91' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='392'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/107277

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/107277/ft1_4FGL_J2040.5-1705_daily_bin392.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/107277/ft1_4FGL_J2040.5-1705_daily_bin392.fits outfile=/scratch/kocevski/107277/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin392.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=340934401.0 tmax=341193601.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.44
user 3.14
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits" evtable="EVENTS" scfile=/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits sctable="SC_DATA" outfile=/scratch/kocevski/107277/ltcube_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.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/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits
.....................!
real 12.61
user 12.19
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits evtable="EVENTS" scfile=/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits sctable="SC_DATA" expcube=/scratch/kocevski/107277/ltcube_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.fits outfile=/scratch/kocevski/107277/expmap_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.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/107277/ltcube_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.fits
.....................!
real 192.62
user 186.91
sys 5.10

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/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits scfile=/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits outfile=/scratch/kocevski/107277/cmap_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.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.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits scfile=/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits outfile=/scratch/kocevski/107277/cmap_HighResolution_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.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.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits evtable="EVENTS" scfile=/scratch/kocevski/107277/ft2_4FGL_J2040.5-1705_daily_bin392.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/107277/Model_4FGL_J2040.5-1705_daily_bin392.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/107277/ft1_filtered_4FGL_J2040.5-1705_daily_bin392.fits.....................!
real 70.27
user 68.87
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10126E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    33.635       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .16000E-01   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10024E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    26.755       1.0000         .10000E-03   10000.    
     8 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10196E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10409E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    20.576       1.0000         .10000E-03   10000.    
    12 'Prefactor '    22.242       1.0000         .10000E-03   10000.    
    13 'norm      '    5.7242       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .91735E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    15.799       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .54444       1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.9676       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.0890       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .97022       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=   7610.022     FROM MIGRAD    STATUS=CONVERGED    484 CALLS     2768 TOTAL
                     EDM=   .35E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.976        .53387E-05** at limit **
   2  Prefactor     33.622        36.114       -.14729E-04    .23877E-04
   3  Prefactor     .17976E-01    .77696        .24214E-06   -.49844E-04
   4  Prefactor     .10000E-03    44.354       -.12797E-04** at limit **
   5  norm          .10000E-03    5.2278       -.66114E-07** at limit **
   6  norm          .10000E-03    24.695       -.95484E-05** at limit **
   7  Prefactor     26.780        133.57        .45811E-04    .24049E-04
   8  norm          .10000E-03    7.6358        .16379E-05** at limit **
   9  norm          .10000E-03    11.983        .22640E-05** at limit **
  10  norm          .10000E-03    .93331        .50745E-06** at limit **
  11  Prefactor     20.562        21.919       -.38228E-05   -.31987E-03
  12  Prefactor     22.240        9.5003       -.18738E-06   -.67253E-06
  13  norm          5.7242        5.0615        .18869E-05   -.34801E-03
  14  Prefactor     .10000E-03    2.3058       -.34054E-06** at limit **
  15  Prefactor     .10000E-03    32.744        .21171E-04** at limit **
  16  norm          15.791        17.778       -.20647E-05   -.67462E-05
  17  Prefactor     .10000E-03    12.837       -.48550E-05** at limit **
  18  Prefactor     .56451        3.3651       -.88218E-06    .85936E-04
  19  Prefactor     4.9648        15.652       -.63544E-06   -.18169E-04
  20  Prefactor     .10000E-03    8.7786       -.42759E-05** at limit **
  21  Normalizat    1.0895        .24422        .22834E-06    .19711E-03
  22  Prefactor     .97002        .10133        .28046E-06    .34626E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 33.6224
  Prefactor  = 0.0179758
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 26.7797
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.000100001
  Prefactor  = 20.5616
  Prefactor  = 22.2403
  norm       = 5.72425
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 15.7908
  Prefactor  = 0.0001
  Prefactor  = 0.564508
  Prefactor  = 4.96481
  Prefactor  = 0.0001
  Normalizat = 1.08954
  Prefactor  = 0.970016
 **********
 **   18 **HESSE 
 **********

 FCN=   7610.022     FROM HESSE     STATUS=OK           350 CALLS     3118 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.982        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     33.622        36.124        .69094E-04   -1.4548    
   3  Prefactor     .17976E-01    2.1518        .26236E-01   -1.5681    
   4  Prefactor     .10000E-03    45.288        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    5.2536        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    25.483        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     26.780        134.34        .77449E-04   -1.4673    
   8  norm          .10000E-03    7.6457        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    11.983        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    2.7462        .14588E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     20.562        19.981        .88299E-04   -1.4801    
  12  Prefactor     22.240        9.5022        .84932E-04   -1.4764    
  13  norm          5.7242        5.0355        .16788E-03   -1.5229    
  14  Prefactor     .10000E-03    16.475        .24815E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    32.694        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          15.791        17.782        .10076E-03   -1.4913    
  17  Prefactor     .10000E-03    12.921        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .56451        17.384        .30319E-02   -1.5558    
  19  Prefactor     4.9648        15.641        .18044E-03   -1.5262    
  20  Prefactor     .10000E-03    8.8498        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.0895        .28721        .36967E-03   -.90088    
  22  Prefactor     .97002        .12361        .16596E-03   -.93736    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.1218e-09
Minuit parameter uncertainties:
  1  1.25726e-05
  2  36.1475
  3  0.392265
  4  0.000298936
  5  6.29565e-07
  6  0.000113922
  7  120.394
  8  2.56755e-06
  9  1.69066e-05
  10  8.8689e-05
  11  19.9875
  12  9.50282
  13  5.03586
  14  0.000148081
  15  6.72687e-06
  16  17.7875
  17  5.18929e-06
  18  6.26666
  19  15.654
  20  1.39354e-05
  21  0.287617
  22  0.123646
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.700e-01  1.236e-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.090e+00  2.876e-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.29e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.00e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/107277/likelihoodResults_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.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) = 7610.02270303
delta logL = -0.000288238383291

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7610.02235817
delta logL = 5.66183489354e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .23100E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6845       1.0000          .0000       10.000    
     3 'Normalizat'    1.0898       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96992       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=   7608.806     FROM MIGRAD    STATUS=CONVERGED    164 CALLS      337 TOTAL
                     EDM=   .66E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .12692E-02    .12847E-01    .56093E-03** at limit **
   2  Index         7.6527        2.4356        .16767        .10459E-03
   3  Normalizat    .93493        .53863E-01    .89337E-01   -.26649E-04
   4  Prefactor     1.0130        .23062E-01    .45890E-01    .11308E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00126918
  Index      = 7.65266
  Normalizat = 0.934929
  Prefactor  = 1.01297
 **********
 **   18 **HESSE 
 **********

 FCN=   7608.806     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      370 TOTAL
                     EDM=   .50E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .12692E-02    .35325E-01    .23472E-04   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         7.6527        7.9135        .63389E-02    .55923    
   3  Normalizat    .93493        .21316        .39571E-03   -.95243    
   4  Prefactor     1.0130        .89459E-01    .16273E-03   -.92299    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.95551e-07
Minuit parameter uncertainties:
  1  0.0128533
  2  5.28551
  3  0.213354
  4  0.0894724
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/107277': 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) = 7608.80588586
delta logL = 1.216528931

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.269e-03  1.285e-02  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  7.653e+00  5.286e+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:  1.013e+00  8.947e-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.349e-01  2.134e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.69
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 7.65 +/- 5.29
Photon Flux (Free Index): 1.21e-07 +/- 8.35e-08
Energy Flux (Free Index): 1.42e-05 +/- 1.03e-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/107277/cmap_HighResolution_340934401_341193601_4FGL_J2040.5-1705_daily_bin392.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.00e-02', comment='SUCCESS', energy_flux2='1.42e-05', dlogl='1.22e+00', photon_flux2='1.21e-07', job_status='DONE', time_completed='2021-09-25 15:55:52.584487', photon_index_error2='5.29', photon_index2='7.65', ts='-0.00', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', photon_flux_upper_limit='1.29e-07', energy_flux_error2='1.03e-05', EG='1.09', time_epoch_completed='1632610552.58', return_code='0', job_id='107277', GAL2='1.01', EG2='0.93', return_code2='102', photon_flux_error2='8.35e-08', ts2='2.69', photon_index='2.54' WHERE bin_id='392' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:55:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0054>
Subject: Job 107277: <4FGL_J2040.5-1705_daily_bin392> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin392> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep 25 15:40:40 2021
Job was executed on host(s) <bullet0054>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:42:21 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:42:21 2021
Terminated at Sat Sep 25 15:55:53 2021
Results reported at Sat Sep 25 15:55:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin392 310.136 -17.0901 340934401 341193601 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 :                                   772.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             348.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   811 sec.
    Turnaround time :                            913 sec.

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

