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


Performing analysis on: 4FGL_J2339.6+0242_daily_bin651
RA = 354.904, Dec = 2.7102
tmin = 408067201, tmax = 408326401
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='72979', job_status='RUN', time_executed='2021-09-30 02:42:17.124862', time_epoch_executed='1632994937.12' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='651'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/72979

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/72979/ft1_4FGL_J2339.6+0242_daily_bin651.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/72979/ft1_4FGL_J2339.6+0242_daily_bin651.fits outfile=/scratch/kocevski/72979/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin651.fits ra=354.904 dec=2.7102 rad=12.0 tmin=408067201.0 tmax=408326401.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.84
user 3.61
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits sctable="SC_DATA" expcube=/scratch/kocevski/72979/ltcube_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits outfile=/scratch/kocevski/72979/expmap_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.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/72979/ltcube_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits
.....................!
real 190.09
user 185.34
sys 4.37

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/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits scfile=/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits outfile=/scratch/kocevski/72979/cmap_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.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.35
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits scfile=/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits outfile=/scratch/kocevski/72979/cmap_HighResolution_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.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/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/72979/Model_4FGL_J2339.6+0242_daily_bin651.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/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits..................!
real 14.86
user 13.62
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits', '/scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits', expMap='/scratch/kocevski/72979/expmap_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits', expCube='/scratch/kocevski/72979/ltcube_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/72979/Model_4FGL_J2339.6+0242_daily_bin651.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/72979/ft1_filtered_4FGL_J2339.6+0242_daily_bin651.fits
Spacecraft file(s): /scratch/kocevski/72979/ft2_4FGL_J2339.6+0242_daily_bin651.fits
Exposure map: /scratch/kocevski/72979/expmap_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits
Exposure cube: /scratch/kocevski/72979/ltcube_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/72979/Model_4FGL_J2339.6+0242_daily_bin651.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 249.648014068

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 247.495139531

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12930E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    154.05       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .29151       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10111E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    3.4163       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .16036       1.0000         .10000E-03   10000.    
     8 'norm      '    2.9507       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .78807E-01   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.3498       1.0000         .10000E-03   10000.    
    11 'Prefactor '    279.24       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .18028E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .11395E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .12750E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    1.7936       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .23666E-01   1.0000         .10000E-03   10000.    
    17 'norm      '    8.2983       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.0558       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .50132E-01   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .12517E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    4.7892       1.0000         .10000E-03   10000.    
    22 'norm      '    4.3306       1.0000         .10000E-03   10000.    
    23 'norm      '    52.168       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .31605E-01   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10265E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    421.05       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .92893E-01   1.0000         .10000E-03   10000.    
    28 'Prefactor '    32.852       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    30 'Prefactor '    .88950       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   247.4799     FROM MIGRAD    STATUS=CONVERGED    292 CALLS      624 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10061E-03    322.51       -.20280E-03** at limit **
   2  Prefactor     150.37        182.34        .16189E-05    .17411E-01
   3  Prefactor     .10000E-03    115.48       -.18604E-05** at limit **
   4  Prefactor     .10000E-03    29.595       -.48463E-06** at limit **
   5  norm          .10000E-03    17.417        .66798E-06** at limit **
   6  norm          3.4163        1.0111         .0000         .0000    
   7  Prefactor     .10000E-03    561.64        .44476E-05** at limit **
   8  norm          .10000E-03    215.90       -.44177E-04** at limit **
   9  Prefactor     .10002E-03    717.55       -.14650E-04** at limit **
  10  Prefactor     1.3498        1.0938         .0000         .0000    
  11  Prefactor     274.07        184.83        .52975E-05   -.16289E-01
  12  Prefactor     .10000E-03    60.066       -.49281E-05** at limit **
  13  norm          .10000E-03    8.3246        .60766E-07** at limit **
  14  norm          .10000E-03    28.134        .16786E-05** at limit **
  15  Prefactor     .12166E-01    7170.5       -.66547E-04   -.98894E-03
  16  Prefactor     .10000E-03    376.77        .13183E-05** at limit **
  17  norm          8.2983        1.0018         .0000         .0000    
  18  Prefactor     2.0558        1.0331         .0000         .0000    
  19  Prefactor     .10000E-03    344.85        .29037E-05** at limit **
  20  Prefactor     .10000E-03    32.360       -.11837E-05** at limit **
  21  Prefactor     .36626        1440.1        .34947E-04   -.28483E-02
  22  norm          4.3306        1.0068         .0000         .0000    
  23  norm          42.932        104.69       -.13049E-04    .37792E-03
  24  Prefactor     .10000E-03    52.547       -.11678E-05** at limit **
  25  Prefactor     .10000E-03    7.5712       -.11317E-06** at limit **
  26  Prefactor     459.66        566.71       -.83989E-05   -.96114E-02
  27  Prefactor     .10003E-03    1001.5        .20944E-04** at limit **
  28  Prefactor     32.862        100.09       -.32301E-04   -.55528E-03
  29  Normalizat    .10000E-01    .33895        .97434E-06** at limit **
  30  Prefactor     .90427        .37014        .65973E-04   -.48198E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100608
  Prefactor  = 150.368
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 3.41626
  Prefactor  = 0.000100003
  norm       = 0.000100005
  Prefactor  = 0.000100016
  Prefactor  = 1.34984
  Prefactor  = 274.068
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.012166
  Prefactor  = 0.0001
  norm       = 8.29831
  Prefactor  = 2.05576
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.36626
  norm       = 4.33057
  norm       = 42.9317
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 459.656
  Prefactor  = 0.000100029
  Prefactor  = 32.862
  Normalizat = 0.01
  Prefactor  = 0.904267
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   247.4799     FROM HESSE     STATUS=FAILED        29 CALLS      653 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10061E-03    303.32        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     150.37        211.76        .81197E-03   -1.3249    
   3  Prefactor     .10000E-03    115.49        .10388E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    29.703        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    17.394        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          549.05        545.55         .0000       -1.5338    
   7  Prefactor     .10000E-03    .23986        .44476E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .87337E-01   -.44177E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10002E-03    .22135       -.14650E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.3498        1.0938         .0000       -1.5476    
  11  Prefactor     274.07        .99096        .52975E-05   -1.2382    
  12  Prefactor     .10000E-03    .20571       -.49281E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .20571        .60766E-07   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    .20571        .16786E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .12166E-01    .15235       -.66547E-04   -1.5730    
  16  Prefactor     .10000E-03    .20888        .13183E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          8.2983        1.0018         .0000       -1.5132    
  18  Prefactor     2.0558        1.0331         .0000       -1.5421    
  19  Prefactor     .10000E-03    .21486        .29037E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    .20571       -.11837E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .36626        .27810        .34947E-04   -1.5829    
  22  norm          4.3306        1.0068         .0000       -1.5292    
  23  norm          42.932        .90763       -.13049E-04   -1.4397    
  24  Prefactor     .10000E-03    .21068       -.11678E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    .20571       -.11317E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     459.66        1.0427       -.83989E-05   -1.1386    
  27  Prefactor     .10003E-03    .22455        .20944E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     32.862        1.0003       -.32301E-04   -1.4561    
  29  Normalizat    .10000E-01    .25505        .97434E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .90427        1.2441        .65973E-04   -.95992    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.81861e-09
Minuit parameter uncertainties:
  1  0.0272893
  2  212.847
  3  0.000112178
  4  2.05415e-05
  5  6.12502e-05
  6  1.01113
  7  5.03214e-05
  8  4.10276e-05
  9  0.000119092
  10  1.09381
  11  0.990964
  12  6.20902e-06
  13  1.44465e-06
  14  5.19773e-06
  15  0.0857508
  16  1.87495e-06
  17  1.00183
  18  1.03315
  19  1.83212e-05
  20  6.05904e-06
  21  0.278104
  22  1.00682
  23  0.907632
  24  1.16448e-05
  25  1.11381e-06
  26  1.04273
  27  0.000162586
  28  1.00027
  29  9.57105e-07
  30  1.28687
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 247.479872315

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  4.597e+02  1.043e+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

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  9.043e-01  1.287e+00  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:  1.000e-02  9.571e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.28
Ra Dec: 354.904 2.710
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 5.56e-07 +/- 1.26e-09
Energy Flux (Fixed Index): 1.53e-04 +/- 3.48e-07

TS (Fixed Index): 1.28
Ra Dec: 354.904 2.710
Photon Flux Upper Limit: 3.03e-06 ph cm-2 s-1
Energy Flux Upper Limit: 2.36e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/72979/likelihoodResults_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.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) = 247.215785242
delta logL = 0.264087073079

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 247.164439851
delta logL = 0.315432463839

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    695.49       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7956       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89652       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=   247.1644     FROM MIGRAD    STATUS=CONVERGED     49 CALLS      192 TOTAL
                     EDM=   .84E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     697.55        806.46       -.11297E-04   -.38845E-04
   2  Index         1.7951        .82517        .10939E-03   -.43619E-05
   3  Normalizat    .10000E-01    .34334       -.17046E-05** at limit **
   4  Prefactor     .89656        .32013       -.84898E-06   -.66708E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 697.551
  Index      = 1.79509
  Normalizat = 0.01
  Prefactor  = 0.896559
 **********
 **   18 **HESSE 
 **********

 FCN=   247.1644     FROM HESSE     STATUS=OK            27 CALLS      219 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     697.55        809.10        .78621E-04   -1.0362    
   2  Index         1.7951        .82521        .32751E-03   -.69578    
   3  Normalizat    .10000E-01    .35167        .56135E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .89656        .31372        .16778E-03   -.96261    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.61734e-10
Minuit parameter uncertainties:
  1  823.366
  2  0.831708
  3  1.27442e-06
  4  0.314349
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/72979': 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) = 247.164436174
delta logL = 0.315436141184

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  6.976e+02  8.234e+02  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  1.795e+00  8.317e-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:  8.966e-01  3.143e-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:  1.000e-02  1.274e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.90
Ra Dec: 354.904 2.710
Photon Index (Free Index): 1.80 +/- 0.83
Photon Flux (Free Index): 3.48e-07 +/- 4.90e-07
Energy Flux (Free Index): 4.23e-04 +/- 8.86e-04

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/72979/cmap_HighResolution_408067201_408326401_4FGL_J2339.6+0242_daily_bin651.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.36e-01', comment='SUCCESS', photon_flux='5.56e-07', energy_flux2='4.23e-04', photon_flux_error='1.26e-09', dlogl='3.15e-01', energy_flux='1.53e-04', photon_flux2='3.48e-07', job_status='DONE', time_completed='2021-09-30 02:47:42.260476', photon_index_error2='0.83', photon_index2='1.80', ts='1.28', fit_tolerance='1e-08', GAL='0.90', photon_index_error='0.00', photon_flux_upper_limit='3.03e-06', energy_flux_error2='8.86e-04', EG='0.01', time_epoch_completed='1632995262.26', return_code='101', job_id='72979', GAL2='0.90', EG2='0.01', return_code2='0', energy_flux_error='3.48e-07', photon_flux_error2='4.90e-07', ts2='1.90', photon_index='2.55' WHERE bin_id='651' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:47:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0261>
Subject: Job 72979: <4FGL_J2339.6+0242_daily_bin651> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin651 354.904 2.7102 408067201 408326401 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 :                                   321.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             268.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   446 sec.
    Turnaround time :                            448 sec.

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

