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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin370
RA = 194.31, Dec = 36.7706
tmin = 335232001, tmax = 335491201
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='32975', job_status='RUN', time_executed='2021-09-06 11:34:27.180139', time_epoch_executed='1630953267.18' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='370'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/32975

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/32975/ft1_4FGL_J1257.2+3646_daily_bin370.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/32975/ft1_4FGL_J1257.2+3646_daily_bin370.fits outfile=/scratch/kocevski/32975/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin370.fits ra=194.31 dec=36.7706 rad=12.0 tmin=335232001.0 tmax=335491201.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.70
user 3.49
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.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/32975/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin370.fits evtable="EVENTS" outfile="/scratch/kocevski/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.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.49
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits" evtable="EVENTS" scfile=/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits sctable="SC_DATA" outfile=/scratch/kocevski/32975/ltcube_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.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/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits
.....................!
real 12.28
user 11.93
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits evtable="EVENTS" scfile=/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits sctable="SC_DATA" expcube=/scratch/kocevski/32975/ltcube_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits outfile=/scratch/kocevski/32975/expmap_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.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/32975/ltcube_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits
.....................!
real 190.37
user 185.48
sys 4.50

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/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits scfile=/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits outfile=/scratch/kocevski/32975/cmap_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.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.55
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits scfile=/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits outfile=/scratch/kocevski/32975/cmap_HighResolution_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.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.55
user 0.38
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits', '/scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits', expMap='/scratch/kocevski/32975/expmap_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits', expCube='/scratch/kocevski/32975/ltcube_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/32975/Model_4FGL_J1257.2+3646_daily_bin370.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/32975/ft1_filtered_4FGL_J1257.2+3646_daily_bin370.fits
Spacecraft file(s): /scratch/kocevski/32975/ft2_4FGL_J1257.2+3646_daily_bin370.fits
Exposure map: /scratch/kocevski/32975/expmap_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits
Exposure cube: /scratch/kocevski/32975/ltcube_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/32975/Model_4FGL_J1257.2+3646_daily_bin370.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) = 4996.86283061

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.3538       1.0000         .10000E-03   10000.    
     2 'norm      '    3.1984       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .53865E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    25.979       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10072E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10109E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .14764E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    14.379       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10095E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.4656       1.0000         .10000E-03   10000.    
    18 'norm      '    3.4118       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.1625       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .73887       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=   4996.824     FROM MIGRAD    STATUS=CONVERGED    621 CALLS     2510 TOTAL
                     EDM=   .30E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3447        47.537       -.24140E-05   -.27433E-04
   2  norm          3.1836        3.0513        .40160E-07   -.45813E-03
   3  Prefactor     .10000E-03    4.3672        .55935E-06** at limit **
   4  Prefactor     .10000E-03    1.6467        .14125E-06** at limit **
   5  Prefactor     .35465E-01    1.4461        .35785E-06    .18420E-04
   6  Prefactor     25.928        12.800       -.23929E-05   -.14769E-03
   7  Prefactor     .10000E-03    23.717        .22244E-05** at limit **
   8  Prefactor     .10000E-03    6.5562       -.58405E-05** at limit **
   9  Prefactor     .10000E-03    29.332        .10227E-05** at limit **
  10  Prefactor     .10000E-03    3.6037       -.11875E-06** at limit **
  11  norm          .10000E-03    4.0832       -.10281E-05** at limit **
  12  Prefactor     .10000E-03    16.152       -.13978E-05** at limit **
  13  Prefactor     14.338        23.349        .14556E-04    .23431E-04
  14  Prefactor     .10000E-03    8.1901        .20426E-06** at limit **
  15  norm          .10000E-03    1.4132       -.23638E-07** at limit **
  16  norm          .10000E-03    5.7235       -.15445E-05** at limit **
  17  norm          7.4642        5.1508        .78949E-06   -.35768E-03
  18  norm          3.4164        6.5831       -.33847E-05   -.23843E-03
  19  Prefactor     .10000E-03    .93663       -.61988E-07** at limit **
  20  Prefactor     .10000E-03    3.4553       -.51690E-07** at limit **
  21  Prefactor     .10000E-03    61.728       -.24202E-05** at limit **
  22  Prefactor     .10000E-03    6.3828        .68680E-05** at limit **
  23  Prefactor     .10000E-03    61.038       -.73326E-05** at limit **
  24  Normalizat    1.1619        .17839       -.17592E-05    .35338E-04
  25  Prefactor     .73940        .21239        .10245E-05   -.10986E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.34467
  norm       = 3.1836
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0354647
  Prefactor  = 25.9275
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 14.3384
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 7.46419
  norm       = 3.41644
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.16192
  Prefactor  = 0.739403
 **********
 **   18 **HESSE 
 **********

 FCN=   4996.824     FROM HESSE     STATUS=OK           421 CALLS     2931 TOTAL
                     EDM=   .72E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.3447        47.646        .19304E-03   -1.5291    
   2  norm          3.1836        2.9022        .10719E-03   -1.5351    
   3  Prefactor     .10000E-03    4.3853        .14425E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.3088        .16380E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .35465E-01    58.036        .15703E-02   -1.5670    
   6  Prefactor     25.928        13.090        .78595E-04   -1.4689    
   7  Prefactor     .10000E-03    23.776        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    6.5504        .17668E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    29.335        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.6573        .13103E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    4.2065        .27949E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    16.155        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     14.338        23.367        .10563E-03   -1.4950    
  14  Prefactor     .10000E-03    8.2092        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.4154        .82065E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.7296        .16514E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.4642        5.2839        .10127E-03   -1.5161    
  18  norm          3.4164        6.7622        .19630E-03   -1.5338    
  19  Prefactor     .10000E-03    .94132        .66792E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    3.4578        .12832E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    62.048        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    6.3724        .17409E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    61.172        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.1619        .20905        .20654E-03   -.87788    
  25  Prefactor     .73940        .24777        .30653E-03   -1.0200    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.15578e-10
Minuit parameter uncertainties:
  1  28.8042
  2  2.90235
  3  6.36818e-06
  4  2.00721e-05
  5  2.86804
  6  13.0912
  7  1.6852e-05
  8  6.35046e-06
  9  5.95335e-05
  10  2.25146e-05
  11  0.000145901
  12  5.18963e-06
  13  23.3818
  14  3.22036e-05
  15  5.03863e-06
  16  2.525e-06
  17  5.28419
  18  6.76369
  19  5.42811e-06
  20  7.5584e-06
  21  2.16424e-05
  22  4.51679e-06
  23  5.11932e-05
  24  0.209202
  25  0.248145
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  2.251e-05  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:  7.394e-01  2.481e-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.162e+00  2.092e-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.81e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.61e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/32975/likelihoodResults_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.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) = 4996.82493677
delta logL = -0.00129970131547

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4996.8236369
delta logL = 1.66117388289e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10070E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0496       1.0000          .0000       10.000    
     3 'Normalizat'    1.1620       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73939       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=   4996.824     FROM MIGRAD    STATUS=FAILED        86 CALLS      238 TOTAL
                     EDM=   .72E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    189.96        .13379E-02** at limit **
   2  Index         2.0741        6.0058        .50000       -.58023E-04
   3  Normalizat    1.1619        .31920E-01    .20654E-03   -.46379E-04
   4  Prefactor     .73941        .38761E-01    .30653E-03    .84784E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4996.824     FROM SIMPLEX   STATUS=UNCHANGED    170 CALLS      408 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    189.96        .33203E-03** at limit **
   2  Index         2.0741        6.0058        .17097E-04   -.58023E-04
   3  Normalizat    1.1619        .31920E-01    .18753E-06   -.46379E-04
   4  Prefactor     .73941        .38761E-01    .74179E-07    .84784E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4996.824     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      442 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    633.60        .26757E-03** at limit **
   2  Index         2.0746        5.7235        .50000       -.58109E-04
   3  Normalizat    1.1619        .76252E-01    .41308E-04   -.50254E-04
   4  Prefactor     .73941        .92574E-01    .12261E-04    .82151E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100013
  Index      = 2.07456
  Normalizat = 1.16192
  Prefactor  = 0.739408
 **********
 **   18 **HESSE 
 **********

 FCN=   4996.824     FROM HESSE     STATUS=OK            29 CALLS      471 TOTAL
                     EDM=   .48E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    4.6402        .53515E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0746        6.0072        .50000       -.62499    
   3  Normalizat    1.1619        .20195        .82617E-05   -.87788    
   4  Prefactor     .73941        .24511        .24522E-05   -1.0200    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.81191e-09
Minuit parameter uncertainties:
  1  0.000484249
  2  4.46481
  3  0.20209
  4  0.245473
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/32975': 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) = 4996.82363645
delta logL = 6.21546860202e-07

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  4.842e-04  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.075e+00  4.465e+00  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:  7.394e-01  2.455e-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.162e+00  2.021e-01  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/32975/cmap_HighResolution_335232001_335491201_4FGL_J1257.2+3646_daily_bin370.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.61e-03', job_status='DONE', photon_flux_upper_limit='4.81e-08', time_completed='2021-09-06 11:44:49.540987', job_id='32975', GAL2='0.74', fit_tolerance='1e-08', EG2='1.16', EG='1.16', time_epoch_completed='1630953889.54', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.74', dlogl='6.22e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='370' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:44:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0073>
Subject: Job 32975: <4FGL_J1257.2+3646_daily_bin370> in cluster <slac> Done

Job <4FGL_J1257.2+3646_daily_bin370> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Sep  6 11:30:30 2021
Job was executed on host(s) <bullet0073>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:30:32 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:30:32 2021
Terminated at Mon Sep  6 11:44:50 2021
Results reported at Mon Sep  6 11:44:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin370 194.31 36.7706 335232001 335491201 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 :                                   621.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             285.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   857 sec.
    Turnaround time :                            860 sec.

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

