/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 239 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 = 7400
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1257.2+3646_daily_bin138
RA = 194.31, Dec = 36.7706
tmin = 275097601, tmax = 275356801
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='31870', job_status='RUN', time_executed='2021-09-06 11:29:52.504620', time_epoch_executed='1630952992.5' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='138'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/31870

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/31870/ft1_4FGL_J1257.2+3646_daily_bin138.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/31870/ft1_4FGL_J1257.2+3646_daily_bin138.fits outfile=/scratch/kocevski/31870/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin138.fits ra=194.31 dec=36.7706 rad=12.0 tmin=275097601.0 tmax=275356801.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.98
user 4.75
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.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/31870/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin138.fits evtable="EVENTS" outfile="/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.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.57
user 0.33
sys 0.23

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits" evtable="EVENTS" scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits sctable="SC_DATA" outfile=/scratch/kocevski/31870/ltcube_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.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/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits
.....................!
real 11.50
user 11.15
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits evtable="EVENTS" scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits sctable="SC_DATA" expcube=/scratch/kocevski/31870/ltcube_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits outfile=/scratch/kocevski/31870/expmap_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.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/31870/ltcube_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits
.....................!
real 191.94
user 187.39
sys 4.15

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

Setting source of interest to:
4FGL J1257.2+3646 @ 194.31 36.7706

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits outfile=/scratch/kocevski/31870/cmap_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.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=194.31 yref=36.7706 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.52
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits outfile=/scratch/kocevski/31870/cmap_HighResolution_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.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=194.31 yref=36.7706 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.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits evtable="EVENTS" scfile=/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/31870/Model_4FGL_J1257.2+3646_daily_bin138.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/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits.....................!
real 47.34
user 46.02
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits', '/scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits', expMap='/scratch/kocevski/31870/expmap_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits', expCube='/scratch/kocevski/31870/ltcube_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/31870/Model_4FGL_J1257.2+3646_daily_bin138.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1257.2+3646'

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.472e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/31870/ft1_filtered_4FGL_J1257.2+3646_daily_bin138.fits
Spacecraft file(s): /scratch/kocevski/31870/ft2_4FGL_J1257.2+3646_daily_bin138.fits
Exposure map: /scratch/kocevski/31870/expmap_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits
Exposure cube: /scratch/kocevski/31870/ltcube_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/31870/Model_4FGL_J1257.2+3646_daily_bin138.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) = 5471.99318955

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .24800E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    4.3811       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.4217       1.0000         .10000E-03   10000.    
     6 'Prefactor '    31.562       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10156E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    27.629       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10076E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10337E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    13.058       1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.221       1.0000         .10000E-03   10000.    
    15 'norm      '    .10408E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    6.2662       1.0000         .10000E-03   10000.    
    17 'norm      '    5.1634       1.0000         .10000E-03   10000.    
    18 'norm      '    5.7092       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .29866E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    11.479       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    10.990       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.2068       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .64858       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5471.919     FROM MIGRAD    STATUS=CONVERGED    583 CALLS     2499 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    104.33       -.64393E-05** at limit **
   2  norm          4.3812        2.5943       -.48906E-07    .25330E-04
   3  Prefactor     .10000E-03    6.5649        .91138E-07** at limit **
   4  Prefactor     .10000E-03    1.2369        .29307E-07** at limit **
   5  Prefactor     2.4218        2.1087       -.20793E-07    .10211E-04
   6  Prefactor     31.560        15.803       -.49833E-07    .18315E-04
   7  Prefactor     .10000E-03    45.736       -.15473E-05** at limit **
   8  Prefactor     27.627        19.748        .55268E-07    .26175E-04
   9  Prefactor     .10001E-03    76.269        .80885E-05** at limit **
  10  Prefactor     .10000E-03    2.9309       -.10461E-06** at limit **
  11  norm          .10000E-03    1.7097       -.19947E-06** at limit **
  12  Prefactor     .10000E-03    14.590       -.66875E-07** at limit **
  13  Prefactor     13.003        29.190       -.21612E-05   -.15579E-03
  14  Prefactor     13.219        13.547        .21456E-06    .39995E-04
  15  norm          .10000E-03    2.6477       -.26421E-06** at limit **
  16  norm          6.2662        7.6474       -.29251E-07    .47403E-05
  17  norm          5.1579        8.0189       -.25917E-05    .19638E-03
  18  norm          5.7138        10.249        .54948E-05   -.94060E-04
  19  Prefactor     .10000E-03    3.1316       -.40885E-06** at limit **
  20  Prefactor     11.477        13.987        .78591E-06    .83976E-04
  21  Prefactor     .10000E-03    18.777        .23338E-06** at limit **
  22  Prefactor     .10000E-03    4.6330        .21847E-07** at limit **
  23  Prefactor     10.958        89.839       -.86772E-05   -.59480E-04
  24  Normalizat    1.2073        .18496        .20608E-05    .17925E-04
  25  Prefactor     .64809        .21407       -.20200E-05    .11482E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00010001
  norm       = 4.38124
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.42185
  Prefactor  = 31.5596
  Prefactor  = 0.000100001
  Prefactor  = 27.6274
  Prefactor  = 0.000100014
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.0025
  Prefactor  = 13.2185
  norm       = 0.0001
  norm       = 6.2662
  norm       = 5.15794
  norm       = 5.71383
  Prefactor  = 0.0001
  Prefactor  = 11.4766
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.9578
  Normalizat = 1.20727
  Prefactor  = 0.648091
 **********
 **   18 **HESSE 
 **********

 FCN=   5471.919     FROM HESSE     STATUS=OK           427 CALLS     2926 TOTAL
                     EDM=   .93E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    107.30        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.3812        2.5929        .88889E-04   -1.5289    
   3  Prefactor     .10000E-03    6.6283        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    1.2695        .16048E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.4218        2.1066        .96374E-04   -1.5397    
   6  Prefactor     31.560        15.786        .71321E-04   -1.4584    
   7  Prefactor     .10000E-03    46.201        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     27.627        19.748        .76217E-04   -1.4656    
   9  Prefactor     .10001E-03    78.910        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.9430        .12361E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    1.7126        .94387E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    14.594        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     13.003        29.875        .11085E-03   -1.4987    
  14  Prefactor     13.219        13.532        .11016E-03   -1.4981    
  15  norm          .10000E-03    2.6574        .11743E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          6.2662        7.6461        .16036E-03   -1.5207    
  17  norm          5.1579        8.0535        .15403E-03   -1.5254    
  18  norm          5.7138        10.442        .84053E-03   -1.5230    
  19  Prefactor     .10000E-03    6.0691        .23744E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     11.477        13.563        .11824E-03   -1.5030    
  21  Prefactor     .10000E-03    18.783        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.6365        .15550E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     10.958        92.670        .12085E-03   -1.5046    
  24  Normalizat    1.2073        .21080        .21223E-03   -.86379    
  25  Prefactor     .64809        .24318        .33466E-03   -1.0560    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.31053e-10
Minuit parameter uncertainties:
  1  0.00206836
  2  2.59294
  3  5.82676e-06
  4  9.28999e-09
  5  2.1067
  6  15.7879
  7  0.000409134
  8  19.7528
  9  0.0021344
  10  9.94256e-07
  11  3.97266e-06
  12  1.55686e-05
  13  29.9092
  14  13.5352
  15  3.04759e-06
  16  7.64732
  17  8.05521
  18  10.4451
  19  6.90867e-05
  20  13.567
  21  3.20236e-05
  22  7.59839e-07
  23  63.8662
  24  0.210952
  25  0.243572
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  9.943e-07  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  6.481e-01  2.436e-01  0.000e+00  1.000e+01 ( 1.000e+00)
600        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
601        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
598   Normalization:  1.207e+00  2.110e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 194.310 36.771
Photon Flux Upper Limit: 4.95e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.72e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/31870/likelihoodResults_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.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) = 5471.92072227
delta logL = -0.00160611132742

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5471.9191163
delta logL = -1.40544216265e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10222E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0083       1.0000          .0000       10.000    
     3 'Normalizat'    1.2073       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .64808       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5471.919     FROM MIGRAD    STATUS=FAILED        87 CALLS      238 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10104E-03    41.158        .12540E-02** at limit **
   2  Index         1.9564        8.7923        .50000        .42008E-04
   3  Normalizat    1.2073        .15749E-01    .21223E-03   -.11463E-04
   4  Prefactor     .64809        .18801E-01    .33466E-03   -.85607E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5471.919     FROM SIMPLEX   STATUS=UNCHANGED    129 CALLS      367 TOTAL
                     EDM=   .10E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10104E-03    41.158        .28846E-03** at limit **
   2  Index         1.9564        8.7923        .27173E-03    .42008E-04
   3  Normalizat    1.2073        .15749E-01    .20002E-05   -.11463E-04
   4  Prefactor     .64809        .18801E-01    .36981E-05   -.85607E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5471.919     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      413 TOTAL
                     EDM=   .27E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    36.660        .25080E-02** at limit **
   2  Index         1.6858        5.8007        .50000        .11084E-06
   3  Normalizat    1.2073        .14168E-01    .84893E-05    .22123E-03
   4  Prefactor     .64809        .16914E-01    .13386E-04    .14234E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.68584
  Normalizat = 1.20727
  Prefactor  = 0.648089
 **********
 **   18 **HESSE 
 **********

 FCN=   5471.919     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      442 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    174.93        .50160E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6858        5.6463        .50000       -.72459    
   3  Normalizat    1.2073        .32575E-01    .16979E-05   -.86378    
   4  Prefactor     .64809        .38886E-01    .26773E-05   -1.0560    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.30174e-11
Minuit parameter uncertainties:
  1  0.000100132
  2  563.404
  3  0.0325751
  4  0.0388872
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/31870': 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) = 5471.91911392
delta logL = 2.24168434215e-06

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  1.001e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  1.686e+00  5.634e+02  0.000e+00  1.000e+01 (-1.000e+00)
302        Scale:  1.897e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  6.481e-01  3.889e-02  0.000e+00  1.000e+01 ( 1.000e+00)
600        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
601        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
598   Normalization:  1.207e+00  3.258e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 194.310 36.771

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/31870/cmap_HighResolution_275097601_275356801_4FGL_J1257.2+3646_daily_bin138.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.72e-03', job_status='DONE', photon_flux_upper_limit='4.95e-08', time_completed='2021-09-06 11:40:48.529332', job_id='31870', GAL2='0.65', fit_tolerance='1e-08', EG2='1.21', EG='1.21', time_epoch_completed='1630953648.53', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.65', dlogl='2.24e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='138' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:40:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0304>
Subject: Job 31870: <4FGL_J1257.2+3646_daily_bin138> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin138> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Mon Sep  6 11:25:43 2021
Job was executed on host(s) <bullet0304>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:25:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 11:25:44 2021
Terminated at Mon Sep  6 11:40:49 2021
Results reported at Mon Sep  6 11:40:49 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin138 194.31 36.7706 275097601 275356801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1257.2+3646 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   653.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             226.53 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   904 sec.
    Turnaround time :                            906 sec.

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

