/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: Dan/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 168 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 = 17363
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1032.6+3737_weekly_bin703
RA = 158.173, Dec = 37.6234
tmin = 664156801, tmax = 664761601
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='620055', job_status='RUN', time_executed='2022-01-25 04:32:32.515044', time_epoch_executed='1643113952.52' WHERE source_name='4FGL J1032.6+3737' and cadence='weekly' and bin_id='703'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/620055

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/620055/ft1_4FGL_J1032.6+3737_weekly_bin703.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/620055/ft1_4FGL_J1032.6+3737_weekly_bin703.fits outfile=/scratch/kocevski/620055/ft1_filteredMKT_4FGL_J1032.6+3737_weekly_bin703.fits ra=158.173 dec=37.6234 rad=12.0 tmin=664156801.0 tmax=664761601.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 8.17
user 7.76
sys 0.26

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.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/620055/ft1_filteredMKT_4FGL_J1032.6+3737_weekly_bin703.fits evtable="EVENTS" outfile="/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.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.94
user 0.38
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits" evtable="EVENTS" scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits sctable="SC_DATA" outfile=/scratch/kocevski/620055/ltcube_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.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/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits
.....................!
real 26.03
user 25.56
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits sctable="SC_DATA" expcube=/scratch/kocevski/620055/ltcube_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits outfile=/scratch/kocevski/620055/expmap_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.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/620055/ltcube_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits
.....................!
real 190.09
user 185.61
sys 4.03

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

Setting source of interest to:
4FGL J1032.6+3737 @ 158.173 37.6234

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits outfile=/scratch/kocevski/620055/cmap_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.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=158.173 yref=37.6234 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.68
user 0.41
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits outfile=/scratch/kocevski/620055/cmap_HighResolution_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.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=158.173 yref=37.6234 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.57
user 0.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/620055/Model_4FGL_J1032.6+3737_weekly_bin703.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/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits.....................!
real 107.10
user 105.32
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits', '/scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits', expMap='/scratch/kocevski/620055/expmap_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits', expCube='/scratch/kocevski/620055/ltcube_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/620055/Model_4FGL_J1032.6+3737_weekly_bin703.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1032.6+3737'

4FGL J1032.6+3737
   Spectrum: PowerLaw
316    Prefactor:  7.905e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
317        Index:  2.076e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  2.586e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/620055/ft1_filtered_4FGL_J1032.6+3737_weekly_bin703.fits
Spacecraft file(s): /scratch/kocevski/620055/ft2_4FGL_J1032.6+3737_weekly_bin703.fits
Exposure map: /scratch/kocevski/620055/expmap_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits
Exposure cube: /scratch/kocevski/620055/ltcube_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/620055/Model_4FGL_J1032.6+3737_weekly_bin703.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) = 14352.338172

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    7.9930       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.9920       1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.7185       1.0000         .10000E-03   10000.    
     5 'norm      '    9.2304       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.7648       1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.3299       1.0000         .10000E-03   10000.    
     8 'Prefactor '    7.9917       1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.1055       1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.263       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    6.3591       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .17443       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .48731E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    18.384       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    1.6619       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .11532E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .11810E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    11.761       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .78808E-01   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    4.0282       1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.1221       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .89459       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6420E+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=   14352.33     FROM MIGRAD    STATUS=CONVERGED   1240 CALLS     4129 TOTAL
                     EDM=   .71E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.9917        7.1771        .70910E-03   -.78432E-04
   2  Prefactor     .10000E-03    4.9575        .18142E-02** at limit **
   3  Prefactor     2.9980        20.637        .23469E-03    .10657E-05
   4  Prefactor     1.7186        3.8725        .32050E-03   -.79813E-04
   5  norm          9.2325        10.525        .13191E-03   -.25338E-04
   6  Prefactor     2.7647        1.6325        .11344E-03   -.11645E-03
   7  Prefactor     5.3297        3.2218        .14297E-03   -.71408E-03
   8  Prefactor     7.9922        13.646        .70915E-03   -.90513E-04
   9  Prefactor     1.1062        2.8523        .28199E-03    .49121E-03
  10  norm          .10000E-03    4.4172        .18142E-02** at limit **
  11  Prefactor     19.266        38.749        .91257E-04   -.20929E-04
  12  Prefactor     .10000E-03    15.323        .18142E-02** at limit **
  13  Prefactor     6.3584        3.1364        .70426E-03    .44778E-03
  14  Prefactor     .16707        6.8493        .23746E-02    .10951E-02
  15  Prefactor     .10005E-03    106.18        .79459E-02** at limit **
  16  Prefactor     .10000E-03    15.162        .18142E-02** at limit **
  17  Prefactor     18.395        55.356        .93413E-04   -.27262E-04
  18  Prefactor     .10000E-03    2.1620        .17178E-02** at limit **
  19  norm          1.6619        .23904        .21285E-04   -.71532E-02
  20  Prefactor     .10000E-03    2.6586        .22926E-02** at limit **
  21  Prefactor     .10005E-03    26.680        .52697E-02** at limit **
  22  Prefactor     .10000E-03    2.9520        .18142E-02** at limit **
  23  norm          11.759        9.3719        .11681E-03   -.67115E-03
  24  Prefactor     .78430E-01    3.0666        .16577E-02   -.49613E-03
  25  Prefactor     .10000E-03    11.925        .18142E-02** at limit **
  26  norm          4.0282        1.9237        .10918E-03   -.14857E-02
  27  Normalizat    1.1219        .13737        .23084E-03   -.52894E-04
  28  Prefactor     .89482        .15621        .30376E-03   -.22838E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 7.99166
  Prefactor  = 0.0001
  Prefactor  = 2.99805
  Prefactor  = 1.71864
  norm       = 9.23253
  Prefactor  = 2.76474
  Prefactor  = 5.3297
  Prefactor  = 7.99219
  Prefactor  = 1.1062
  norm       = 0.0001
  Prefactor  = 19.2657
  Prefactor  = 0.0001
  Prefactor  = 6.35844
  Prefactor  = 0.167072
  Prefactor  = 0.000100049
  Prefactor  = 0.000100001
  Prefactor  = 18.3955
  Prefactor  = 0.0001
  norm       = 1.66186
  Prefactor  = 0.0001
  Prefactor  = 0.000100055
  Prefactor  = 0.0001
  norm       = 11.7589
  Prefactor  = 0.0784296
  Prefactor  = 0.0001
  norm       = 4.02821
  Normalizat = 1.12193
  Prefactor  = 0.894818
 **********
 **   18 **HESSE 
 **********

 FCN=   14352.33     FROM HESSE     STATUS=OK           497 CALLS     4626 TOTAL
                     EDM=   .65E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.9917        7.1768        .28364E-04   -1.5143    
   2  Prefactor     .10000E-03    4.9577        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.9980        20.627        .93875E-05   -1.5362    
   4  Prefactor     1.7186        3.8720        .12820E-04   -1.5446    
   5  norm          9.2325        10.525        .52766E-05   -1.5100    
   6  Prefactor     2.7647        1.6323        .45377E-05   -1.5375    
   7  Prefactor     5.3297        3.2181        .57187E-05   -1.5246    
   8  Prefactor     7.9922        13.643        .28366E-04   -1.5142    
   9  Prefactor     1.1062        2.8476        .11280E-04   -1.5498    
  10  norm          .10000E-03    4.4207        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     19.266        38.770        .36503E-05   -1.4830    
  12  Prefactor     .10000E-03    15.323        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     6.3584        3.1328        .14085E-03   -1.5204    
  14  Prefactor     .16707        6.8844        .94986E-04   -1.5626    
  15  Prefactor     .10005E-03    110.30        .31784E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    15.172        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     18.395        55.341        .37365E-05   -1.4850    
  18  Prefactor     .10000E-03    2.1623        .34356E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          1.6619        .23890        .42571E-05   -1.5450    
  20  Prefactor     .10000E-03    2.6835        .45852E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10005E-03    27.064        .10539E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    2.9521        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          11.759        9.3607        .46725E-05   -1.5022    
  24  Prefactor     .78430E-01    3.0676        .66307E-04   -1.5652    
  25  Prefactor     .10000E-03    11.925        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          4.0282        1.9169        .43673E-05   -1.5307    
  27  Normalizat    1.1219        .13745        .92335E-05   -.89051    
  28  Prefactor     .89482        .15627        .12150E-04   -.96322    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.51578e-09
Minuit parameter uncertainties:
  1  7.17757
  2  1.85084e-06
  3  15.7351
  4  3.87253
  5  10.5269
  6  1.63237
  7  3.21825
  8  13.6481
  9  2.84798
  10  3.4793e-05
  11  38.821
  12  0.000131909
  13  3.13287
  14  2.14456
  15  0.00465178
  16  0.000245534
  17  55.4957
  18  6.05248e-06
  19  0.238896
  20  4.63217e-06
  21  0.00243735
  22  1.06376e-05
  23  9.36187
  24  0.98043
  25  2.3668e-05
  26  1.91689
  27  0.137496
  28  0.156347
Done.

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

Extracting fit parameters...

4FGL J1032.6+3737
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  1.319e-04  1.000e-04  1.000e+04 ( 1.000e-14)
317        Index:  2.076e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  2.586e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
639    Prefactor:  8.948e-01  1.563e-01  0.000e+00  1.000e+01 ( 1.000e+00)
640        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
641        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
638   Normalization:  1.122e+00  1.375e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 158.173 37.623
Photon Flux Upper Limit: 2.92e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.20e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/620055/likelihoodResults_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.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) = 14352.3345571
delta logL = -0.000311131036142

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 14352.3342511
delta logL = -5.10891186423e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .17786E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0430       1.0000          .0000       10.000    
     3 'Normalizat'    1.1222       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89446       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6420E+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=   14352.33     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      247 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10069E-03    81.487        .18142E-02** at limit **
   2  Index         2.0024        8.7354        .50000        .11414E-04
   3  Normalizat    1.1219        .61755E-02    .23084E-03    .90028E-04
   4  Prefactor     .89482        .73726E-02    .30376E-03    .78820E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00010069
  Index      = 2.00237
  Normalizat = 1.12192
  Prefactor  = 0.89482
 **********
 **   18 **HESSE 
 **********

 FCN=   14352.33     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      276 TOTAL
                     EDM=   .63E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10069E-03    382.55        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0024        8.9914        .50000       -.64291    
   3  Normalizat    1.1219        .13716E-01    .92335E-05   -.89051    
   4  Prefactor     .89482        .16375E-01    .12150E-04   -.96322    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.31646e-09
Minuit parameter uncertainties:
  1  0.0327061
  2  367.992
  3  0.0137165
  4  0.0163746
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/620055': 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) = 14352.3342457
delta logL = 2.28341377806e-07

Extracting fit parameters...

4FGL J1032.6+3737
   Spectrum: PowerLaw
316    Prefactor:  1.007e-04  3.271e-02  1.000e-04  1.000e+04 ( 1.000e-14)
317        Index:  2.002e+00  3.680e+02  0.000e+00  1.000e+01 (-1.000e+00)
318        Scale:  2.586e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
639    Prefactor:  8.948e-01  1.637e-02  0.000e+00  1.000e+01 ( 1.000e+00)
640        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
641        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
638   Normalization:  1.122e+00  1.372e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 158.173 37.623

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/620055/cmap_HighResolution_664156801_664761601_4FGL_J1032.6+3737_weekly_bin703.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.20e-03', job_status='DONE', photon_flux_upper_limit='2.92e-08', time_completed='2022-01-25 05:00:13.189300', job_id='620055', GAL2='0.89', fit_tolerance='1e-08', EG2='1.12', EG='1.12', time_epoch_completed='1643115613.19', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.89', dlogl='2.28e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.08' WHERE bin_id='703' AND source_name='4FGL J1032.6+3737' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 25 05:00:13 PST 2022

 <slac> at Tue Jan 25 00:55:29 2022
Job was executed on host(s) <bullet0279>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:55:30 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:55:30 2022
Terminated at Tue Jan 25 01:25:07 2022
Results reported at Tue Jan 25 01:25:07 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1032.6+3737_weekly_bin703 158.173 37.6234 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1032.6+3737 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1683.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             327.89 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1776 sec.
    Turnaround time :                            1778 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0265>
Subject: Job 620055: <4FGL_J1032.6+3737_weekly_bin703> in cluster <slac> Done

Job <4FGL_J1032.6+3737_weekly_bin703> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Jan 25 00:09:05 2022
Job was executed on host(s) <bullet0265>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:09:21 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:09:21 2022
Terminated at Tue Jan 25 05:00:13 2022
Results reported at Tue Jan 25 05:00:13 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1032.6+3737_weekly_bin703 158.173 37.6234 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1032.6+3737 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1657.00 sec.
    Max Memory :                                 1096 MB
    Average Memory :                             76.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   17452 sec.
    Turnaround time :                            17468 sec.

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

