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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin332
RA = 194.31, Dec = 36.7706
tmin = 325382401, tmax = 325641601
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='32919', job_status='RUN', time_executed='2021-09-06 11:33:08.335250', time_epoch_executed='1630953188.34' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='332'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/32919

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/32919/ft1_4FGL_J1257.2+3646_daily_bin332.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/32919/ft2_4FGL_J1257.2+3646_daily_bin332.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/32919/ft1_4FGL_J1257.2+3646_daily_bin332.fits outfile=/scratch/kocevski/32919/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin332.fits ra=194.31 dec=36.7706 rad=12.0 tmin=325382401.0 tmax=325641601.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.48
user 3.25
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/32919/ft1_filtered_4FGL_J1257.2+3646_daily_bin332.fits evtable="EVENTS" scfile=/scratch/kocevski/32919/ft2_4FGL_J1257.2+3646_daily_bin332.fits sctable="SC_DATA" expcube=/scratch/kocevski/32919/ltcube_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.fits outfile=/scratch/kocevski/32919/expmap_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.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/32919/ltcube_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.fits
.....................!
real 191.90
user 187.28
sys 4.25

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/32919/ft1_filtered_4FGL_J1257.2+3646_daily_bin332.fits scfile=/scratch/kocevski/32919/ft2_4FGL_J1257.2+3646_daily_bin332.fits outfile=/scratch/kocevski/32919/cmap_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.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.54
user 0.39
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/32919/ft1_filtered_4FGL_J1257.2+3646_daily_bin332.fits scfile=/scratch/kocevski/32919/ft2_4FGL_J1257.2+3646_daily_bin332.fits outfile=/scratch/kocevski/32919/cmap_HighResolution_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.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.37
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10179E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .59260       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10804E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.3284       1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.8299       1.0000         .10000E-03   10000.    
     6 'Prefactor '    14.612       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    7.3888       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .17313       1.0000         .10000E-03   10000.    
    11 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10048E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10024E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.4384       1.0000         .10000E-03   10000.    
    17 'norm      '    9.4535       1.0000         .10000E-03   10000.    
    18 'norm      '    5.7173       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    14.169       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    6.3000       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0346       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0075       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=   5752.144     FROM MIGRAD    STATUS=CONVERGED    578 CALLS     2866 TOTAL
                     EDM=   .69E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.691       -.49257E-06** at limit **
   2  norm          .59227        2.9272       -.10731E-05    .45397E-03
   3  Prefactor     .10000E-03    6.7905        .95308E-07** at limit **
   4  Prefactor     8.3284        3.3737        .36301E-06    .13293E-02
   5  Prefactor     2.8304        2.2922        .15473E-06    .63321E-03
   6  Prefactor     14.616        9.8755        .55629E-07    .12145E-03
   7  Prefactor     .10000E-03    14.152       -.70633E-06** at limit **
   8  Prefactor     7.3306        20.960        .33193E-05    .33056E-03
   9  Prefactor     .10000E-03    25.236        .12606E-05** at limit **
  10  Prefactor     .21641        39.467       -.12368E-04    .16456E-03
  11  norm          .10000E-03    1.9079        .72727E-08** at limit **
  12  Prefactor     .10000E-03    24.589        .17523E-05** at limit **
  13  Prefactor     .10000E-03    12.067        .69040E-06** at limit **
  14  Prefactor     .10000E-03    7.5235       -.20898E-06** at limit **
  15  norm          .10000E-03    1.5353       -.13068E-07** at limit **
  16  norm          4.4400        15.663        .16888E-07    .40418E-04
  17  norm          9.4465        9.6187       -.86206E-07    .46882E-04
  18  norm          5.7247        14.381        .48510E-07    .57296E-04
  19  Prefactor     .10000E-03    1.3614       -.14679E-07** at limit **
  20  Prefactor     14.166        13.900       -.10657E-07    .17093E-04
  21  Prefactor     .10000E-03    25.937        .66230E-06** at limit **
  22  Prefactor     6.3021        15.471        .99499E-07    .54331E-04
  23  Prefactor     .10000E-03    28.351       -.24930E-05** at limit **
  24  Normalizat    1.0348        .17783       -.50969E-06    .18965E-03
  25  Prefactor     1.0071        .21694        .10737E-05    .26711E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.592266
  Prefactor  = 0.0001
  Prefactor  = 8.32843
  Prefactor  = 2.83043
  Prefactor  = 14.6159
  Prefactor  = 0.0001
  Prefactor  = 7.33061
  Prefactor  = 0.000100001
  Prefactor  = 0.216413
  norm       = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 4.43996
  norm       = 9.44646
  norm       = 5.72468
  Prefactor  = 0.0001
  Prefactor  = 14.1661
  Prefactor  = 0.0001
  Prefactor  = 6.30214
  Prefactor  = 0.000100004
  Normalizat = 1.03482
  Prefactor  = 1.00707
 **********
 **   18 **HESSE 
 **********

 FCN=   5752.144     FROM HESSE     STATUS=OK           421 CALLS     3287 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    14.716        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .59227        2.9746        .23645E-03   -1.5554    
   3  Prefactor     .10000E-03    6.9238        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.3284        3.3985        .80321E-04   -1.5131    
   5  Prefactor     2.8304        2.2956        .99138E-04   -1.5371    
   6  Prefactor     14.616        9.8748        .10478E-03   -1.4943    
   7  Prefactor     .10000E-03    14.219        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     7.3306        21.185        .14755E-03   -1.5166    
   9  Prefactor     .10000E-03    25.356        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .21641        40.979        .34670E-02   -1.5615    
  11  norm          .10000E-03    1.9173        .10225E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    24.806        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    12.121        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    7.5351        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.5372        .91759E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.4400        15.691        .19114E-03   -1.5287    
  17  norm          9.4465        10.043        .12211E-03   -1.5093    
  18  norm          5.7247        15.011        .16799E-03   -1.5229    
  19  Prefactor     .10000E-03    1.3680        .86291E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     14.166        13.891        .10641E-03   -1.4955    
  21  Prefactor     .10000E-03    25.980        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     6.3021        15.468        .15992E-03   -1.5206    
  23  Prefactor     .10000E-03    28.784        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0348        .21109        .23746E-03   -.91873    
  25  Prefactor     1.0071        .25668        .29231E-03   -.92494    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.74097e-09
Minuit parameter uncertainties:
  1  8.95411e-05
  2  2.65461
  3  1.89137e-05
  4  3.39856
  5  2.29564
  6  9.87589
  7  0.000126518
  8  21.2063
  9  0.000324121
  10  5.95874
  11  4.00848e-06
  12  0.000423211
  13  0.000136914
  14  2.15649e-05
  15  1.08138e-06
  16  15.7057
  17  10.0452
  18  15.0213
  19  2.46409e-06
  20  13.894
  21  0.000179577
  22  15.4777
  23  0.000658204
  24  0.211258
  25  0.25699
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  2.164e-01  5.959e+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

GAL_V02
   Spectrum: PowerLaw
599    Prefactor:  1.007e+00  2.570e-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.035e+00  2.113e-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: 6.61e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.97e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/32919/likelihoodResults_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.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) = 5752.14095151
delta logL = 0.00342038330018

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5752.13988228
delta logL = 0.00448961694474

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .38003       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4154       1.0000          .0000       10.000    
     3 'Normalizat'    1.0333       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0068       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.

 FCN=   5752.140     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      264 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .38069        3.9841        .64312E-01    .51546E-03
   2  Index         2.4122        .36954        .50000        .16866E-06
   3  Normalizat    1.0333        .57744E-02    .41847E-01    .63037E-05
   4  Prefactor     1.0069        .70569E-02    .66093E-01    .10928E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.380688
  Index      = 2.41218
  Normalizat = 1.0333
  Prefactor  = 1.00686
 **********
 **   18 **HESSE 
 **********

 FCN=   5752.140     FROM HESSE     STATUS=OK            35 CALLS      299 TOTAL
                     EDM=   .77E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .38069        27.752        .22280E-02   -1.5585    
   2  Index         2.4122        5.8747        .48262E-02   -.54400    
   3  Normalizat    1.0333        .20694        .23763E-03   -.91923    
   4  Prefactor     1.0069        .25281        .29234E-03   -.92501    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.65326e-11
Minuit parameter uncertainties:
  1  6.50302
  2  6.62069
  3  0.207103
  4  0.253113
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/32919': 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) = 5752.13988196
delta logL = 0.00448993468308

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  3.807e-01  6.503e+00  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  2.412e+00  6.621e+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:  1.007e+00  2.531e-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.033e+00  2.071e-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/32919/cmap_HighResolution_325382401_325641601_4FGL_J1257.2+3646_daily_bin332.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.97e-03', job_status='DONE', photon_flux_upper_limit='6.61e-08', time_completed='2021-09-06 11:44:28.250123', job_id='32919', GAL2='1.01', fit_tolerance='1e-08', EG2='1.03', EG='1.03', time_epoch_completed='1630953868.25', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='4.49e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='332' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:44:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0143>
Subject: Job 32919: <4FGL_J1257.2+3646_daily_bin332> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin332 194.31 36.7706 325382401 325641601 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 :                                   675.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             320.56 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   840 sec.
    Turnaround time :                            843 sec.

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

