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


Performing analysis on: 4FGL_J2339.6+0242_daily_bin140
RA = 354.904, Dec = 2.7102
tmin = 275616001, tmax = 275875201
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='69816', job_status='RUN', time_executed='2021-09-30 02:32:19.375513', time_epoch_executed='1632994339.38' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='140'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69816

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69816/ft1_4FGL_J2339.6+0242_daily_bin140.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69816/ft1_4FGL_J2339.6+0242_daily_bin140.fits outfile=/scratch/kocevski/69816/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin140.fits ra=354.904 dec=2.7102 rad=12.0 tmin=275616001.0 tmax=275875201.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.31
user 3.99
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.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/69816/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin140.fits evtable="EVENTS" outfile="/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.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.49
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits" evtable="EVENTS" scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits sctable="SC_DATA" outfile=/scratch/kocevski/69816/ltcube_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.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/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits
.....................!
real 11.66
user 11.28
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits evtable="EVENTS" scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits sctable="SC_DATA" expcube=/scratch/kocevski/69816/ltcube_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits outfile=/scratch/kocevski/69816/expmap_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.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/69816/ltcube_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits
.....................!
real 190.80
user 185.12
sys 5.35

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

Setting source of interest to:
4FGL J2339.6+0242 @ 354.904 2.7102

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits outfile=/scratch/kocevski/69816/cmap_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.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=354.904 yref=2.7102 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.53
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits outfile=/scratch/kocevski/69816/cmap_HighResolution_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.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=354.904 yref=2.7102 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.55
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits evtable="EVENTS" scfile=/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/69816/Model_4FGL_J2339.6+0242_daily_bin140.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/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits.....................!
real 54.96
user 53.67
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits', '/scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits', expMap='/scratch/kocevski/69816/expmap_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits', expCube='/scratch/kocevski/69816/ltcube_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/69816/Model_4FGL_J2339.6+0242_daily_bin140.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2339.6+0242'

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  8.280e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/69816/ft1_filtered_4FGL_J2339.6+0242_daily_bin140.fits
Spacecraft file(s): /scratch/kocevski/69816/ft2_4FGL_J2339.6+0242_daily_bin140.fits
Exposure map: /scratch/kocevski/69816/expmap_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits
Exposure cube: /scratch/kocevski/69816/ltcube_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/69816/Model_4FGL_J2339.6+0242_daily_bin140.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) = 5170.44098615

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.6645       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .15689E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .66242       1.0000         .10000E-03   10000.    
     6 'norm      '    1.9966       1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.617       1.0000         .10000E-03   10000.    
     8 'norm      '    3.7786       1.0000         .10000E-03   10000.    
     9 'Prefactor '    23.961       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    18.356       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    2.0938       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .74112E-01   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10529E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .14094E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.5769       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10233E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    16.030       1.0000         .10000E-03   10000.    
    21 'Prefactor '    37.341       1.0000         .10000E-03   10000.    
    22 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    6.2151       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.3265       1.0000         .10000E-03   10000.    
    25 'Prefactor '    6.3414       1.0000         .10000E-03   10000.    
    26 'Prefactor '    27.775       1.0000         .10000E-03   10000.    
    27 'Prefactor '    22.528       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10122E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .76095       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .99418       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5170.436     FROM MIGRAD    STATUS=CONVERGED    799 CALLS     4874 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.6664        15.697        .30153E-06    .44715E-04
   2  Prefactor     .10002E-03    58.472        .63752E-05** at limit **
   3  Prefactor     .10000E-03    6.5218        .52589E-08** at limit **
   4  Prefactor     .10146E-03    7.5836       -.24890E-05** at limit **
   5  norm          .66246        2.1727        .92828E-06    .13539E-03
   6  norm          1.9969        5.0648        .88001E-06   -.48650E-04
   7  Prefactor     18.616        14.596       -.81852E-07   -.31535E-04
   8  norm          3.7798        15.044        .12716E-05   -.13154E-04
   9  Prefactor     23.958        28.333        .94702E-07   -.14551E-04
  10  Prefactor     .10000E-03    23.028       -.90459E-06** at limit **
  11  Prefactor     18.353        22.238        .46941E-06   -.31483E-05
  12  Prefactor     .10000E-03    6.7047       -.65095E-07** at limit **
  13  norm          .10000E-03    .21934       -.18263E-07** at limit **
  14  norm          2.0935        3.3069        .11990E-06    .43598E-04
  15  Prefactor     .10027E-03    12.213        .30116E-06** at limit **
  16  Prefactor     .10001E-03    132.90        .39249E-05** at limit **
  17  norm          .10000E-03    22.648        .58657E-06** at limit **
  18  Prefactor     1.5851        11.738        .18333E-05   -.96550E-04
  19  Prefactor     .10000E-03    127.24       -.24659E-05** at limit **
  20  Prefactor     16.029        14.152       -.49733E-06   -.11788E-04
  21  Prefactor     37.312        35.853        .78344E-06    .26670E-03
  22  norm          .10000E-03    26.555        .73791E-06** at limit **
  23  norm          6.2092        35.300       -.20098E-05    .39742E-06
  24  Prefactor     1.2568        629.34       -.36382E-04   -.56991E-04
  25  Prefactor     6.3419        5.5818        .23212E-05   -.41077E-03
  26  Prefactor     27.771        28.779       -.10860E-06   -.19738E-04
  27  Prefactor     22.530        21.663        .10362E-06   -.24952E-04
  28  Prefactor     .10000E-03    41.103       -.11895E-05** at limit **
  29  Normalizat    .76094        .22216       -.19692E-05    .86954E-04
  30  Prefactor     .99412        .14211       -.74239E-06    .40492E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.6664
  Prefactor  = 0.000100024
  Prefactor  = 0.0001
  Prefactor  = 0.000101462
  norm       = 0.662461
  norm       = 1.99694
  Prefactor  = 18.6162
  norm       = 3.77976
  Prefactor  = 23.9578
  Prefactor  = 0.0001
  Prefactor  = 18.3533
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 2.09353
  Prefactor  = 0.000100265
  Prefactor  = 0.000100007
  norm       = 0.0001
  Prefactor  = 1.58514
  Prefactor  = 0.000100003
  Prefactor  = 16.0286
  Prefactor  = 37.3122
  norm       = 0.0001
  norm       = 6.2092
  Prefactor  = 1.25682
  Prefactor  = 6.34193
  Prefactor  = 27.7713
  Prefactor  = 22.5298
  Prefactor  = 0.0001
  Normalizat = 0.760943
  Prefactor  = 0.994115
 **********
 **   18 **HESSE 
 **********

 FCN=   5170.436     FROM HESSE     STATUS=OK           602 CALLS     5476 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.6664        15.666        .12890E-03   -1.5086    
   2  Prefactor     .10002E-03    60.530        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    6.5341        .17930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10146E-03    68.986        .35701E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .66246        2.1372        .18275E-03   -1.5545    
   6  norm          1.9969        5.0396        .24357E-03   -1.5425    
   7  Prefactor     18.616        14.563        .92825E-04   -1.4845    
   8  norm          3.7798        15.051        .20768E-03   -1.5319    
   9  Prefactor     23.958        28.327        .81833E-04   -1.4729    
  10  Prefactor     .10000E-03    23.651        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     18.353        22.225        .93482E-04   -1.4851    
  12  Prefactor     .10000E-03    6.7636        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .22256        .32861E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          2.0935        3.2837        .15960E-03   -1.5419    
  15  Prefactor     .10027E-03    21.200        .65849E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10001E-03    134.95        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    22.858        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.5851        11.591        .33834E-03   -1.5456    
  19  Prefactor     .10000E-03    127.54        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     16.029        14.075        .10004E-03   -1.4907    
  21  Prefactor     37.312        36.431        .65588E-04   -1.4486    
  22  norm          .10000E-03    26.823        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          6.2092        34.787        .16103E-03   -1.5210    
  24  Prefactor     1.2568        700.50        .38159E-02   -1.5484    
  25  Prefactor     6.3419        5.7763        .72600E-03   -1.5204    
  26  Prefactor     27.771        28.789        .76017E-04   -1.4654    
  27  Prefactor     22.530        21.678        .84391E-04   -1.4758    
  28  Prefactor     .10000E-03    42.512        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .76094        .25079        .31546E-03   -1.0153    
  30  Prefactor     .99412        .16366        .19616E-03   -.92926    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.14611e-08
Minuit parameter uncertainties:
  1  15.6731
  2  0.00239766
  3  9.01614e-07
  4  0.0201113
  5  2.1374
  6  5.04066
  7  14.566
  8  15.0658
  9  28.3431
  10  0.000176768
  11  22.2352
  12  2.5916e-05
  13  1.8735e-07
  14  3.28402
  15  0.00474566
  16  0.00199643
  17  1.12581e-06
  18  8.57489
  19  0.00127175
  20  14.0779
  21  36.4531
  22  0.000180736
  23  29.4197
  24  60.0603
  25  5.77677
  26  28.8038
  27  21.6853
  28  0.000253406
  29  0.251174
  30  0.163744
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  2.777e+01  2.880e+01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  9.941e-01  1.637e-01  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  7.609e-01  2.512e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.62
Ra Dec: 354.904 2.710
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 3.36e-08 +/- 3.48e-08
Energy Flux (Fixed Index): 9.26e-06 +/- 9.61e-06

TS (Fixed Index): 2.62
Ra Dec: 354.904 2.710
Photon Flux Upper Limit: 1.30e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.02e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/69816/likelihoodResults_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.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) = 5169.17148317
delta logL = 1.26421099504

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5169.08832588
delta logL = 1.34736827603

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5169.088     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      215 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.887        16.853        .25121E-02   -.16037E-02
   2  Index         1.2668        .41949        .21509       -.53635E-04
   3  Normalizat    .78330        .19898        .70344E-01    .19427E-04
   4  Prefactor     .98829        .14057        .46121E-01    .28862E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.8873
  Index      = 1.26678
  Normalizat = 0.783299
  Prefactor  = 0.988287
 **********
 **   18 **HESSE 
 **********

 FCN=   5169.088     FROM HESSE     STATUS=OK            31 CALLS      246 TOTAL
                     EDM=   .90E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.887        23.353        .10048E-03   -1.4911    
   2  Index         1.2668        .64486        .85609E-02   -.84300    
   3  Normalizat    .78330        .22858        .31129E-03   -1.0069    
   4  Prefactor     .98829        .16177        .19663E-03   -.93121    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.96903e-09
Minuit parameter uncertainties:
  1  23.3665
  2  0.648972
  3  0.228859
  4  0.16185
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69816': 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) = 5169.08832571
delta logL = 1.34736844933

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.589e+01  2.337e+01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  1.267e+00  6.490e-01  0.000e+00  1.000e+01 (-1.000e+00)
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  9.883e-01  1.619e-01  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  7.833e-01  2.289e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.32
Ra Dec: 354.904 2.710
Photon Index (Free Index): 1.27 +/- 0.65
Photon Flux (Free Index): 6.75e-09 +/- 8.77e-09
Energy Flux (Free Index): 4.59e-05 +/- 7.38e-05

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/69816/cmap_HighResolution_275616001_275875201_4FGL_J2339.6+0242_daily_bin140.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.02e-02', comment='SUCCESS', photon_flux='3.36e-08', energy_flux2='4.59e-05', photon_flux_error='3.48e-08', dlogl='1.35e+00', energy_flux='9.26e-06', photon_flux2='6.75e-09', job_status='DONE', time_completed='2021-09-30 02:45:09.328437', photon_index_error2='0.65', photon_index2='1.27', ts='2.62', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', photon_flux_upper_limit='1.30e-07', energy_flux_error2='7.38e-05', EG='0.76', time_epoch_completed='1632995109.33', return_code='0', job_id='69816', GAL2='0.99', EG2='0.78', return_code2='0', energy_flux_error='9.61e-06', photon_flux_error2='8.77e-09', ts2='5.32', photon_index='2.55' WHERE bin_id='140' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:45:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0055>
Subject: Job 69816: <4FGL_J2339.6+0242_daily_bin140> in cluster <slac> Done

Job <4FGL_J2339.6+0242_daily_bin140> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep 30 02:30:27 2021
Job was executed on host(s) <bullet0055>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 02:30:29 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 30 02:30:29 2021
Terminated at Thu Sep 30 02:45:09 2021
Results reported at Thu Sep 30 02:45:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin140 354.904 2.7102 275616001 275875201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2339.6+0242 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   767.04 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             294.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   880 sec.
    Turnaround time :                            882 sec.

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

