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


Performing analysis on: 4FGL_J2339.6+0242_daily_bin870
RA = 354.904, Dec = 2.7102
tmin = 464832001, tmax = 465091201
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='73306', job_status='RUN', time_executed='2021-09-30 02:41:01.333759', time_epoch_executed='1632994861.33' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='870'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/73306

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/73306/ft1_4FGL_J2339.6+0242_daily_bin870.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/73306/ft1_4FGL_J2339.6+0242_daily_bin870.fits outfile=/scratch/kocevski/73306/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin870.fits ra=354.904 dec=2.7102 rad=12.0 tmin=464832001.0 tmax=465091201.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.38
user 3.14
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.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/73306/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin870.fits evtable="EVENTS" outfile="/scratch/kocevski/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.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.50
user 0.36
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits" evtable="EVENTS" scfile=/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits sctable="SC_DATA" outfile=/scratch/kocevski/73306/ltcube_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.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/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits
.....................!
real 13.19
user 12.80
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits evtable="EVENTS" scfile=/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits sctable="SC_DATA" expcube=/scratch/kocevski/73306/ltcube_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits outfile=/scratch/kocevski/73306/expmap_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.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/73306/ltcube_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits
.....................!
real 190.61
user 185.74
sys 4.47

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/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits scfile=/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits outfile=/scratch/kocevski/73306/cmap_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.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.67
user 0.39
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits scfile=/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits outfile=/scratch/kocevski/73306/cmap_HighResolution_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.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.56
user 0.39
sys 0.17

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits', '/scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits', expMap='/scratch/kocevski/73306/expmap_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits', expCube='/scratch/kocevski/73306/ltcube_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/73306/Model_4FGL_J2339.6+0242_daily_bin870.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/73306/ft1_filtered_4FGL_J2339.6+0242_daily_bin870.fits
Spacecraft file(s): /scratch/kocevski/73306/ft2_4FGL_J2339.6+0242_daily_bin870.fits
Exposure map: /scratch/kocevski/73306/expmap_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits
Exposure cube: /scratch/kocevski/73306/ltcube_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/73306/Model_4FGL_J2339.6+0242_daily_bin870.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) = 7374.4764059

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    33.658       1.0000         .10000E-03   10000.    
     2 'Prefactor '    80.274       1.0000         .10000E-03   10000.    
     3 'Prefactor '    6.3454       1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.6842       1.0000         .10000E-03   10000.    
     5 'norm      '    2.5994       1.0000         .10000E-03   10000.    
     6 'norm      '    10.287       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    101.93       1.0000         .10000E-03   10000.    
     9 'Prefactor '    22.746       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    19.332       1.0000         .10000E-03   10000.    
    13 'norm      '    11.106       1.0000         .10000E-03   10000.    
    14 'norm      '    8.7722       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    12.198       1.0000         .10000E-03   10000.    
    18 'Prefactor '    4.6813       1.0000         .10000E-03   10000.    
    19 'Prefactor '    8.3779       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    13.820       1.0000         .10000E-03   10000.    
    22 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .13795E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    40.580       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .11239E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .63805       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.1035       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=   7374.473     FROM MIGRAD    STATUS=CONVERGED    740 CALLS     3856 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     33.658        15.678        .63886E-08   -.43518E-04
   2  Prefactor     80.277        58.983        .55809E-06    .13149E-04
   3  Prefactor     6.3481        20.454        .41625E-06   -.62555E-05
   4  Prefactor     8.6848        7.3130        .85345E-07   -.31324E-04
   5  norm          2.5973        3.3033        .24010E-06   -.70471E-04
   6  norm          10.287        5.3287        .40977E-06   -.10406E-03
   7  Prefactor     .10000E-03    4.8690        .12780E-06** at limit **
   8  norm          101.94        23.222        .32129E-06    .15768E-04
   9  Prefactor     22.745        42.940        .74471E-06   -.19848E-04
  10  Prefactor     .10000E-03    4.3952       -.29892E-07** at limit **
  11  Prefactor     .10000E-03    6.4193        .10899E-06** at limit **
  12  Prefactor     19.332        13.601        .74871E-07   -.74686E-04
  13  norm          11.106        1.9967       -.26013E-06   -.10567E-02
  14  norm          8.7730        8.0600        .15131E-06   -.99035E-04
  15  Prefactor     .10000E-03    3.2488       -.62840E-07** at limit **
  16  Prefactor     .10000E-03    24.667       -.12189E-05** at limit **
  17  norm          12.198        9.1434       -.68960E-06   -.17118E-03
  18  Prefactor     4.6814        6.5157        .52871E-05   -.42565E-03
  19  Prefactor     8.6036        1722.3        .84881E-04    .32620E-04
  20  Prefactor     .10000E-03    6.5591        .90066E-06** at limit **
  21  Prefactor     13.812        21.927       -.91402E-06   -.81417E-04
  22  norm          .10000E-03    6.0425        .17442E-06** at limit **
  23  norm          .10000E-03    11.943        .91175E-06** at limit **
  24  Prefactor     .10000E-03    39.641        .46075E-05** at limit **
  25  Prefactor     .10001E-03    2.7611        .15422E-05** at limit **
  26  Prefactor     40.561        42.209       -.37213E-05   -.26630E-03
  27  Prefactor     .10000E-03    48.257       -.41424E-05** at limit **
  28  Prefactor     .10000E-03    8.9419       -.17368E-06** at limit **
  29  Normalizat    .63815        .22483       -.16896E-05   -.21974E-03
  30  Prefactor     1.1034        .14380       -.79918E-06   -.24968E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 33.6583
  Prefactor  = 80.277
  Prefactor  = 6.34808
  Prefactor  = 8.68482
  norm       = 2.59732
  norm       = 10.2868
  Prefactor  = 0.0001
  norm       = 101.936
  Prefactor  = 22.745
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.3325
  norm       = 11.1061
  norm       = 8.77298
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 12.1976
  Prefactor  = 4.68136
  Prefactor  = 8.60358
  Prefactor  = 0.0001
  Prefactor  = 13.8124
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.000100014
  Prefactor  = 40.5613
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.638146
  Prefactor  = 1.10337
 **********
 **   18 **HESSE 
 **********

 FCN=   7374.473     FROM HESSE     STATUS=OK           580 CALLS     4436 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     33.658        15.683        .69071E-04   -1.4547    
   2  Prefactor     80.277        58.962        .44826E-04   -1.3914    
   3  Prefactor     6.3481        20.044        .15934E-03   -1.5204    
   4  Prefactor     8.6848        7.3094        .13602E-03   -1.5118    
   5  norm          2.5973        3.2278        .13511E-03   -1.5386    
   6  norm          10.287        5.3314        .62465E-03   -1.5066    
   7  Prefactor     .10000E-03    4.8798        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          101.94        23.211        .39823E-04   -1.3685    
   9  Prefactor     22.745        42.928        .83986E-04   -1.4754    
  10  Prefactor     .10000E-03    4.3987        .17583E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6.4260        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     19.332        13.587        .91093E-04   -1.4828    
  13  norm          11.106        2.0087        .45843E-04   -1.5041    
  14  norm          8.7730        8.0455        .13533E-03   -1.5115    
  15  Prefactor     .10000E-03    3.2531        .15112E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    24.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          12.198        9.1231        .57348E-03   -1.5009    
  18  Prefactor     4.6814        6.7211        .92998E-03   -1.5275    
  19  Prefactor     8.6036        1824.1        .13850E-03   -1.5121    
  20  Prefactor     .10000E-03    6.5817        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     13.812        21.908        .10774E-03   -1.4964    
  22  norm          .10000E-03    6.0448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    11.961        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    39.907        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10001E-03    5.4900        .26575E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     40.561        42.526        .62924E-04   -1.4433    
  27  Prefactor     .10000E-03    49.053        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    9.0248        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .63815        .24388        .39424E-03   -1.0639    
  30  Prefactor     1.1034        .15828        .21431E-03   -.89359    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.17817e-09
Minuit parameter uncertainties:
  1  15.6851
  2  59.0046
  3  20.065
  4  7.31017
  5  3.22806
  6  5.33167
  7  6.42723e-06
  8  23.2134
  9  42.9863
  10  1.4424e-06
  11  1.27042e-05
  12  13.5892
  13  2.00867
  14  8.0465
  15  3.28361e-08
  16  0.000118636
  17  9.1241
  18  6.72216
  19  258.997
  20  5.30907e-05
  21  21.9204
  22  9.5212e-06
  23  2.58268e-05
  24  0.000724824
  25  0.000557459
  26  42.558
  27  0.000282249
  28  2.30141e-06
  29  0.244296
  30  0.158347
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  4.056e+01  4.256e+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:  1.103e+00  1.583e-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:  6.381e-01  2.443e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.26
Ra Dec: 354.904 2.710
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 4.91e-08 +/- 5.15e-08
Energy Flux (Fixed Index): 1.35e-05 +/- 1.42e-05

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

Saving results to:
/scratch/kocevski/73306/likelihoodResults_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.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) = 7374.08705834
delta logL = 0.38552535879

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7374.06409045
delta logL = 0.40849325081

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   7374.064     FROM MIGRAD    STATUS=FAILED       104 CALLS      307 TOTAL
                     EDM=   .79E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.228        301.92        .57153E-03   -.32304E-04
   2  Index         3.7456        6.8719        .63384E-02    .68040E-03
   3  Normalizat    .56958        .23267        .41613E-03   -.81415E-05
   4  Prefactor     1.1368        .16211        .21157E-03   -.14562E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7374.064     FROM SIMPLEX   STATUS=UNCHANGED     87 CALLS      394 TOTAL
                     EDM=   .96E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.228        301.92        .32880E-03   -.32304E-04
   2  Index         3.7456        6.8719        .12396E-02    .68040E-03
   3  Normalizat    .56958        .23267        .16481E-03   -.81415E-05
   4  Prefactor     1.1368        .16211        .72449E-04   -.14562E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7374.064     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      427 TOTAL
                     EDM=   .89E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.228        46.841        .22861E-04   -.36302E-04
   2  Index         3.7456        2.3097        .12677E-02   -.93088E-05
   3  Normalizat    .56958        .24172        .16645E-04   -.81961E-05
   4  Prefactor     1.1368        .16487        .84627E-05   -.14509E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.2283
  Index      = 3.74556
  Normalizat = 0.569584
  Prefactor  = 1.13677
 **********
 **   18 **HESSE 
 **********

 FCN=   7374.064     FROM HESSE     STATUS=OK            23 CALLS      450 TOTAL
                     EDM=   .97E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.228        36.085        .91445E-06   -1.5008    
   2  Index         3.7456        1.8053        .50707E-04   -.25360    
   3  Normalizat    .56958        .23853        .33290E-05   -1.0929    
   4  Prefactor     1.1368        .16227        .16925E-05   -.88300    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.69067e-13
Minuit parameter uncertainties:
  1  36.1494
  2  1.85001
  3  0.238964
  4  0.162342
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/73306': 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) = 7374.06408921
delta logL = 0.408494495153

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.223e+01  3.615e+01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  3.746e+00  1.850e+00  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:  1.137e+00  1.623e-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:  5.696e-01  2.390e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.22
Ra Dec: 354.904 2.710
Photon Index (Free Index): 3.75 +/- 1.85
Photon Flux (Free Index): 9.76e-08 +/- 7.97e-08
Energy Flux (Free Index): 1.53e-05 +/- 1.20e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/73306/cmap_HighResolution_464832001_465091201_4FGL_J2339.6+0242_daily_bin870.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.21e-02', comment='SUCCESS', photon_flux='4.91e-08', energy_flux2='1.53e-05', photon_flux_error='5.15e-08', dlogl='4.08e-01', energy_flux='1.35e-05', photon_flux2='9.76e-08', job_status='DONE', time_completed='2021-09-30 02:56:00.925451', photon_index_error2='1.85', photon_index2='3.75', ts='1.26', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', photon_flux_upper_limit='1.55e-07', energy_flux_error2='1.20e-05', EG='0.64', time_epoch_completed='1632995760.93', return_code='0', job_id='73306', GAL2='1.14', EG2='0.57', return_code2='0', energy_flux_error='1.42e-05', photon_flux_error2='7.97e-08', ts2='2.22', photon_index='2.55' WHERE bin_id='870' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:56:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0273>
Subject: Job 73306: <4FGL_J2339.6+0242_daily_bin870> in cluster <slac> Done

Job <4FGL_J2339.6+0242_daily_bin870> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Sep 30 02:40:42 2021
Job was executed on host(s) <bullet0273>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 02:40:45 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:40:45 2021
Terminated at Thu Sep 30 02:56:01 2021
Results reported at Thu Sep 30 02:56:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin870 354.904 2.7102 464832001 465091201 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 :                                   891.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             341.25 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   916 sec.
    Turnaround time :                            919 sec.

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

