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


Performing analysis on: 4FGL_J1340.4+6926_daily_bin976
RA = 205.11, Dec = 69.4446
tmin = 492307201, tmax = 492566401
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='884150', job_status='RUN', time_executed='2021-09-08 09:00:57.758540', time_epoch_executed='1631116857.76' WHERE source_name='4FGL J1340.4+6926' and cadence='daily' and bin_id='976'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/884150

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/884150/ft1_4FGL_J1340.4+6926_daily_bin976.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/884150/ft1_4FGL_J1340.4+6926_daily_bin976.fits outfile=/scratch/kocevski/884150/ft1_filteredMKT_4FGL_J1340.4+6926_daily_bin976.fits ra=205.11 dec=69.4446 rad=12.0 tmin=492307201.0 tmax=492566401.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.10
user 2.88
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.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/884150/ft1_filteredMKT_4FGL_J1340.4+6926_daily_bin976.fits evtable="EVENTS" outfile="/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.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.30
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits" evtable="EVENTS" scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits sctable="SC_DATA" outfile=/scratch/kocevski/884150/ltcube_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.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/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits
.....................!
real 12.86
user 12.51
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits evtable="EVENTS" scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits sctable="SC_DATA" expcube=/scratch/kocevski/884150/ltcube_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits outfile=/scratch/kocevski/884150/expmap_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.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/884150/ltcube_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits
.....................!
real 154.24
user 149.56
sys 4.36

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 227 point sources and 0 extended sources

Setting source of interest to:
4FGL J1340.4+6926 @ 205.11 69.4446

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits outfile=/scratch/kocevski/884150/cmap_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.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=205.11 yref=69.4446 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.30
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits outfile=/scratch/kocevski/884150/cmap_HighResolution_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.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=205.11 yref=69.4446 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.31
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits evtable="EVENTS" scfile=/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/884150/Model_4FGL_J1340.4+6926_daily_bin976.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/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits.....................!
real 40.57
user 39.42
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits', '/scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits', expMap='/scratch/kocevski/884150/expmap_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits', expCube='/scratch/kocevski/884150/ltcube_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/884150/Model_4FGL_J1340.4+6926_daily_bin976.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1340.4+6926'

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  1.968e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
378        Index:  2.535e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/884150/ft1_filtered_4FGL_J1340.4+6926_daily_bin976.fits
Spacecraft file(s): /scratch/kocevski/884150/ft2_4FGL_J1340.4+6926_daily_bin976.fits
Exposure map: /scratch/kocevski/884150/expmap_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits
Exposure cube: /scratch/kocevski/884150/ltcube_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/884150/Model_4FGL_J1340.4+6926_daily_bin976.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) = 4465.121827

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.9798       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10407E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    32.389       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .35076E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    97.444       1.0000         .10000E-03   10000.    
     9 'Prefactor '    33.882       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10278E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10039E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .24163E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10254E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    26.263       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .93022E-01   1.0000         .10000E-03   10000.    
    25 'Prefactor '    35.711       1.0000         .10000E-03   10000.    
    26 'Normalizat'    1.3114       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .56796       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4465.110     FROM MIGRAD    STATUS=CONVERGED    664 CALLS     3340 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.777        .34772E-06** at limit **
   2  Prefactor     4.9784        5.4575        .28778E-05   -.12733E-03
   3  Prefactor     .10003E-03    347.59        .72299E-05** at limit **
   4  Prefactor     32.370        28.088        .10433E-05    .22587E-03
   5  Prefactor     .10000E-03    29.795        .17425E-05** at limit **
   6  norm          .10000E-03    3.1591       -.16836E-06** at limit **
   7  Prefactor     .10000E-03    18.381        .77129E-06** at limit **
   8  Prefactor     97.429        70.985       -.11442E-05   -.13634E-03
   9  Prefactor     33.865        50.943       -.10240E-05   -.92417E-04
  10  Prefactor     .10000E-03    11.559       -.45024E-06** at limit **
  11  Prefactor     .10000E-03    2.7046       -.21963E-07** at limit **
  12  Prefactor     .10000E-03    6.0690       -.13186E-07** at limit **
  13  Prefactor     .10000E-03    12.401        .49733E-06** at limit **
  14  Prefactor     .10000E-03    5.8200        .32017E-06** at limit **
  15  Prefactor     .10000E-03    13.019       -.76634E-06** at limit **
  16  Prefactor     .10000E-03    26.879        .42152E-06** at limit **
  17  Prefactor     .10000E-03    19.535       -.43899E-06** at limit **
  18  Prefactor     .10019E-03    315.10        .15564E-04** at limit **
  19  Prefactor     .10000E-03    65.376        .28497E-06** at limit **
  20  Prefactor     .10000E-03    8.8657        .13615E-07** at limit **
  21  Prefactor     26.267        30.512        .42501E-07    .31684E-04
  22  Prefactor     .10000E-03    24.342       -.13504E-05** at limit **
  23  Prefactor     .10000E-03    36.598       -.12645E-05** at limit **
  24  Prefactor     .11505E-03    26.079       -.37861E-05** at limit **
  25  Prefactor     35.796        34.029       -.18246E-06    .16061E-03
  26  Normalizat    1.3117        .18521       -.67570E-06    .30578E-03
  27  Prefactor     .56800        .18206        .46729E-06    .13399E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 4.9784
  Prefactor  = 0.000100031
  Prefactor  = 32.3696
  Prefactor  = 0.000100002
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 97.4291
  Prefactor  = 33.8652
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.00010019
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 26.2665
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Prefactor  = 0.000115051
  Prefactor  = 35.7965
  Normalizat = 1.31174
  Prefactor  = 0.568005
 **********
 **   18 **HESSE 
 **********

 FCN=   4465.110     FROM HESSE     STATUS=OK           480 CALLS     3820 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.789        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     4.9784        5.5752        .80629E-03   -1.5262    
   3  Prefactor     .10003E-03    356.72        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     32.370        28.322        .70407E-04   -1.4569    
   5  Prefactor     .10000E-03    30.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    17.192        .22900E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    18.434        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     97.429        71.361        .40721E-04   -1.3731    
   9  Prefactor     33.865        51.138        .68843E-04   -1.4543    
  10  Prefactor     .10000E-03    11.575        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.7541        .10717E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.0779        .16077E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    12.423        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    14.741        .31188E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    13.309        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    27.274        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    19.563        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10019E-03    334.47        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    65.495        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    8.8772        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     26.267        30.527        .78170E-04   -1.4682    
  22  Prefactor     .10000E-03    24.505        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    36.735        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .11505E-03    31.252        .80818E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     35.796        34.169        .67062E-04   -1.4511    
  26  Normalizat    1.3117        .20888        .19469E-03   -.83216    
  27  Prefactor     .56800        .20460        .28520E-03   -1.0895    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.2226e-09
Minuit parameter uncertainties:
  1  6.22409e-05
  2  5.57575
  3  0.00674302
  4  28.3339
  5  0.000519376
  6  0.000151318
  7  0.000180849
  8  71.4235
  9  51.2044
  10  8.19769e-05
  11  2.23122e-06
  12  2.93359e-06
  13  9.7885e-05
  14  2.95682e-05
  15  0.00011406
  16  0.00018543
  17  0.000108086
  18  0.0160207
  19  0.000130348
  20  4.99758e-06
  21  30.5456
  22  0.000372739
  23  0.000427123
  24  0.0433986
  25  34.1872
  26  0.209015
  27  0.204863
Done.

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

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  1.000e-04  2.934e-06  1.000e-04  1.000e+04 ( 1.000e-13)
378        Index:  2.535e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  5.680e-01  2.049e-01  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  1.312e+00  2.090e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 205.110 69.445
Photon Flux Upper Limit: 5.55e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.33e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/884150/likelihoodResults_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.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) = 4465.1108766
delta logL = -0.00077962332125

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4465.11009756
delta logL = -5.89595401834e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10591E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5109       1.0000          .0000       10.000    
     3 'Normalizat'    1.3119       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .56785       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7280E+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=   4465.110     FROM MIGRAD    STATUS=CONVERGED    100 CALLS      253 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    23.759        .16441E-01** at limit **
   2  Index         1.8747        8.7156        .50000        .57128E-06
   3  Normalizat    1.3117        .74335E-02    .19469E-03   -.61239E-03
   4  Prefactor     .56800        .74805E-02    .28520E-03   -.41360E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.87467
  Normalizat = 1.31174
  Prefactor  = 0.568005
 **********
 **   18 **HESSE 
 **********

 FCN=   4465.110     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      282 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    208.49        .19242E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8747        7.1933        .50000       -.67522    
   3  Normalizat    1.3117        .22582E-01    .38938E-04   -.83217    
   4  Prefactor     .56800        .22725E-01    .57040E-04   -1.0895    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.21654e-08
Minuit parameter uncertainties:
  1  7.28684e-05
  2  781.086
  3  0.0225823
  4  0.0227253
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/884150': 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) = 4465.11009449
delta logL = 2.48225660471e-06

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  1.000e-04  7.287e-05  1.000e-04  1.000e+04 ( 1.000e-13)
378        Index:  1.875e+00  7.811e+02  0.000e+00  1.000e+01 (-1.000e+00)
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  5.680e-01  2.273e-02  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  1.312e+00  2.258e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 205.110 69.445

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/884150/cmap_HighResolution_492307201_492566401_4FGL_J1340.4+6926_daily_bin976.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.33e-03', job_status='DONE', photon_flux_upper_limit='5.55e-08', time_completed='2021-09-08 09:11:27.759005', job_id='884150', GAL2='0.57', fit_tolerance='1e-08', EG2='1.31', EG='1.31', time_epoch_completed='1631117487.76', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.57', dlogl='2.48e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.53' WHERE bin_id='976' AND source_name='4FGL J1340.4+6926' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 09:11:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 884150: <4FGL_J1340.4+6926_daily_bin976> in cluster <slac> Done

Job <4FGL_J1340.4+6926_daily_bin976> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep  8 09:00:27 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 09:00:40 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 09:00:40 2021
Terminated at Wed Sep  8 09:11:28 2021
Results reported at Wed Sep  8 09:11:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1340.4+6926_daily_bin976 205.11 69.4446 492307201 492566401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1340.4+6926 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   626.36 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             316.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   648 sec.
    Turnaround time :                            661 sec.

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

