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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1346
RA = 310.136, Dec = -17.0901
tmin = 588211201, tmax = 588470401
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='113200', job_status='RUN', time_executed='2021-09-25 16:03:36.103016', time_epoch_executed='1632611016.1' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1346'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113200

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113200/ft1_4FGL_J2040.5-1705_daily_bin1346.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113200/ft1_4FGL_J2040.5-1705_daily_bin1346.fits outfile=/scratch/kocevski/113200/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1346.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=588211201.0 tmax=588470401.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 4.19
user 3.60
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits" evtable="EVENTS" scfile=/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits sctable="SC_DATA" outfile=/scratch/kocevski/113200/ltcube_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.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/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits
.....................!
real 12.95
user 12.21
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits evtable="EVENTS" scfile=/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits sctable="SC_DATA" expcube=/scratch/kocevski/113200/ltcube_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.fits outfile=/scratch/kocevski/113200/expmap_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.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/113200/ltcube_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.fits
.....................!
real 191.89
user 185.79
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/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits scfile=/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits outfile=/scratch/kocevski/113200/cmap_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits scfile=/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits outfile=/scratch/kocevski/113200/cmap_HighResolution_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.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.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits evtable="EVENTS" scfile=/scratch/kocevski/113200/ft2_4FGL_J2040.5-1705_daily_bin1346.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113200/Model_4FGL_J2040.5-1705_daily_bin1346.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/113200/ft1_filtered_4FGL_J2040.5-1705_daily_bin1346.fits.....................!
real 64.54
user 63.09
sys 1.24

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.1668       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    24.063       1.0000         .10000E-03   10000.    
     6 'norm      '    11.118       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.8949       1.0000         .10000E-03   10000.    
    11 'Prefactor '    12.114       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.3433       1.0000         .10000E-03   10000.    
    13 'norm      '    .64937       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.8526       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    22.469       1.0000         .10000E-03   10000.    
    18 'Prefactor '    15.272       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .72437       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0758       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=   6943.024     FROM MIGRAD    STATUS=CONVERGED    467 CALLS     2413 TOTAL
                     EDM=   .65E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    18.996       -.14872E-05** at limit **
   2  Prefactor     .10000E-03    47.302        .34406E-05** at limit **
   3  Prefactor     3.1668        1.9904        .23014E-07   -.62712E-05
   4  Prefactor     .10000E-03    8.4246       -.28066E-06** at limit **
   5  norm          24.061        16.904        .13615E-06    .16278E-05
   6  norm          11.117        11.363        .13979E-06   -.10550E-04
   7  Prefactor     .10000E-03    42.715        .21436E-06** at limit **
   8  norm          .10000E-03    8.6687        .38135E-06** at limit **
   9  norm          .10000E-03    10.916       -.19703E-06** at limit **
  10  norm          1.8945        1.6886       -.78320E-07   -.17321E-03
  11  Prefactor     12.114        18.756        .14959E-05   -.62452E-04
  12  Prefactor     5.3431        7.4631        .30291E-06   -.51093E-05
  13  norm          .64954        3.4779        .19773E-05   -.15424E-03
  14  Prefactor     4.8516        5.5285       -.14827E-06   -.22465E-03
  15  Prefactor     .10000E-03    39.768       -.14929E-05** at limit **
  16  norm          .10000E-03    17.608        .10146E-05** at limit **
  17  Prefactor     22.465        22.014       -.68117E-07   -.15773E-04
  18  Prefactor     15.272        8.8605        .12273E-06    .91442E-05
  19  Prefactor     .10000E-03    75.049       -.22987E-05** at limit **
  20  Prefactor     .10000E-03    17.904        .59683E-06** at limit **
  21  Normalizat    .72437        .28037       -.46403E-06   -.35809E-04
  22  Prefactor     1.0759        .11536       -.21331E-06   -.51680E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 3.16678
  Prefactor  = 0.0001
  norm       = 24.0606
  norm       = 11.1169
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 1.89447
  Prefactor  = 12.1144
  Prefactor  = 5.34308
  norm       = 0.649538
  Prefactor  = 4.85161
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 22.4648
  Prefactor  = 15.2724
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.724367
  Prefactor  = 1.07587
 **********
 **   18 **HESSE 
 **********

 FCN=   6943.024     FROM HESSE     STATUS=OK           344 CALLS     2757 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    19.351        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    49.089        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.1668        1.9899        .88960E-04   -1.5352    
   4  Prefactor     .10000E-03    8.4620        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          24.061        16.940        .81659E-04   -1.4727    
   6  norm          11.117        11.357        .12015E-03   -1.5041    
   7  Prefactor     .10000E-03    42.725        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    8.7238        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    10.931        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.8945        1.6674        .91038E-04   -1.5433    
  11  Prefactor     12.114        18.727        .57547E-03   -1.5012    
  12  Prefactor     5.3431        7.4563        .17386E-03   -1.5246    
  13  norm          .64954        3.6117        .30349E-03   -1.5547    
  14  Prefactor     4.8516        5.6076        .18261E-03   -1.5267    
  15  Prefactor     .10000E-03    40.149        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    17.789        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     22.465        22.023        .84502E-04   -1.4760    
  18  Prefactor     15.272        8.8795        .10249E-03   -1.4926    
  19  Prefactor     .10000E-03    77.242        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    18.129        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .72437        .31435        .44947E-03   -1.0294    
  22  Prefactor     1.0759        .13183        .16182E-03   -.90241    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44676e-10
Minuit parameter uncertainties:
  1  0.000149905
  2  0.000541847
  3  1.98993
  4  1.82909e-05
  5  16.9437
  6  11.3587
  7  3.31135e-05
  8  2.45091e-05
  9  1.56731e-05
  10  1.66747
  11  18.7357
  12  7.45762
  13  3.06334
  14  5.60817
  15  0.000221908
  16  9.53736e-05
  17  22.0306
  18  8.88025
  19  0.000371367
  20  5.98001e-05
  21  0.31514
  22  0.131874
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.852e+00  5.608e+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.076e+00  1.319e-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:  7.244e-01  3.151e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/113200/likelihoodResults_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.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) = 6942.78476749
delta logL = 0.239726901881

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6942.78004222
delta logL = 0.244452178286

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.2781       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0597       1.0000          .0000       10.000    
     3 'Normalizat'    .69583       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0830       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=   6942.780     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      246 TOTAL
                     EDM=   .65E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.2781        77.379        .55912E-02    .83818E-03
   2  Index         3.0597        6.4968        .14817        .12220E-03
   3  Normalizat    .69582        .84449E-01    .10330        .40824E-04
   4  Prefactor     1.0830        .36673E-01    .38272E-01    .52179E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.27814
  Index      = 3.05972
  Normalizat = 0.69582
  Prefactor  = 1.08298
 **********
 **   18 **HESSE 
 **********

 FCN=   6942.780     FROM HESSE     STATUS=OK            33 CALLS      279 TOTAL
                     EDM=   .83E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.2781        5.2946        .13174E-03   -1.5346    
   2  Index         3.0597        .90984        .75465E-02   -.39852    
   3  Normalizat    .69582        .30131        .45789E-03   -1.0406    
   4  Prefactor     1.0830        .12832        .16132E-03   -.90012    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.31845e-09
Minuit parameter uncertainties:
  1  5.29534
  2  0.915858
  3  0.302033
  4  0.128353
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113200': 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) = 6942.78004221
delta logL = 0.244452180883

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.278e+00  5.295e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  3.060e+00  9.159e-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.083e+00  1.284e-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:  6.958e-01  3.020e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.48
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 3.06 +/- 0.92
Photon Flux (Free Index): 8.30e-08 +/- 7.87e-08
Energy Flux (Free Index): 1.61e-05 +/- 1.59e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/113200/cmap_HighResolution_588211201_588470401_4FGL_J2040.5-1705_daily_bin1346.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.48e-02', comment='SUCCESS', energy_flux2='1.61e-05', dlogl='2.44e-01', photon_flux2='8.30e-08', job_status='DONE', time_completed='2021-09-25 16:15:15.092375', photon_index_error2='0.92', photon_index2='3.06', ts='0.96', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.90e-07', energy_flux_error2='1.59e-05', EG='0.72', time_epoch_completed='1632611715.09', return_code='0', job_id='113200', GAL2='1.08', EG2='0.70', return_code2='0', photon_flux_error2='7.87e-08', ts2='1.48', photon_index='2.54' WHERE bin_id='1346' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:15:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0146>
Subject: Job 113200: <4FGL_J2040.5-1705_daily_bin1346> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1346 310.136 -17.0901 588211201 588470401 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 :                                   691.38 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             294.89 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   861 sec.
    Turnaround time :                            875 sec.

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

