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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1028
RA = 189.594, Dec = -19.9945
tmin = 505785601, tmax = 506044801
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='851449', job_status='RUN', time_executed='2021-09-06 02:19:40.905589', time_epoch_executed='1630919980.91' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1028'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/851449

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/851449/ft1_4FGL_J1238.3-1959_daily_bin1028.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/851449/ft1_4FGL_J1238.3-1959_daily_bin1028.fits outfile=/scratch/kocevski/851449/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1028.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=505785601.0 tmax=506044801.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.61
user 3.39
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.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/851449/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1028.fits evtable="EVENTS" outfile="/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.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.51
user 0.34
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits" evtable="EVENTS" scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits sctable="SC_DATA" outfile=/scratch/kocevski/851449/ltcube_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.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/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits
.....................!
real 16.49
user 16.05
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits evtable="EVENTS" scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits sctable="SC_DATA" expcube=/scratch/kocevski/851449/ltcube_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits outfile=/scratch/kocevski/851449/expmap_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.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/851449/ltcube_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits
.....................!
real 192.44
user 187.07
sys 4.83

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

Setting source of interest to:
4FGL J1238.3-1959 @ 189.594 -19.9945

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits outfile=/scratch/kocevski/851449/cmap_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.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=189.594 yref=-19.9945 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.60
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits outfile=/scratch/kocevski/851449/cmap_HighResolution_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.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=189.594 yref=-19.9945 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.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits evtable="EVENTS" scfile=/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/851449/Model_4FGL_J1238.3-1959_daily_bin1028.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/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits.....................!
real 59.58
user 58.06
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits', '/scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits', expMap='/scratch/kocevski/851449/expmap_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits', expCube='/scratch/kocevski/851449/ltcube_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/851449/Model_4FGL_J1238.3-1959_daily_bin1028.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.3-1959'

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  3.073e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/851449/ft1_filtered_4FGL_J1238.3-1959_daily_bin1028.fits
Spacecraft file(s): /scratch/kocevski/851449/ft2_4FGL_J1238.3-1959_daily_bin1028.fits
Exposure map: /scratch/kocevski/851449/expmap_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits
Exposure cube: /scratch/kocevski/851449/ltcube_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/851449/Model_4FGL_J1238.3-1959_daily_bin1028.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) = 6875.36250747

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.350       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    34.055       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10517E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.0013       1.0000         .10000E-03   10000.    
    12 'Prefactor '    10.942       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.2662       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10086E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.2799       1.0000         .10000E-03   10000.    
    18 'Prefactor '    11.574       1.0000         .10000E-03   10000.    
    19 'norm      '    7.8609       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.4319       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .88265       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6875.359     FROM MIGRAD    STATUS=CONVERGED    454 CALLS     2160 TOTAL
                     EDM=   .26E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.350        21.167        .10011E-06   -.94056E-06
   2  Prefactor     .10000E-03    6.9496       -.54385E-06** at limit **
   3  norm          .10000E-03    2.0456       -.11123E-07** at limit **
   4  Prefactor     .10000E-03    2.9394       -.14983E-06** at limit **
   5  Prefactor     .10000E-03    33.068        .29939E-05** at limit **
   6  Prefactor     34.049        38.207        .75180E-06   -.96549E-06
   7  Prefactor     .10000E-03    11.596        .16900E-06** at limit **
   8  Prefactor     .10000E-03    78.490        .29631E-05** at limit **
   9  Prefactor     .10000E-03    15.272       -.48000E-06** at limit **
  10  Prefactor     .10000E-03    2.3503       -.88808E-08** at limit **
  11  Prefactor     9.0013        2.8828        .12879E-07   -.24442E-05
  12  Prefactor     10.942        13.199        .16638E-07   -.23749E-05
  13  Prefactor     .10000E-03    3.9948        .73377E-08** at limit **
  14  norm          1.2663        .92245        .11404E-07    .11450E-04
  15  Prefactor     .10000E-03    43.057       -.47834E-05** at limit **
  16  norm          .10000E-03    6.8489        .53519E-06** at limit **
  17  norm          5.2781        9.5493        .28233E-05    .16416E-04
  18  Prefactor     11.575        8.8068       -.99330E-06    .36904E-04
  19  norm          7.8613        3.7760       -.12953E-07    .13972E-05
  20  Normalizat    1.4319        .25286       -.24253E-06   -.21430E-04
  21  Prefactor     .88262        .12261       -.21690E-06   -.28678E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.35
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.0492
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.00127
  Prefactor  = 10.9422
  Prefactor  = 0.0001
  norm       = 1.26628
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 5.2781
  Prefactor  = 11.5748
  norm       = 7.86132
  Normalizat = 1.43186
  Prefactor  = 0.882616
 **********
 **   18 **HESSE 
 **********

 FCN=   6875.359     FROM HESSE     STATUS=OK           315 CALLS     2475 TOTAL
                     EDM=   .49E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.350        21.164        .54813E-03   -1.4977    
   2  Prefactor     .10000E-03    6.9706        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    2.0597        .11579E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.9647        .13861E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    33.093        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     34.049        38.210        .68668E-04   -1.4540    
   7  Prefactor     .10000E-03    11.610        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    78.677        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    15.315        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.3569        .12410E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     9.0013        2.8825        .77324E-04   -1.5108    
  12  Prefactor     10.942        13.200        .12112E-03   -1.5046    
  13  Prefactor     .10000E-03    4.0053        .16184E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.2663        .92086        .65441E-04   -1.5483    
  15  Prefactor     .10000E-03    43.089        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    6.9013        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.2781        9.5764        .87460E-03   -1.5248    
  18  Prefactor     11.575        8.8252        .11776E-03   -1.5027    
  19  norm          7.8613        3.7786        .10743E-03   -1.5147    
  20  Normalizat    1.4319        .30239        .33666E-03   -.79712    
  21  Prefactor     .88262        .14686        .20052E-03   -.96751    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.9115e-12
Minuit parameter uncertainties:
  1  21.1756
  2  1.34922e-07
  3  6.79161e-08
  4  9.12672e-06
  5  1.91676e-05
  6  38.2379
  7  5.56854e-06
  8  7.13718e-05
  9  7.12759e-06
  10  2.40014e-07
  11  2.8825
  12  13.2033
  13  3.97064e-07
  14  0.920868
  15  1.60214e-05
  16  2.44816e-06
  17  9.57922
  18  8.82617
  19  3.77873
  20  0.30277
  21  0.146922
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.094e+01  1.320e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  8.826e-01  1.469e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.432e+00  3.028e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.01
Ra Dec: 189.594 -19.994
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 3.24e-08 +/- 3.90e-08
Energy Flux (Fixed Index): 1.60e-05 +/- 1.93e-05

TS (Fixed Index): 1.01
Ra Dec: 189.594 -19.994
Photon Flux Upper Limit: 1.29e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.77e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/851449/likelihoodResults_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.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) = 6875.3557532
delta logL = 0.00349327370714

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6875.35485243
delta logL = 0.00439404195822

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6875.355     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      211 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.366        504.33        .31112E-02    .30330E-03
   2  Index         2.2167        5.8976        .15941        .93646E-04
   3  Normalizat    1.4296        .11414        .76123E-01    .97232E-05
   4  Prefactor     .88314        .48169E-01    .44790E-01    .78172E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.366
  Index      = 2.2167
  Normalizat = 1.42965
  Prefactor  = 0.883141
 **********
 **   18 **HESSE 
 **********

 FCN=   6875.355     FROM HESSE     STATUS=OK            33 CALLS      244 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.366        14.778        .12445E-03   -1.5064    
   2  Index         2.2167        .72798        .94188E-02   -.59036    
   3  Normalizat    1.4296        .30126        .33688E-03   -.79775    
   4  Prefactor     .88314        .14556        .20046E-03   -.96733    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.20838e-10
Minuit parameter uncertainties:
  1  14.7834
  2  0.731754
  3  0.301632
  4  0.145623
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/851449': 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) = 6875.35485243
delta logL = 0.00439404291501

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.037e+01  1.478e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.217e+00  7.318e-01  0.000e+00  1.000e+01 (-1.000e+00)
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  8.831e-01  1.456e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.430e+00  3.016e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.02
Ra Dec: 189.594 -19.994
Photon Index (Free Index): 2.22 +/- 0.73
Photon Flux (Free Index): 3.46e-08 +/- 4.65e-08
Energy Flux (Free Index): 1.51e-05 +/- 2.10e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/851449/cmap_HighResolution_505785601_506044801_4FGL_J1238.3-1959_daily_bin1028.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.77e-03', comment='SUCCESS', photon_flux='3.24e-08', energy_flux2='1.51e-05', photon_flux_error='3.90e-08', dlogl='4.39e-03', energy_flux='1.60e-05', photon_flux2='3.46e-08', job_status='DONE', time_completed='2021-09-06 02:30:53.357681', photon_index_error2='0.73', photon_index2='2.22', ts='1.01', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='1.29e-07', energy_flux_error2='2.10e-05', EG='1.43', time_epoch_completed='1630920653.36', return_code='0', job_id='851449', GAL2='0.88', EG2='1.43', return_code2='0', energy_flux_error='1.93e-05', photon_flux_error2='4.65e-08', ts2='1.02', photon_index='2.15' WHERE bin_id='1028' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:30:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0170>
Subject: Job 851449: <4FGL_J1238.3-1959_daily_bin1028> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1028> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 02:15:38 2021
Job was executed on host(s) <bullet0170>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:16:19 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 02:16:19 2021
Terminated at Mon Sep  6 02:30:54 2021
Results reported at Mon Sep  6 02:30:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1028 189.594 -19.9945 505785601 506044801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.3-1959 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   671.11 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             275.64 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   874 sec.
    Turnaround time :                            916 sec.

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

