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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin451
RA = 310.136, Dec = -17.0901
tmin = 356227201, tmax = 356486401
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='107362', job_status='RUN', time_executed='2021-09-25 15:46:00.465231', time_epoch_executed='1632609960.47' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='451'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/107362

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/107362/ft1_4FGL_J2040.5-1705_daily_bin451.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...
fmerge4.1 : Error, missing column list names, file /scratch/kocevski/107362/ft2_filtered_0009.fits
fmerge4.1 : Fatal error!
FCCMPL: not found in table: RA_SUN
FCCMPL: not found in table: DEC_SUN

Merged file saved to:
/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/107362/ft1_4FGL_J2040.5-1705_daily_bin451.fits outfile=/scratch/kocevski/107362/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin451.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=356227201.0 tmax=356486401.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.13
user 2.93
sys 0.17

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits" evtable="EVENTS" scfile=/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits sctable="SC_DATA" outfile=/scratch/kocevski/107362/ltcube_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.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/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits
.....................!
real 3.75
user 3.41
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits evtable="EVENTS" scfile=/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits sctable="SC_DATA" expcube=/scratch/kocevski/107362/ltcube_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.fits outfile=/scratch/kocevski/107362/expmap_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.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/107362/ltcube_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.fits
.....................!
real 190.83
user 185.54
sys 4.38

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/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits scfile=/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits outfile=/scratch/kocevski/107362/cmap_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.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
gtbin: WARNING: Spacecraft data ceases before end of last GTI.
gtbin: WARNING: EXPOSURE keyword calculation may not be accurate.
real 0.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits scfile=/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits outfile=/scratch/kocevski/107362/cmap_HighResolution_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.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
gtbin: WARNING: Spacecraft data ceases before end of last GTI.
gtbin: WARNING: EXPOSURE keyword calculation may not be accurate.
real 0.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits evtable="EVENTS" scfile=/scratch/kocevski/107362/ft2_4FGL_J2040.5-1705_daily_bin451.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/107362/Model_4FGL_J2040.5-1705_daily_bin451.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/107362/ft1_filtered_4FGL_J2040.5-1705_daily_bin451.fits......................!
real 30.98
user 29.69
sys 1.17

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    46.225       1.0000         .10000E-03   10000.    
     5 'norm      '    18.789       1.0000         .10000E-03   10000.    
     6 'norm      '    2.9923       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .46618E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    5.2805       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.9205       1.0000         .10000E-03   10000.    
    13 'norm      '    8.9231       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    23.464       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    16.466       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.4107       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .83634       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=   2461.421     FROM MIGRAD    STATUS=CONVERGED    468 CALLS     2348 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.213        .18390E-04** at limit **
   2  Prefactor     .10000E-03    51.145        .36424E-04** at limit **
   3  Prefactor     .10000E-03    2.5879       -.23293E-06** at limit **
   4  Prefactor     46.231        30.231        .22024E-05    .34234E-04
   5  norm          18.787        21.881       -.32887E-06   -.55315E-05
   6  norm          2.9918        14.585       -.14076E-05   -.82456E-04
   7  Prefactor     .10003E-03    906.80       -.26469E-03** at limit **
   8  norm          .10000E-03    8.5075       -.33532E-06** at limit **
   9  norm          .10000E-03    40.095       -.24688E-04** at limit **
  10  norm          5.2807        2.6910        .20324E-07    .19431E-03
  11  Prefactor     .10000E-03    18.871       -.81258E-05** at limit **
  12  Prefactor     1.9200        12.124       -.14114E-05   -.27056E-03
  13  norm          8.9233        7.8401       -.63282E-07   -.19671E-04
  14  Prefactor     .10000E-03    3.2446       -.16301E-07** at limit **
  15  Prefactor     .10000E-03    109.58       -.19231E-04** at limit **
  16  norm          .10000E-03    26.888       -.94138E-05** at limit **
  17  Prefactor     23.459        31.774       -.28040E-05    .40489E-05
  18  Prefactor     .10000E-03    11.289        .39208E-06** at limit **
  19  Prefactor     16.465        23.225       -.15086E-06   -.49151E-04
  20  Prefactor     .10000E-03    8.2981        .28539E-06** at limit **
  21  Normalizat    1.4108        .40180        .34944E-06    .82480E-04
  22  Prefactor     .83630        .17674        .20096E-06    .21813E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 46.2311
  norm       = 18.787
  norm       = 2.99177
  Prefactor  = 0.000100029
  norm       = 0.0001
  norm       = 0.0001
  norm       = 5.28066
  Prefactor  = 0.0001
  Prefactor  = 1.91997
  norm       = 8.92328
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 23.459
  Prefactor  = 0.0001
  Prefactor  = 16.4649
  Prefactor  = 0.0001
  Normalizat = 1.41085
  Prefactor  = 0.836301
 **********
 **   18 **HESSE 
 **********

 FCN=   2461.421     FROM HESSE     STATUS=OK           334 CALLS     2682 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    22.219        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    51.230        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.6290        .15456E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     46.231        29.961        .58973E-04   -1.4347    
   5  norm          18.787        21.919        .92400E-04   -1.4841    
   6  norm          2.9918        14.518        .23467E-03   -1.5362    
   7  Prefactor     .10003E-03    909.04        .21192E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    8.5077        .14135E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    40.204        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          5.2807        2.6907        .56373E-04   -1.5248    
  11  Prefactor     .10000E-03    18.908        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.9200        12.143        .29985E-03   -1.5431    
  13  norm          8.9233        7.8404        .12610E-03   -1.5110    
  14  Prefactor     .10000E-03    3.2543        .87264E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    109.71        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    26.903        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     23.459        31.819        .82693E-04   -1.4739    
  18  Prefactor     .10000E-03    11.361        .16276E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     16.465        23.225        .49351E-03   -1.4896    
  20  Prefactor     .10000E-03    8.2997        .13960E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.4108        .47632        .33162E-03   -.80315    
  22  Prefactor     .83630        .21044        .18007E-03   -.98404    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.35092e-10
Minuit parameter uncertainties:
  1  9.69493e-06
  2  6.33042e-05
  3  3.47127e-05
  4  29.9705
  5  21.9283
  6  13.186
  7  0.0103662
  8  2.36839e-07
  9  4.42672e-05
  10  2.69077
  11  1.04216e-05
  12  9.65956
  13  7.84134
  14  4.48115e-07
  15  2.53445e-05
  16  5.97557e-06
  17  31.842
  18  3.39728e-06
  19  23.2381
  20  1.07697e-08
  21  0.477833
  22  0.210642
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  4.481e-07  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:  8.363e-01  2.106e-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.411e+00  4.778e-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.74e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.36e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/107362/likelihoodResults_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.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) = 2461.4227993
delta logL = -0.00144763121534

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 2461.42135328
delta logL = -1.60791978487e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11029E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5272       1.0000          .0000       10.000    
     3 'Normalizat'    1.4111       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83621       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   2461.421     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      250 TOTAL
                     EDM=   .20E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.677        .88016E-02** at limit **
   2  Index         2.0148        8.7949        .50000        .11579E-06
   3  Normalizat    1.4108        .30088E-01    .33162E-03    .13923E-03
   4  Prefactor     .83630        .13051E-01    .18007E-03    .29046E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.01476
  Normalizat = 1.41085
  Prefactor  = 0.836301
 **********
 **   18 **HESSE 
 **********

 FCN=   2461.421     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      279 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    301.76        .95294E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0148        5.9803        .50000       -.63982    
   3  Normalizat    1.4108        .10373        .66324E-04   -.80315    
   4  Prefactor     .83630        .44998E-01    .36014E-04   -.98404    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.95365e-10
Minuit parameter uncertainties:
  1  0.00016031
  2  1157.56
  3  0.103748
  4  0.045
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/107362': 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) = 2461.42134922
delta logL = 2.44630609814e-06

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  1.603e-04  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.015e+00  1.158e+03  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.363e-01  4.500e-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:  1.411e+00  1.037e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/107362/cmap_HighResolution_356227201_356486401_4FGL_J2040.5-1705_daily_bin451.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.36e-02', job_status='DONE', photon_flux_upper_limit='1.74e-07', time_completed='2021-09-25 15:53:25.060551', job_id='107362', GAL2='0.84', fit_tolerance='1e-08', EG2='1.41', EG='1.41', time_epoch_completed='1632610405.06', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.84', dlogl='2.45e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='451' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:53:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0066>
Subject: Job 107362: <4FGL_J2040.5-1705_daily_bin451> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin451 310.136 -17.0901 356227201 356486401 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 :                                   444.12 sec.
    Max Memory :                                 1211 MB
    Average Memory :                             280.52 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   642 sec.
    Turnaround time :                            759 sec.

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

