/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 234 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_bin136
RA = 354.904, Dec = 2.7102
tmin = 274579201, tmax = 274838401
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='69809', job_status='RUN', time_executed='2021-09-30 02:34:31.259307', time_epoch_executed='1632994471.26' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='136'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69809

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69809/ft1_4FGL_J2339.6+0242_daily_bin136.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69809/ft2_4FGL_J2339.6+0242_daily_bin136.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69809/ft1_4FGL_J2339.6+0242_daily_bin136.fits outfile=/scratch/kocevski/69809/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin136.fits ra=354.904 dec=2.7102 rad=12.0 tmin=274579201.0 tmax=274838401.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.59
user 3.36
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69809/ft1_filtered_4FGL_J2339.6+0242_daily_bin136.fits evtable="EVENTS" scfile=/scratch/kocevski/69809/ft2_4FGL_J2339.6+0242_daily_bin136.fits sctable="SC_DATA" expcube=/scratch/kocevski/69809/ltcube_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.fits outfile=/scratch/kocevski/69809/expmap_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.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/69809/ltcube_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.fits
.....................!
real 192.07
user 186.41
sys 5.34

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/69809/ft1_filtered_4FGL_J2339.6+0242_daily_bin136.fits scfile=/scratch/kocevski/69809/ft2_4FGL_J2339.6+0242_daily_bin136.fits outfile=/scratch/kocevski/69809/cmap_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69809/ft1_filtered_4FGL_J2339.6+0242_daily_bin136.fits scfile=/scratch/kocevski/69809/ft2_4FGL_J2339.6+0242_daily_bin136.fits outfile=/scratch/kocevski/69809/cmap_HighResolution_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.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.54
user 0.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.8408       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    7.0523       1.0000         .10000E-03   10000.    
     7 'Prefactor '    23.706       1.0000         .10000E-03   10000.    
     8 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    18.112       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    24.596       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .24671E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    4.3659       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10439E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    10.723       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10048E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    12.112       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10303E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    20.008       1.0000         .10000E-03   10000.    
    27 'Prefactor '    8.1486       1.0000         .10000E-03   10000.    
    28 'Prefactor '    1.2451       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .97477       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .92815       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=   5076.052     FROM MIGRAD    STATUS=CONVERGED    753 CALLS     4531 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.7513       -.96743E-07** at limit **
   2  Prefactor     8.8454        46.243        .38645E-05    .21340E-04
   3  Prefactor     .10000E-03    9.9383       -.99218E-05** at limit **
   4  Prefactor     .10000E-03    2.8457       -.46187E-07** at limit **
   5  norm          .10000E-03    1.3197       -.79879E-08** at limit **
   6  norm          7.0525        4.6846        .64588E-06    .54721E-05
   7  Prefactor     23.704        13.648       -.38035E-06    .11712E-03
   8  norm          .10000E-03    8.3759        .62948E-05** at limit **
   9  Prefactor     .10000E-03    16.454        .37256E-05** at limit **
  10  Prefactor     .10000E-03    7.0225        .46596E-06** at limit **
  11  Prefactor     18.103        19.817        .93954E-06    .18314E-03
  12  Prefactor     .10000E-03    3.5025       -.15818E-06** at limit **
  13  norm          .10000E-03    .42808       -.53108E-07** at limit **
  14  norm          .10000E-03    1.9637       -.80609E-07** at limit **
  15  Prefactor     24.598        13.554        .17416E-05   -.53270E-04
  16  Prefactor     .10013E-03    302.54       -.19391E-03** at limit **
  17  norm          4.3561        9.8982       -.62650E-05   -.65262E-03
  18  Prefactor     .10000E-03    9.4418        .10022E-04** at limit **
  19  Prefactor     .10000E-03    108.68        .27555E-04** at limit **
  20  Prefactor     10.708        16.020       -.19010E-05    .45128E-03
  21  Prefactor     .10000E-03    16.275       -.25475E-05** at limit **
  22  norm          .10000E-03    8.2170       -.76593E-05** at limit **
  23  norm          12.119        26.013       -.69120E-06    .13379E-03
  24  Prefactor     .10000E-03    121.78        .18619E-04** at limit **
  25  Prefactor     .10000E-03    4.0097        .33709E-06** at limit **
  26  Prefactor     19.969        40.697       -.28496E-04    .18021E-03
  27  Prefactor     8.1443        23.171        .64781E-05    .58697E-04
  28  Prefactor     1.2005        70.482       -.52726E-04   -.59740E-04
  29  Normalizat    .97515        .22378        .96505E-05    .53576E-03
  30  Prefactor     .92778        .14641       -.14522E-05    .10951E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 8.84541
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 7.05252
  Prefactor  = 23.7043
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.1034
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 24.5984
  Prefactor  = 0.000100135
  norm       = 4.35614
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.7079
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 12.1189
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.9695
  Prefactor  = 8.14433
  Prefactor  = 1.20049
  Normalizat = 0.975149
  Prefactor  = 0.927778
 **********
 **   18 **HESSE 
 **********

 FCN=   5076.052     FROM HESSE     STATUS=OK           574 CALLS     5105 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.7530        .15167E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     8.8454        46.213        .13481E-03   -1.5113    
   3  Prefactor     .10000E-03    9.9707        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.8505        .11737E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    1.3515        .15970E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          7.0525        4.6824        .12148E-03   -1.5177    
   7  Prefactor     23.704        13.674        .82270E-04   -1.4734    
   8  norm          .10000E-03    8.4177        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    16.486        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    7.0488        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     18.103        19.815        .94110E-04   -1.4857    
  12  Prefactor     .10000E-03    3.5057        .13022E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .44060        .90826E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    1.9670        .97499E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     24.598        13.487        .80770E-04   -1.4716    
  16  Prefactor     .10013E-03    302.76        .40062E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          4.3561        9.8386        .19277E-03   -1.5291    
  18  Prefactor     .10000E-03    9.6688        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    108.71        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     10.708        16.023        .12235E-03   -1.5053    
  21  Prefactor     .10000E-03    16.358        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    8.2254        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          12.119        26.024        .11510E-03   -1.5012    
  24  Prefactor     .10000E-03    122.39        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    4.1079        .27750E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     19.969        40.578        .89542E-04   -1.4814    
  27  Prefactor     8.1443        23.150        .14045E-03   -1.5137    
  28  Prefactor     1.2005        73.708        .40137E-03   -1.5489    
  29  Normalizat    .97515        .25706        .27975E-03   -.93868    
  30  Prefactor     .92778        .16956        .20235E-03   -.95177    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.46033e-09
Minuit parameter uncertainties:
  1  2.7992e-06
  2  40.4851
  3  1.18466e-05
  4  1.72195e-06
  5  6.9949e-08
  6  4.68261
  7  13.6757
  8  4.68524e-05
  9  4.44554e-05
  10  2.10155e-05
  11  19.8222
  12  7.87893e-06
  13  8.77225e-07
  14  4.65582e-06
  15  13.489
  16  0.012835
  17  9.84222
  18  2.13624e-05
  19  6.53842e-05
  20  16.0294
  21  7.70918e-06
  22  1.10863e-05
  23  26.0479
  24  0.000445007
  25  8.3545e-05
  26  40.6337
  27  23.175
  28  18.8369
  29  0.257389
  30  0.169652
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.997e+01  4.063e+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.278e-01  1.697e-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:  9.751e-01  2.574e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/69809/likelihoodResults_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.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) = 5075.68054797
delta logL = 0.371605841351

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5075.65733449
delta logL = 0.394819324441

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .48045E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    6.5085       1.0000          .0000       10.000    
     3 'Normalizat'    .92392       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95691       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=   5075.657     FROM MIGRAD    STATUS=CONVERGED     62 CALLS      388 TOTAL
                     EDM=   .65E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .44270E-01    .93307        .35776E-02   -.87420E-02
   2  Index         6.5509        3.4089        .13997       -.11072E-03
   3  Normalizat    .92418        .46461E-01    .64810E-01   -.22047E-03
   4  Prefactor     .95678        .33025E-01    .45726E-01   -.11595E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0442704
  Index      = 6.55091
  Normalizat = 0.924179
  Prefactor  = 0.956782
 **********
 **   18 **HESSE 
 **********

 FCN=   5075.657     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      421 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .44270E-01    2.6689        .16631E-03   -1.5666    
   2  Index         6.5509        8.2342        .68843E-02    .31539    
   3  Normalizat    .92418        .17231        .28666E-03   -.95616    
   4  Prefactor     .95678        .12067        .19963E-03   -.94184    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.34589e-09
Minuit parameter uncertainties:
  1  0.68673
  2  8.10082
  3  0.172409
  4  0.120703
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69809': 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) = 5075.65732389
delta logL = 0.394829918545

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  4.427e-02  6.867e-01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  6.551e+00  8.101e+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:  9.568e-01  1.207e-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:  9.242e-01  1.724e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.15
Ra Dec: 354.904 2.710
Photon Index (Free Index): 6.55 +/- 8.10
Photon Flux (Free Index): 5.59e-08 +/- 5.94e-08
Energy Flux (Free Index): 6.79e-06 +/- 8.13e-06

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/69809/cmap_HighResolution_274579201_274838401_4FGL_J2339.6+0242_daily_bin136.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.06e-02', comment='SUCCESS', energy_flux2='6.79e-06', dlogl='3.95e-01', photon_flux2='5.59e-08', job_status='DONE', time_completed='2021-09-30 02:46:56.911940', photon_index_error2='8.10', photon_index2='6.55', ts='0.29', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='1.36e-07', energy_flux_error2='8.13e-06', EG='0.98', time_epoch_completed='1632995216.91', return_code='0', job_id='69809', GAL2='0.96', EG2='0.92', return_code2='102', photon_flux_error2='5.94e-08', ts2='1.15', photon_index='2.55' WHERE bin_id='136' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:46:56 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0078>
Subject: Job 69809: <4FGL_J2339.6+0242_daily_bin136> in cluster <slac> Done

Job <4FGL_J2339.6+0242_daily_bin136> 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) <bullet0078>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 02:30:28 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:28 2021
Terminated at Thu Sep 30 02:46:57 2021
Results reported at Thu Sep 30 02:46:57 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin136 354.904 2.7102 274579201 274838401 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 :                                   745.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             274.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   989 sec.
    Turnaround time :                            990 sec.

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

