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


Performing analysis on: 4FGL_J1238.5-1201_daily_bin1243
RA = 189.625, Dec = -12.028
tmin = 561513601, tmax = 561772801
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='862575', job_status='RUN', time_executed='2021-09-06 02:53:49.571843', time_epoch_executed='1630922029.57' WHERE source_name='4FGL J1238.5-1201' and cadence='daily' and bin_id='1243'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/862575

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/862575/ft1_4FGL_J1238.5-1201_daily_bin1243.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/862575/ft1_4FGL_J1238.5-1201_daily_bin1243.fits outfile=/scratch/kocevski/862575/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1243.fits ra=189.625 dec=-12.028 rad=12.0 tmin=561513601.0 tmax=561772801.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.80
user 3.58
sys 0.18

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.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/862575/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1243.fits evtable="EVENTS" outfile="/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.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.55
user 0.34
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits" evtable="EVENTS" scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits sctable="SC_DATA" outfile=/scratch/kocevski/862575/ltcube_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.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/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits
.....................!
real 14.06
user 13.63
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits evtable="EVENTS" scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits sctable="SC_DATA" expcube=/scratch/kocevski/862575/ltcube_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits outfile=/scratch/kocevski/862575/expmap_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.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/862575/ltcube_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits
.....................!
real 192.35
user 186.33
sys 5.28

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

Setting source of interest to:
4FGL J1238.5-1201 @ 189.625 -12.028

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits outfile=/scratch/kocevski/862575/cmap_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.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.625 yref=-12.028 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.58
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits outfile=/scratch/kocevski/862575/cmap_HighResolution_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.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.625 yref=-12.028 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/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits evtable="EVENTS" scfile=/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/862575/Model_4FGL_J1238.5-1201_daily_bin1243.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/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits.....................!
real 32.54
user 31.16
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits', '/scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits', expMap='/scratch/kocevski/862575/expmap_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits', expCube='/scratch/kocevski/862575/ltcube_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/862575/Model_4FGL_J1238.5-1201_daily_bin1243.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.5-1201'

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  4.386e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/862575/ft1_filtered_4FGL_J1238.5-1201_daily_bin1243.fits
Spacecraft file(s): /scratch/kocevski/862575/ft2_4FGL_J1238.5-1201_daily_bin1243.fits
Exposure map: /scratch/kocevski/862575/expmap_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits
Exposure cube: /scratch/kocevski/862575/ltcube_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/862575/Model_4FGL_J1238.5-1201_daily_bin1243.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 2732.44648318

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.4739       1.0000         .10000E-03   10000.    
     2 'Prefactor '    34.431       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11964E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .17281E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .31221E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .39757E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    5.3486       1.0000         .10000E-03   10000.    
     9 'Prefactor '    51.317       1.0000         .10000E-03   10000.    
    10 'Prefactor '    12.193       1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.8105       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .17959E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    257.29       1.0000         .10000E-03   10000.    
    14 'norm      '    .82160E-02   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .22861E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    6.4046       1.0000         .10000E-03   10000.    
    17 'norm      '    .13419E-01   1.0000         .10000E-03   10000.    
    18 'norm      '    8.6857       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .18299E-01   1.0000         .10000E-03   10000.    
    20 'norm      '    .45961E-01   1.0000         .10000E-03   10000.    
    21 'norm      '    2.5614       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10145E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    40.901       1.0000         .10000E-03   10000.    
    24 'Normalizat'    .10001E-01   1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.6189       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2731.985     FROM MIGRAD    STATUS=CONVERGED    235 CALLS     2207 TOTAL
                     EDM=   .20E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.6329        16.605        .74163E-05   -.51431E-04
   2  Prefactor     34.389        31.710       -.46973E-04    .14466E-02
   3  Prefactor     .10000E-03    49.897        .27604E-04** at limit **
   4  Prefactor     .10001E-03    86.337        .49281E-05** at limit **
   5  Prefactor     .10000E-03    61.275       -.16647E-05** at limit **
   6  norm          .10000E-03    21.948        .13272E-04** at limit **
   7  Prefactor     .10000E-03    8.3732        .25808E-06** at limit **
   8  Prefactor     5.3546        3.4542        .20650E-05    .12261E-03
   9  Prefactor     50.005        72.445        .20251E-03   -.18965E-02
  10  Prefactor     12.112        19.495       -.48709E-04   -.30147E-03
  11  Prefactor     9.5479        25.762       -.47464E-04   -.46913E-02
  12  Prefactor     .10000E-03    58.364       -.10911E-04** at limit **
  13  Prefactor     270.45        278.28        .11657E-03   -.17972E-03
  14  norm          .17394E-03    112.33        .20852E-03** at limit **
  15  Prefactor     .10050E-03    163.56       -.76508E-04** at limit **
  16  norm          6.3635        2.0806       -.41967E-05    .55025E-03
  17  norm          .10000E-03    42.232        .30554E-05** at limit **
  18  norm          8.7278        10.473        .35349E-05    .11460E-04
  19  Prefactor     .45442E-03    190.67        .33933E-03** at limit **
  20  norm          .10002E-03    108.62        .93038E-05** at limit **
  21  norm          .10175E-03    407.34       -.54927E-03** at limit **
  22  Prefactor     .10000E-03    11.537        .21678E-05** at limit **
  23  Prefactor     42.720        37.881       -.52708E-04   -.54308E-02
  24  Normalizat    .10000E-01    .99565       -.24985E-04** at limit **
  25  Prefactor     1.6185        .15409        .24070E-04    .29577E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.6329
  Prefactor  = 34.3892
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.35465
  Prefactor  = 50.0052
  Prefactor  = 12.1122
  Prefactor  = 9.54794
  Prefactor  = 0.0001
  Prefactor  = 270.451
  norm       = 0.00017394
  Prefactor  = 0.000100505
  norm       = 6.36355
  norm       = 0.0001
  norm       = 8.72784
  Prefactor  = 0.000454417
  norm       = 0.000100019
  norm       = 0.000101754
  Prefactor  = 0.0001
  Prefactor  = 42.7199
  Normalizat = 0.01
  Prefactor  = 1.61853
 **********
 **   18 **HESSE 
 **********

 FCN=   2731.985     FROM HESSE     STATUS=OK           477 CALLS     2684 TOTAL
                     EDM=   .15E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.6329        16.898        .54240E-02   -1.5327    
   2  Prefactor     34.389        38.330        .17074E-02   -1.4534    
   3  Prefactor     .10000E-03    49.915        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10001E-03    86.214        .91091E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    61.195        .10686E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    21.918        .10633E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.3468        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     5.3546        3.4605        .43443E-02   -1.5245    
   9  Prefactor     50.005        73.852        .13996E-02   -1.4292    
  10  Prefactor     12.112        19.516        .28680E-02   -1.5012    
  11  Prefactor     9.5479        31.188        .31984E-02   -1.5090    
  12  Prefactor     .10000E-03    58.196        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     270.45        274.75        .63162E-03   -1.2404    
  14  norm          .17394E-03    200.54        .92154E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10050E-03    164.57        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          6.3635        2.0678        .39649E-02   -1.5203    
  17  norm          .10000E-03    12.651        .68973E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          8.7278        10.510        .34002E-02   -1.5117    
  19  Prefactor     .45442E-03    511.34        .91142E-02   -1.5712    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10002E-03    108.80        .92504E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10175E-03    424.58        .63770E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    11.471        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     42.720        43.314        .15670E-02   -1.4400    
  24  Normalizat    .10000E-01    .40280        .32228       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     1.6185        .19718        .41902E-01   -.74272    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.48509e-06
Minuit parameter uncertainties:
  1  15.6771
  2  38.3571
  3  0.000281613
  4  0.00141143
  5  0.000253149
  6  2.88206e-05
  7  4.72969e-06
  8  3.46063
  9  73.9875
  10  19.5264
  11  31.2414
  12  0.000237869
  13  276.076
  14  0.24436
  15  0.0182759
  16  2.06786
  17  1.11695e-05
  18  10.5123
  19  0.858846
  20  0.00288612
  21  0.0549722
  22  3.5144e-06
  23  43.3461
  24  6.16222e-07
  25  0.197275
Done.

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

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  9.548e+00  3.124e+01  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.619e+00  1.973e-01  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  1.000e-02  6.162e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.11
Ra Dec: 189.625 -12.028
Photon Flux Upper Limit: 4.10e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.22e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/862575/likelihoodResults_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.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) = 2731.9647885
delta logL = 0.0204943890699

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2731.96044646
delta logL = 0.0248364356544

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    12.560       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2985       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.6174       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+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=   2731.960     FROM MIGRAD    STATUS=CONVERGED     94 CALLS      265 TOTAL
                     EDM=   .39E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.567        33.852        .11303E-03    .11567E-05
   2  Index         2.2974        1.4039        .13569E-01   -.49712E-05
   3  Normalizat    .10000E-01    1.0718        .14464E-01** at limit **
   4  Prefactor     1.6172        .13846        .18522E-03   -.78871E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.5667
  Index      = 2.29742
  Normalizat = 0.01
  Prefactor  = 1.61725
 **********
 **   18 **HESSE 
 **********

 FCN=   2731.960     FROM HESSE     STATUS=OK            25 CALLS      290 TOTAL
                     EDM=   .38E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.567        33.765        .45210E-05   -1.4999    
   2  Index         2.2974        1.4013        .54278E-03   -.57105    
   3  Normalizat    .10000E-01    1.0743        .28928E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.6172        .13808        .74089E-05   -.74307    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.80903e-11
Minuit parameter uncertainties:
  1  33.8165
  2  1.42856
  3  1.34997e-05
  4  0.138113
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/862575': 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) = 2731.96044564
delta logL = 0.0248372534111

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  1.257e+01  3.382e+01  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.297e+00  1.429e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.617e+00  1.381e-01  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  1.000e-02  1.350e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.11
Ra Dec: 189.625 -12.028

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/862575/cmap_HighResolution_561513601_561772801_4FGL_J1238.5-1201_daily_bin1243.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.22e-02', job_status='DONE', photon_flux_upper_limit='4.10e-07', time_completed='2021-09-06 03:01:49.177712', job_id='862575', GAL2='1.62', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1630922509.18', return_code2='0', ts='0.11', comment='SUCCESS', return_code='0', GAL='1.62', dlogl='2.48e-02', ts2='0.16', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='1243' AND source_name='4FGL J1238.5-1201' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 03:01:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0141>
Subject: Job 862575: <4FGL_J1238.5-1201_daily_bin1243> in cluster <slac> Done

Job <4FGL_J1238.5-1201_daily_bin1243> was submitted from host <rhel6-64c> by user <kocevski> in cluster <slac> at Mon Sep  6 02:50:25 2021
Job was executed on host(s) <bullet0141>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:50:59 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:50:59 2021
Terminated at Mon Sep  6 03:01:50 2021
Results reported at Mon Sep  6 03:01:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.5-1201_daily_bin1243 189.625 -12.028 561513601 561772801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.5-1201 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   476.48 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             295.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   650 sec.
    Turnaround time :                            685 sec.

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

