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


Performing analysis on: 4FGL_J2339.6+0242_daily_bin644
RA = 354.904, Dec = 2.7102
tmin = 406252801, tmax = 406512001
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='72967', job_status='RUN', time_executed='2021-09-30 02:42:11.992838', time_epoch_executed='1632994931.99' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='644'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/72967

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/72967/ft1_4FGL_J2339.6+0242_daily_bin644.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/72967/ft2_4FGL_J2339.6+0242_daily_bin644.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/72967/ft1_4FGL_J2339.6+0242_daily_bin644.fits outfile=/scratch/kocevski/72967/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin644.fits ra=354.904 dec=2.7102 rad=12.0 tmin=406252801.0 tmax=406512001.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.00
user 3.63
sys 0.25

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/72967/ft1_filtered_4FGL_J2339.6+0242_daily_bin644.fits evtable="EVENTS" scfile=/scratch/kocevski/72967/ft2_4FGL_J2339.6+0242_daily_bin644.fits sctable="SC_DATA" expcube=/scratch/kocevski/72967/ltcube_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.fits outfile=/scratch/kocevski/72967/expmap_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.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/72967/ltcube_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.fits
.....................!
real 190.95
user 185.56
sys 4.90

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/72967/ft1_filtered_4FGL_J2339.6+0242_daily_bin644.fits scfile=/scratch/kocevski/72967/ft2_4FGL_J2339.6+0242_daily_bin644.fits outfile=/scratch/kocevski/72967/cmap_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/72967/ft1_filtered_4FGL_J2339.6+0242_daily_bin644.fits scfile=/scratch/kocevski/72967/ft2_4FGL_J2339.6+0242_daily_bin644.fits outfile=/scratch/kocevski/72967/cmap_HighResolution_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.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.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.7086       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.9585       1.0000         .10000E-03   10000.    
     5 'norm      '    1.4787       1.0000         .10000E-03   10000.    
     6 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .14780E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10038E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.7776       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .13023       1.0000         .10000E-03   10000.    
    13 'norm      '    3.2161       1.0000         .10000E-03   10000.    
    14 'norm      '    .19011E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    4.4388       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    45.290       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.7919       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    5.5393       1.0000         .10000E-03   10000.    
    28 'Prefactor '    11.594       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .71334       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .98419       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=   6545.749     FROM MIGRAD    STATUS=CONVERGED    779 CALLS     3932 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.5539        .19842E-07** at limit **
   2  Prefactor     .10000E-03    23.002       -.22475E-05** at limit **
   3  Prefactor     2.7095        9.3053        .61723E-05    .46692E-03
   4  Prefactor     3.9594        6.8585        .43218E-05    .91872E-03
   5  norm          1.4787        1.6732       -.17210E-06    .21700E-03
   6  norm          .10000E-03    2.1931        .20099E-07** at limit **
   7  Prefactor     .10130E-03    17.919       -.11604E-04** at limit **
   8  norm          .10000E-03    5.6296        .11447E-06** at limit **
   9  Prefactor     .10000E-03    6.9233       -.68720E-07** at limit **
  10  Prefactor     .10000E-03    3.3865        .13350E-07** at limit **
  11  Prefactor     4.7747        18.770        .47398E-05    .87872E-04
  12  Prefactor     .13462        7.6022        .39759E-05    .20459E-03
  13  norm          3.2161        1.1285       -.19160E-07   -.10120E-02
  14  norm          .10013E-03    11.064       -.11488E-04** at limit **
  15  Prefactor     4.4402        10.597        .48594E-05    .52901E-03
  16  Prefactor     .10000E-03    15.774        .25434E-05** at limit **
  17  norm          .10000E-03    2.5816        .46595E-07** at limit **
  18  Prefactor     .10000E-03    2.3066        .56509E-07** at limit **
  19  Prefactor     .10000E-03    71.755       -.49961E-05** at limit **
  20  Prefactor     .10000E-03    10.493        .44111E-06** at limit **
  21  Prefactor     .10000E-03    20.284       -.12424E-05** at limit **
  22  norm          .10000E-03    5.2063       -.15257E-07** at limit **
  23  norm          45.286        28.612       -.52696E-06   -.51107E-03
  24  Prefactor     .10000E-03    11.356       -.11901E-05** at limit **
  25  Prefactor     4.7915        4.8145        .21584E-06   -.69723E-03
  26  Prefactor     .10000E-03    12.429       -.84065E-06** at limit **
  27  Prefactor     5.5410        20.695        .46779E-05    .14851E-03
  28  Prefactor     11.593        14.466        .23009E-06   -.11388E-04
  29  Normalizat    .71328        .18458       -.33575E-05    .13592E-03
  30  Prefactor     .98425        .12097       -.65816E-06   -.88965E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.70946
  Prefactor  = 3.95941
  norm       = 1.47871
  norm       = 0.0001
  Prefactor  = 0.0001013
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.77472
  Prefactor  = 0.134623
  norm       = 3.21609
  norm       = 0.000100129
  Prefactor  = 4.4402
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 45.2865
  Prefactor  = 0.0001
  Prefactor  = 4.79145
  Prefactor  = 0.0001
  Prefactor  = 5.54099
  Prefactor  = 11.5934
  Normalizat = 0.713281
  Prefactor  = 0.98425
 **********
 **   18 **HESSE 
 **********

 FCN=   6545.749     FROM HESSE     STATUS=OK           594 CALLS     4526 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.5555        .12627E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    23.030        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.7095        9.6894        .12375E-02   -1.5379    
   4  Prefactor     3.9594        7.1843        .10137E-02   -1.5310    
   5  norm          1.4787        1.6607        .10543E-03   -1.5465    
   6  norm          .10000E-03    2.2124        .11693E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10130E-03    123.84        .49009E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    5.6749        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    6.9262        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.3905        .14541E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     4.7747        18.926        .92035E-03   -1.5271    
  12  Prefactor     .13462        8.0866        .59709E-01   -1.5635    
  13  norm          3.2161        1.1204        .47216E-04   -1.5349    
  14  norm          .10013E-03    29.227        .30340E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     4.4402        10.828        .95567E-03   -1.5287    
  16  Prefactor     .10000E-03    15.796        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    2.5890        .12688E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.3223        .11997E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    71.834        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    10.513        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    20.375        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    5.2081        .18030E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          45.286        28.622        .59576E-04   -1.4361    
  24  Prefactor     .10000E-03    11.360        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     4.7915        4.8113        .14568E-03   -1.5270    
  26  Prefactor     .10000E-03    12.441        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     5.5410        20.833        .85353E-03   -1.5237    
  28  Prefactor     11.593        14.488        .11765E-03   -1.5027    
  29  Normalizat    .71328        .21232        .29957E-03   -1.0337    
  30  Prefactor     .98425        .14180        .18621E-03   -.93256    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.79897e-08
Minuit parameter uncertainties:
  1  3.00769e-06
  2  5.09483e-05
  3  9.69501
  4  7.18591
  5  1.66074
  6  1.01207e-05
  7  0.0254316
  8  1.76586e-05
  9  2.90277e-06
  10  2.17828e-06
  11  18.9501
  12  2.08627
  13  1.12044
  14  0.00388582
  15  10.8328
  16  9.37899e-05
  17  4.69756e-06
  18  6.86521e-06
  19  0.000441776
  20  0.000103118
  21  4.14796e-05
  22  1.52626e-06
  23  28.6306
  24  3.36166e-05
  25  4.8117
  26  1.90365e-05
  27  20.8601
  28  14.4921
  29  0.212566
  30  0.14185
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.000e-04  1.904e-05  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.843e-01  1.418e-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.133e-01  2.126e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 354.904 2.710
Photon Flux Upper Limit: 6.41e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.00e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/72967/likelihoodResults_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.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) = 6545.74893313
delta logL = -0.000383002590752

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6545.74855014
delta logL = -6.70661393087e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5395       1.0000          .0000       10.000    
     3 'Normalizat'    .71326       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98425       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6545.749     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      246 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10099E-03    275.07        .18142E-02** at limit **
   2  Index         2.4669        8.6178        .50000        .50985E-05
   3  Normalizat    .71328        .20587E-01    .29957E-03    .22011E-05
   4  Prefactor     .98425        .14940E-01    .18621E-03    .11050E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100992
  Index      = 2.46692
  Normalizat = 0.713278
  Prefactor  = 0.984252
 **********
 **   18 **HESSE 
 **********

 FCN=   6545.749     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      275 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10099E-03    1071.7        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4669        5.5778        .50000       -.53126    
   3  Normalizat    .71328        .45044E-01    .11983E-04   -1.0337    
   4  Prefactor     .98425        .32686E-01    .74485E-05   -.93256    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.89555e-08
Minuit parameter uncertainties:
  1  0.0664458
  2  2147.46
  3  0.0450466
  4  0.032687
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/72967': 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) = 6545.74855006
delta logL = 7.32488842914e-08

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.010e-04  6.645e-02  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  2.467e+00  2.147e+03  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.843e-01  3.269e-02  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.133e-01  4.505e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 354.904 2.710

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/72967/cmap_HighResolution_406252801_406512001_4FGL_J2339.6+0242_daily_bin644.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.00e-03', job_status='DONE', photon_flux_upper_limit='6.41e-08', time_completed='2021-09-30 02:55:47.641783', job_id='72967', GAL2='0.98', fit_tolerance='1e-08', EG2='0.71', EG='0.71', time_epoch_completed='1632995747.64', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='7.32e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.55' WHERE bin_id='644' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:55:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0108>
Subject: Job 72967: <4FGL_J2339.6+0242_daily_bin644> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin644 354.904 2.7102 406252801 406512001 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 :                                   810.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             296.18 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   933 sec.
    Turnaround time :                            935 sec.

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

