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


Performing analysis on: 4FGL_J1257.2+3646_daily_bin959
RA = 194.31, Dec = 36.7706
tmin = 487900801, tmax = 488160001
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='36626', job_status='RUN', time_executed='2021-09-06 11:43:38.797019', time_epoch_executed='1630953818.8' WHERE source_name='4FGL J1257.2+3646' and cadence='daily' and bin_id='959'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/36626

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/36626/ft1_4FGL_J1257.2+3646_daily_bin959.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/36626/ft2_4FGL_J1257.2+3646_daily_bin959.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/36626/ft1_4FGL_J1257.2+3646_daily_bin959.fits outfile=/scratch/kocevski/36626/ft1_filteredMKT_4FGL_J1257.2+3646_daily_bin959.fits ra=194.31 dec=36.7706 rad=12.0 tmin=487900801.0 tmax=488160001.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 6.02
user 5.77
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/36626/ft1_filtered_4FGL_J1257.2+3646_daily_bin959.fits evtable="EVENTS" scfile=/scratch/kocevski/36626/ft2_4FGL_J1257.2+3646_daily_bin959.fits sctable="SC_DATA" expcube=/scratch/kocevski/36626/ltcube_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.fits outfile=/scratch/kocevski/36626/expmap_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.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/36626/ltcube_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.fits
.....................!
real 191.49
user 184.94
sys 5.11

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/36626/ft1_filtered_4FGL_J1257.2+3646_daily_bin959.fits scfile=/scratch/kocevski/36626/ft2_4FGL_J1257.2+3646_daily_bin959.fits outfile=/scratch/kocevski/36626/cmap_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.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.91
user 0.36
sys 0.18

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/36626/ft1_filtered_4FGL_J1257.2+3646_daily_bin959.fits scfile=/scratch/kocevski/36626/ft2_4FGL_J1257.2+3646_daily_bin959.fits outfile=/scratch/kocevski/36626/cmap_HighResolution_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.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.61
user 0.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.565       1.0000         .10000E-03   10000.    
     2 'norm      '    7.5526       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.1031       1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.2682       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    25.912       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    11.071       1.0000         .10000E-03   10000.    
    12 'Prefactor '    23.000       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1429       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    4.9539       1.0000         .10000E-03   10000.    
    18 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    5.5311       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    40.976       1.0000         .10000E-03   10000.    
    24 'Normalizat'    .51556       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .99339       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=   3140.597     FROM MIGRAD    STATUS=CONVERGED    567 CALLS     2834 TOTAL
                     EDM=   .29E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.563        29.861        .92212E-07   -.86217E-05
   2  norm          7.5529        4.4334        .27936E-07   -.10763E-04
   3  Prefactor     .10000E-03    3.1479        .67399E-07** at limit **
   4  Prefactor     8.1032        3.9031        .14538E-07   -.39882E-05
   5  Prefactor     5.2681        3.5829        .44243E-07   -.20336E-04
   6  Prefactor     .10000E-03    4.0002        .31512E-07** at limit **
   7  Prefactor     25.910        28.752        .80000E-07   -.84068E-05
   8  Prefactor     .10000E-03    11.976       -.51071E-08** at limit **
   9  Prefactor     .10000E-03    78.017        .35782E-06** at limit **
  10  Prefactor     .10000E-03    2.8644       -.27396E-06** at limit **
  11  norm          11.064        6.4801       -.61607E-07   -.15057E-04
  12  Prefactor     23.001        36.700        .54321E-07    .10910E-05
  13  Prefactor     .10000E-03    20.191        .27471E-07** at limit **
  14  Prefactor     4.1397        15.989        .95154E-05   -.87303E-04
  15  norm          .10000E-03    6.9551       -.92742E-06** at limit **
  16  norm          .10000E-03    5.2984       -.32807E-07** at limit **
  17  norm          4.9540        4.3051       -.55742E-07    .12809E-03
  18  norm          .10000E-03    5.2192        .30170E-06** at limit **
  19  Prefactor     .10000E-03    5.4019       -.39062E-06** at limit **
  20  Prefactor     5.5326        11.962        .34432E-06    .76184E-05
  21  Prefactor     .10000E-03    37.990       -.24559E-06** at limit **
  22  Prefactor     .10000E-03    4.5518        .56881E-07** at limit **
  23  Prefactor     40.901        80.701       -.29594E-05   -.15150E-03
  24  Normalizat    .51580        .19228        .16910E-05   -.64412E-04
  25  Prefactor     .99302        .24171       -.26000E-05    .60821E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.5625
  norm       = 7.55289
  Prefactor  = 0.0001
  Prefactor  = 8.10321
  Prefactor  = 5.26806
  Prefactor  = 0.0001
  Prefactor  = 25.9103
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 11.0641
  Prefactor  = 23.0007
  Prefactor  = 0.0001
  Prefactor  = 4.13973
  norm       = 0.000100001
  norm       = 0.0001
  norm       = 4.95398
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.53263
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 40.9006
  Normalizat = 0.515803
  Prefactor  = 0.993018
 **********
 **   18 **HESSE 
 **********

 FCN=   3140.597     FROM HESSE     STATUS=OK           425 CALLS     3259 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.563        29.895        .12326E-03   -1.5058    
   2  norm          7.5529        4.4419        .82159E-04   -1.5158    
   3  Prefactor     .10000E-03    3.1555        .97094E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.1032        3.9115        .70064E-04   -1.5139    
   5  Prefactor     5.2681        3.5795        .81977E-04   -1.5249    
   6  Prefactor     .10000E-03    4.0033        .10946E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     25.910        28.754        .78697E-04   -1.4689    
   8  Prefactor     .10000E-03    11.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    78.114        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.8852        .92808E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.064        6.4780        .10376E-03   -1.5043    
  12  Prefactor     23.001        36.701        .83522E-04   -1.4748    
  13  Prefactor     .10000E-03    20.287        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.1397        16.211        .99017E-03   -1.5301    
  15  norm          .10000E-03    7.1841        .14562E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.2990        .12599E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          4.9540        4.2871        .10206E-03   -1.5263    
  18  norm          .10000E-03    5.2273        .12476E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.5981        .25318E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     5.5326        11.895        .17083E-03   -1.5237    
  21  Prefactor     .10000E-03    38.013        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.5530        .11678E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     40.901        81.897        .62621E-04   -1.4428    
  24  Normalizat    .51580        .22200        .24348E-03   -1.1169    
  25  Prefactor     .99302        .27796        .23369E-03   -.92963    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.19236e-10
Minuit parameter uncertainties:
  1  29.9377
  2  4.4421
  3  2.90087e-06
  4  3.91166
  5  3.57967
  6  2.45592e-06
  7  28.7698
  8  1.23087e-05
  9  7.89366e-05
  10  2.49419e-05
  11  6.47844
  12  36.7368
  13  7.27732e-05
  14  16.228
  15  0.00013992
  16  9.00138e-06
  17  4.2874
  18  1.47815e-05
  19  4.63036e-05
  20  11.8999
  21  1.4766e-05
  22  7.67676e-06
  23  82.1233
  24  0.222384
  25  0.278357
Done.

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

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.000e-04  2.494e-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:  9.930e-01  2.784e-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:  5.158e-01  2.224e-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: 5.23e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.93e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/36626/likelihoodResults_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.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) = 3140.59841421
delta logL = -0.00162859635111

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3140.59678727
delta logL = -1.65909159477e-06

Fit tolerance = 1e-08

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

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

 FCN=   3140.597     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      229 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10111E-03    36.260        .95420E-03** at limit **
   2  Index         1.9510        8.3650        .50000        .61212E-04
   3  Normalizat    .51581        .15013E-01    .24347E-03   -.10927E-04
   4  Prefactor     .99301        .19681E-01    .23370E-03   -.94132E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101109
  Index      = 1.95097
  Normalizat = 0.515806
  Prefactor  = 0.993015
 **********
 **   18 **HESSE 
 **********

 FCN=   3140.597     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      258 TOTAL
                     EDM=   .72E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10111E-03    144.00        .19084E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9510        5.3921        .50000       -.65581    
   3  Normalizat    .51581        .31217E-01    .97388E-05   -1.1169    
   4  Prefactor     .99301        .40924E-01    .93479E-05   -.92963    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.23977e-08
Minuit parameter uncertainties:
  1  0.0253376
  2  274.749
  3  0.0312185
  4  0.0409248
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/36626': 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) = 3140.59678448
delta logL = 1.13345413411e-06

Extracting fit parameters...

4FGL J1257.2+3646
   Spectrum: PowerLaw
300    Prefactor:  1.011e-04  2.534e-02  1.000e-04  1.000e+04 ( 1.000e-13)
301        Index:  1.951e+00  2.747e+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:  9.930e-01  4.092e-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:  5.158e-01  3.122e-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/36626/cmap_HighResolution_487900801_488160001_4FGL_J1257.2+3646_daily_bin959.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.93e-03', job_status='DONE', photon_flux_upper_limit='5.23e-08', time_completed='2021-09-06 11:52:35.816843', job_id='36626', GAL2='0.99', fit_tolerance='1e-08', EG2='0.52', EG='0.52', time_epoch_completed='1630954355.82', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='1.13e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.03' WHERE bin_id='959' AND source_name='4FGL J1257.2+3646' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 11:52:35 PDT 2021


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

Job <4FGL_J1257.2+3646_daily_bin959> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 11:41:19 2021
Job was executed on host(s) <bullet0143>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 11:41:20 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:41:20 2021
Terminated at Mon Sep  6 11:52:36 2021
Results reported at Mon Sep  6 11:52:36 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1257.2+3646_daily_bin959 194.31 36.7706 487900801 488160001 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 :                                   525.32 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             301.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   676 sec.
    Turnaround time :                            677 sec.

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

