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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin547
RA = 310.136, Dec = -17.0901
tmin = 381110401, tmax = 381369601
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='108524', job_status='RUN', time_executed='2021-09-25 15:49:47.188647', time_epoch_executed='1632610187.19' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='547'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/108524

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/108524/ft1_4FGL_J2040.5-1705_daily_bin547.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/108524/ft1_4FGL_J2040.5-1705_daily_bin547.fits outfile=/scratch/kocevski/108524/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin547.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=381110401.0 tmax=381369601.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.85
user 3.60
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits" evtable="EVENTS" scfile=/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits sctable="SC_DATA" outfile=/scratch/kocevski/108524/ltcube_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.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/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits
.....................!
real 11.86
user 11.51
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits evtable="EVENTS" scfile=/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits sctable="SC_DATA" expcube=/scratch/kocevski/108524/ltcube_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.fits outfile=/scratch/kocevski/108524/expmap_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.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/108524/ltcube_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.fits
.....................!
real 168.63
user 151.63
sys 4.17

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/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits scfile=/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits outfile=/scratch/kocevski/108524/cmap_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.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.47
user 0.30
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits scfile=/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits outfile=/scratch/kocevski/108524/cmap_HighResolution_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.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.48
user 0.32
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits evtable="EVENTS" scfile=/scratch/kocevski/108524/ft2_4FGL_J2040.5-1705_daily_bin547.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/108524/Model_4FGL_J2040.5-1705_daily_bin547.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/108524/ft1_filtered_4FGL_J2040.5-1705_daily_bin547.fits.....................!
real 54.67
user 52.98
sys 1.06

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.5471       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.1365       1.0000         .10000E-03   10000.    
     5 'norm      '    .10333E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    10.447       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11378E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10407E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10139E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.2471       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10913E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10163E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    5.7126       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.5487       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .73082E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .15980E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    18.735       1.0000         .10000E-03   10000.    
    18 'Prefactor '    9.7921       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10241E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10689E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.3739       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0617       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=   6793.498     FROM MIGRAD    STATUS=CONVERGED    497 CALLS     2411 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.500       -.26153E-05** at limit **
   2  Prefactor     3.4397        138.36       -.36350E-04   -.34424E-05
   3  Prefactor     .10000E-03    1.3773        .31897E-06** at limit **
   4  Prefactor     9.1499        19.593       -.11389E-04   -.36764E-04
   5  norm          .10000E-03    17.675       -.81209E-05** at limit **
   6  norm          10.449        11.882        .29007E-05    .10856E-03
   7  Prefactor     .10000E-03    43.246       -.10363E-04** at limit **
   8  norm          .10000E-03    7.7748       -.10422E-05** at limit **
   9  norm          .10000E-03    14.451        .73799E-06** at limit **
  10  norm          2.2470        1.6328       -.24541E-07   -.39060E-03
  11  Prefactor     .10000E-03    22.410        .80144E-05** at limit **
  12  Prefactor     .10000E-03    7.1059        .27863E-06** at limit **
  13  norm          5.7147        4.3806       -.10020E-06   -.37490E-03
  14  Prefactor     1.5457        1.8765        .83609E-06   -.31466E-02
  15  Prefactor     .10000E-03    75.058        .44961E-04** at limit **
  16  norm          .10000E-03    13.720        .49595E-05** at limit **
  17  Prefactor     18.727        22.419        .35951E-05    .15521E-04
  18  Prefactor     9.7990        11.733       -.10976E-06   -.23254E-03
  19  Prefactor     .10000E-03    8.5547        .10237E-05** at limit **
  20  Prefactor     .10000E-03    6.0589       -.13306E-06** at limit **
  21  Normalizat    1.3742        .30474       -.15988E-05    .65107E-04
  22  Prefactor     1.0615        .12417        .16522E-05   -.14163E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 3.43969
  Prefactor  = 0.000100001
  Prefactor  = 9.14986
  norm       = 0.0001
  norm       = 10.4487
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 2.24704
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.71466
  Prefactor  = 1.54567
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 18.7273
  Prefactor  = 9.79901
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.37423
  Prefactor  = 1.06154
 **********
 **   18 **HESSE 
 **********

 FCN=   6793.498     FROM HESSE     STATUS=OK           338 CALLS     2749 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.496        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     3.4397        139.21        .21461E-03   -1.5337    
   3  Prefactor     .10000E-03    1.4060        .18795E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.1499        19.512        .13259E-03   -1.5103    
   5  norm          .10000E-03    17.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          10.449        11.874        .12396E-03   -1.5061    
   7  Prefactor     .10000E-03    43.249        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    7.7845        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    14.468        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.2470        1.6282        .86143E-04   -1.5408    
  11  Prefactor     .10000E-03    22.606        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    7.1888        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          5.7147        4.3857        .73283E-03   -1.5230    
  14  Prefactor     1.5457        5.3478        .16633E-02   -1.5459    
  15  Prefactor     .10000E-03    75.047        .20955E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    13.724        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     18.727        22.526        .92533E-04   -1.4842    
  18  Prefactor     9.7990        11.875        .64029E-03   -1.5082    
  19  Prefactor     .10000E-03    8.5618        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    6.0661        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.3742        .37029        .39364E-03   -.81377    
  22  Prefactor     1.0615        .14913        .18069E-03   -.90705    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.93899e-08
Minuit parameter uncertainties:
  1  1.65539e-05
  2  43.8734
  3  6.57064e-05
  4  19.5253
  5  9.313e-06
  6  11.8762
  7  9.67792e-05
  8  7.41389e-06
  9  1.29663e-06
  10  1.62826
  11  2.64993e-05
  12  7.88782e-06
  13  4.38593
  14  5.34946
  15  0.000532197
  16  1.76759e-05
  17  22.536
  18  11.8782
  19  1.46429e-06
  20  4.73601e-06
  21  0.371015
  22  0.149184
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.546e+00  5.349e+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.062e+00  1.492e-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.374e+00  3.710e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/108524/likelihoodResults_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.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) = 6793.49123301
delta logL = 0.0064445054677

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6793.49004594
delta logL = 0.00763157135862

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3230       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7759       1.0000          .0000       10.000    
     3 'Normalizat'    1.3695       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0628       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6793.490     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      264 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3229        6.8851        .14201E-02   -.85447E-03
   2  Index         2.7754        2.2511        .72783E-02    .97640E-05
   3  Normalizat    1.3695        .35478        .39422E-03    .60561E-06
   4  Prefactor     1.0628        .14462        .18060E-03    .60432E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.32288
  Index      = 2.77543
  Normalizat = 1.36951
  Prefactor  = 1.06283
 **********
 **   18 **HESSE 
 **********

 FCN=   6793.490     FROM HESSE     STATUS=OK            25 CALLS      289 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3229        5.1244        .56803E-04   -1.5478    
   2  Index         2.7754        1.9388        .29113E-03   -.46108    
   3  Normalizat    1.3695        .35534        .15769E-04   -.81515    
   4  Prefactor     1.0628        .14474        .36119E-04   -.90664    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.78992e-09
Minuit parameter uncertainties:
  1  5.1261
  2  2.00514
  3  0.355984
  4  0.144789
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/108524': 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) = 6793.4900459
delta logL = 0.00763161518989

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.323e+00  5.126e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.775e+00  2.005e+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.063e+00  1.448e-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.370e+00  3.560e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.10
Ra Dec: 310.136 -17.090

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/108524/cmap_HighResolution_381110401_381369601_4FGL_J2040.5-1705_daily_bin547.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.34e-02', job_status='DONE', photon_flux_upper_limit='1.72e-07', time_completed='2021-09-25 15:59:31.689225', job_id='108524', GAL2='1.06', fit_tolerance='1e-08', EG2='1.37', EG='1.37', time_epoch_completed='1632610771.69', return_code2='0', ts='0.10', comment='SUCCESS', return_code='0', GAL='1.06', dlogl='7.63e-03', ts2='0.11', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='547' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:59:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0168>
Subject: Job 108524: <4FGL_J2040.5-1705_daily_bin547> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin547> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 25 15:45:19 2021
Job was executed on host(s) <bullet0168>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:46:39 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:46:39 2021
Terminated at Sat Sep 25 15:59:32 2021
Results reported at Sat Sep 25 15:59:32 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin547 310.136 -17.0901 381110401 381369601 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 :                                   570.26 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             271.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   772 sec.
    Turnaround time :                            853 sec.

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

