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


Performing analysis on: 4FGL_J1707.9+0016_weekly_bin709
RA = 256.989, Dec = 0.2731
tmin = 667785601, tmax = 668390401
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='492422', job_status='RUN', time_executed='2022-03-08 07:25:26.799754', time_epoch_executed='1646753126.8' WHERE source_name='4FGL J1707.9+0016' and cadence='weekly' and bin_id='709'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/492422

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/492422/ft1_4FGL_J1707.9+0016_weekly_bin709.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/492422/ft1_4FGL_J1707.9+0016_weekly_bin709.fits outfile=/scratch/kocevski/492422/ft1_filteredMKT_4FGL_J1707.9+0016_weekly_bin709.fits ra=256.989 dec=0.2731 rad=12.0 tmin=667785601.0 tmax=668390401.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.66
user 8.19
sys 0.30

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.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/492422/ft1_filteredMKT_4FGL_J1707.9+0016_weekly_bin709.fits evtable="EVENTS" outfile="/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.57
user 0.38
sys 0.16
Number of photons that survived the gtmktime cut: 5245

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits" evtable="EVENTS" scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits sctable="SC_DATA" outfile=/scratch/kocevski/492422/ltcube_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.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/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits
.....................!
real 33.13
user 32.62
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits evtable="EVENTS" scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits sctable="SC_DATA" expcube=/scratch/kocevski/492422/ltcube_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits outfile=/scratch/kocevski/492422/expmap_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.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/492422/ltcube_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits
.....................!
real 192.53
user 187.88
sys 4.17

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
Extended source FHES J1723.5-0501 in ROI with RadialGaussian spatial model.
Added 202 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1707.9+0016 @ 256.989 0.2731

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits outfile=/scratch/kocevski/492422/cmap_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.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=256.989 yref=0.2731 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.69
user 0.44
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits outfile=/scratch/kocevski/492422/cmap_HighResolution_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.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=256.989 yref=0.2731 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.59
user 0.43
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits evtable="EVENTS" scfile=/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/492422/Model_4FGL_J1707.9+0016_weekly_bin709.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 FHES J1723.5-0501
adding source GAL_V02
Working on...
/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits.....................!
real 444.06
user 441.76
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits', '/scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits', expMap='/scratch/kocevski/492422/expmap_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits', expCube='/scratch/kocevski/492422/ltcube_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/492422/Model_4FGL_J1707.9+0016_weekly_bin709.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1707.9+0016'

4FGL J1707.9+0016
   Spectrum: PowerLaw
248    Prefactor:  8.322e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-15)
249        Index:  2.077e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
250        Scale:  4.388e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/492422/ft1_filtered_4FGL_J1707.9+0016_weekly_bin709.fits
Spacecraft file(s): /scratch/kocevski/492422/ft2_4FGL_J1707.9+0016_weekly_bin709.fits
Exposure map: /scratch/kocevski/492422/expmap_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits
Exposure cube: /scratch/kocevski/492422/ltcube_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/492422/Model_4FGL_J1707.9+0016_weekly_bin709.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) = 52241.6650304

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    21.760       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .40231E-01   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.0058       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10293E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.6995       1.0000         .10000E-03   10000.    
    11 'Prefactor '    16.958       1.0000         .10000E-03   10000.    
    12 'norm      '    .47289       1.0000         .10000E-03   10000.    
    13 'norm      '    2.9100       1.0000         .10000E-03   10000.    
    14 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .38428       1.0000         .10000E-03   10000.    
    16 'Normalizat'    1.3250       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0333       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   52241.56     FROM MIGRAD    STATUS=CONVERGED    370 CALLS     1509 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.2290       -.98496E-08** at limit **
   2  Prefactor     .10000E-03    2.9632        .84653E-07** at limit **
   3  Prefactor     21.759        8.4541       -.59921E-07   -.13654E-03
   4  Prefactor     .10000E-03    5.7597       -.34423E-07** at limit **
   5  Prefactor     .10000E-03    1.1569        .53201E-07** at limit **
   6  Prefactor     .12009E-01    .83298        .16127E-08   -.52744E-04
   7  Prefactor     7.0060        13.615        .36049E-05   -.51794E-04
   8  Prefactor     .10000E-03    .96630        .10324E-07** at limit **
   9  Prefactor     .10000E-03    31.404       -.11868E-06** at limit **
  10  Prefactor     3.6992        5.7320        .41644E-06   -.33902E-04
  11  Prefactor     16.935        36.744       -.42701E-05   -.28487E-03
  12  norm          .48554        1.7113        .67565E-06   -.81271E-03
  13  norm          2.9098        1.5873        .19458E-06   -.23850E-03
  14  norm          .10000E-03    2.0823       -.28408E-06** at limit **
  15  norm          .38407        1.0397        .37391E-06   -.11161E-02
  16  Normalizat    1.3252        .16449        .64696E-06   -.29120E-03
  17  Prefactor     1.0332        .29795E-01   -.22897E-06   -.79374E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.7588
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0120086
  Prefactor  = 7.00605
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.69916
  Prefactor  = 16.9352
  norm       = 0.485536
  norm       = 2.90978
  norm       = 0.0001
  norm       = 0.384068
  Normalizat = 1.32521
  Prefactor  = 1.03322
 **********
 **   18 **HESSE 
 **********

 FCN=   52241.56     FROM HESSE     STATUS=OK           245 CALLS     1754 TOTAL
                     EDM=   .36E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.2344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    3.0714        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     21.759        8.4569        .85866E-04   -1.4775    
   4  Prefactor     .10000E-03    5.7688        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    1.1872        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .12009E-01    1.2955        .66272E-01   -1.5686    
   7  Prefactor     7.0060        13.839        .75783E-03   -1.5179    
   8  Prefactor     .10000E-03    1.2050        .74931E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    31.432        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.6992        5.7282        .20997E-03   -1.5323    
  11  Prefactor     16.935        38.651        .97258E-04   -1.4885    
  12  norm          .48554        8.6823        .49838E-02   -1.5569    
  13  norm          2.9098        1.5858        .20627E-03   -1.5367    
  14  norm          .10000E-03    2.0896        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .38407        2.2951        .36429E-02   -1.5584    
  16  Normalizat    1.3252        .17571        .63445E-03   -.82817    
  17  Prefactor     1.0332        .31998E-01    .13263E-03   -.91630    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.61115e-07
Minuit parameter uncertainties:
  1  4.00856e-06
  2  1.98179e-07
  3  8.45736
  4  4.12221e-06
  5  5.83008e-07
  6  0.248417
  7  13.8454
  8  1.97679e-06
  9  3.33879e-05
  10  5.72908
  11  38.7078
  12  4.10665
  13  1.5858
  14  4.47513e-06
  15  1.8776
  16  0.175792
  17  0.031999
Done.

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

Extracting fit parameters...

4FGL J1707.9+0016
   Spectrum: PowerLaw
248    Prefactor:  1.000e-04  3.339e-05  1.000e-04  1.000e+04 ( 1.000e-15)
249        Index:  2.077e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
250        Scale:  4.388e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
702    Prefactor:  1.033e+00  3.200e-02  0.000e+00  1.000e+01 ( 1.000e+00)
703        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
704        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
698   Normalization:  1.325e+00  1.758e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 256.989 0.273
Photon Flux Upper Limit: 2.94e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.22e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/492422/likelihoodResults_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.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) = 52241.5564666
delta logL = -0.000151546584675

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 52241.5563153
delta logL = -2.45476257987e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10135E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2251       1.0000          .0000       10.000    
     3 'Normalizat'    1.3252       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0332       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   52241.56     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      248 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.9249        .90712E-02** at limit **
   2  Index         2.2011        5.8915        .50000        .69671E-05
   3  Normalizat    1.3252        .17924E-02    .14285        .16742E-03
   4  Prefactor     1.0332        .33767E-03    .30013E-01   -.79488E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.20109
  Normalizat = 1.32522
  Prefactor  = 1.03322
 **********
 **   18 **HESSE 
 **********

 FCN=   52241.56     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      281 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    82.312        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2011        7.2215        .50000       -.59412    
   3  Normalizat    1.3252        .73148E-02    .63444E-03   -.82817    
   4  Prefactor     1.0332        .13851E-02    .13263E-03   -.91630    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.98635e-08
Minuit parameter uncertainties:
  1  0.00025316
  2  116.073
  3  0.00731483
  4  0.00138514
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/492422': 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) = 52241.5563153
delta logL = -1.7971615307e-07

Extracting fit parameters...

4FGL J1707.9+0016
   Spectrum: PowerLaw
248    Prefactor:  1.000e-04  2.532e-04  1.000e-04  1.000e+04 ( 1.000e-15)
249        Index:  2.201e+00  1.161e+02  0.000e+00  1.000e+01 (-1.000e+00)
250        Scale:  4.388e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
702    Prefactor:  1.033e+00  1.385e-03  0.000e+00  1.000e+01 ( 1.000e+00)
703        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
704        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
698   Normalization:  1.325e+00  7.315e-03  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 256.989 0.273

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/492422/cmap_HighResolution_667785601_668390401_4FGL_J1707.9+0016_weekly_bin709.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.22e-03', job_status='DONE', photon_flux_upper_limit='2.94e-08', time_completed='2022-03-08 08:13:36.970680', job_id='492422', GAL2='1.03', fit_tolerance='1e-08', EG2='1.33', EG='1.33', time_epoch_completed='1646756016.97', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='-1.80e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.08' WHERE bin_id='709' AND source_name='4FGL J1707.9+0016' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Mar  8 08:13:37 PST 2022

er <slac> at Tue Mar  8 00:08:39 2022
Job was executed on host(s) <bullet0066>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Mar  8 01:04:07 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Mar  8 01:04:07 2022
Terminated at Tue Mar  8 01:53:33 2022
Results reported at Tue Mar  8 01:53:33 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1707.9+0016_weekly_bin709 256.989 0.2731 667785601 668390401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1707.9+0016 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   2827.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             401.51 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   2965 sec.
    Turnaround time :                            6294 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0197>
Subject: Job 492422: <4FGL_J1707.9+0016_weekly_bin709> in cluster <slac> Done

Job <4FGL_J1707.9+0016_weekly_bin709> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Tue Mar  8 00:08:06 2022
Job was executed on host(s) <bullet0197>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Mar  8 01:00:52 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Mar  8 01:00:52 2022
Terminated at Tue Mar  8 08:13:37 2022
Results reported at Tue Mar  8 08:13:37 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1707.9+0016_weekly_bin709 256.989 0.2731 667785601 668390401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1707.9+0016 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   2886.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             89.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   25965 sec.
    Turnaround time :                            29131 sec.

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

