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


Performing analysis on: 4FGL_J1638.1+5721_monthly_bin118
RA = 249.525, Dec = 57.3577
tmin = 542851201, tmax = 545443201
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='953613', job_status='RUN', time_executed='2021-10-29 08:06:57.179697', time_epoch_executed='1635520017.18' WHERE source_name='4FGL J1638.1+5721' and cadence='monthly' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/953613

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

Retrieving the FT1 file...

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

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

Retrieving 176 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/953613/ft1_4FGL_J1638.1+5721_monthly_bin118.fits


Retrieving the FT1 file...

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

Retrieving 178 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/953613/ft1_4FGL_J1638.1+5721_monthly_bin118.fits outfile=/scratch/kocevski/953613/ft1_filteredMKT_4FGL_J1638.1+5721_monthly_bin118.fits ra=249.525 dec=57.3577 rad=12.0 tmin=542851201.0 tmax=545443201.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 21.44
user 18.08
sys 0.49

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.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/953613/ft1_filteredMKT_4FGL_J1638.1+5721_monthly_bin118.fits evtable="EVENTS" outfile="/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.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.59
user 0.42
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/953613/ltcube_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.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/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits
.....................!
real 44.26
user 38.96
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/953613/ltcube_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits outfile=/scratch/kocevski/953613/expmap_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.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/953613/ltcube_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits
.....................!
real 192.35
user 186.39
sys 5.32

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

Setting source of interest to:
4FGL J1638.1+5721 @ 249.525 57.3577

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits outfile=/scratch/kocevski/953613/cmap_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.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=249.525 yref=57.3577 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.44
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits outfile=/scratch/kocevski/953613/cmap_HighResolution_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.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=249.525 yref=57.3577 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.43
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/953613/Model_4FGL_J1638.1+5721_monthly_bin118.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/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits..........................!
real 19.69
user 18.43
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits', '/scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits', expMap='/scratch/kocevski/953613/expmap_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits', expCube='/scratch/kocevski/953613/ltcube_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/953613/Model_4FGL_J1638.1+5721_monthly_bin118.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1638.1+5721'

4FGL J1638.1+5721
   Spectrum: PowerLaw
349    Prefactor:  2.779e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
350        Index:  2.681e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  5.489e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/953613/ft1_filtered_4FGL_J1638.1+5721_monthly_bin118.fits
Spacecraft file(s): /scratch/kocevski/953613/ft2_4FGL_J1638.1+5721_monthly_bin118.fits
Exposure map: /scratch/kocevski/953613/expmap_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits
Exposure cube: /scratch/kocevski/953613/ltcube_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/953613/Model_4FGL_J1638.1+5721_monthly_bin118.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) = 903.221118336

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.2635       1.0000         .10000E-03   10000.    
     2 'norm      '    17.739       1.0000         .10000E-03   10000.    
     3 'Prefactor '    140.06       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    86.233       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .19026E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    16.349       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    39.211       1.0000         .10000E-03   10000.    
    11 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.6654       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    13.508       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    58.820       1.0000         .10000E-03   10000.    
    19 'norm      '    2.0090       1.0000         .10000E-03   10000.    
    20 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .13107E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10134E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .13155E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    634.93       1.0000         .10000E-03   10000.    
    26 'norm      '    .11165E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    37.596       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    498.31       1.0000         .10000E-03   10000.    
    30 'Prefactor '    91.159       1.0000         .10000E-03   10000.    
    31 'Prefactor '    45.239       1.0000         .10000E-03   10000.    
    32 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.0817       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   902.9887     FROM MIGRAD    STATUS=CONVERGED    867 CALLS     4698 TOTAL
                     EDM=   .89E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.2809        64.922       -.94886E-06    .15398E-04
   2  norm          17.735        16.509       -.86325E-05    .90597E-04
   3  Prefactor     140.29        365.15        .18441E-03    .10520E-04
   4  Prefactor     .10000E-03    21.361        .23749E-05** at limit **
   5  norm          .10000E-03    22.541        .11916E-05** at limit **
   6  Prefactor     86.210        124.16       -.20448E-04    .65092E-05
   7  Prefactor     .10000E-03    494.85       -.39134E-04** at limit **
   8  Prefactor     16.350        17.127        .84757E-06    .89077E-04
   9  Prefactor     .10000E-03    45.458        .27277E-05** at limit **
  10  Prefactor     39.209        28.772        .15230E-05    .11236E-03
  11  norm          .10000E-03    32.011        .57524E-05** at limit **
  12  Prefactor     5.6657        6.8133        .53520E-06    .59943E-04
  13  Prefactor     .10000E-03    12.942        .57756E-07** at limit **
  14  Prefactor     .10000E-03    76.994       -.47504E-04** at limit **
  15  norm          13.509        24.167       -.13771E-06    .11074E-04
  16  Prefactor     .10000E-03    5.9195       -.16606E-06** at limit **
  17  Prefactor     .10000E-03    22.107       -.45045E-05** at limit **
  18  Prefactor     58.816        84.929       -.32501E-05    .10949E-04
  19  norm          2.0090        2.2027        .13247E-07    .73604E-04
  20  norm          .10000E-03    1.2939       -.68696E-06** at limit **
  21  Prefactor     .10000E-03    10.874        .11897E-06** at limit **
  22  Prefactor     .10000E-03    32.039        .49571E-05** at limit **
  23  Prefactor     .10000E-03    49.248        .12907E-04** at limit **
  24  Prefactor     .10000E-03    50.053        .15863E-04** at limit **
  25  Prefactor     634.92        444.00       -.57984E-05   -.81866E-05
  26  norm          .10000E-03    37.564       -.26399E-04** at limit **
  27  Prefactor     37.591        24.469        .60577E-06    .19700E-04
  28  Prefactor     .10000E-03    108.27        .37227E-04** at limit **
  29  Prefactor     498.41        484.59        .48112E-04   -.34957E-05
  30  Prefactor     91.159        114.95       -.76739E-06    .91646E-05
  31  Prefactor     45.239        61.029       -.10948E-05    .56414E-05
  32  Normalizat    .10000E-01    .21899       -.75624E-05** at limit **
  33  Prefactor     1.0817        .28837       -.50324E-05    .16768E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.28086
  norm       = 17.7352
  Prefactor  = 140.287
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 86.2104
  Prefactor  = 0.0001
  Prefactor  = 16.3496
  Prefactor  = 0.0001
  Prefactor  = 39.2089
  norm       = 0.0001
  Prefactor  = 5.6657
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 13.5087
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 58.8158
  norm       = 2.00902
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 634.918
  norm       = 0.0001
  Prefactor  = 37.591
  Prefactor  = 0.0001
  Prefactor  = 498.412
  Prefactor  = 91.1589
  Prefactor  = 45.2395
  Normalizat = 0.01
  Prefactor  = 1.08167
 **********
 **   18 **HESSE 
 **********

 FCN=   902.9887     FROM HESSE     STATUS=OK           677 CALLS     5375 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.2809        64.549        .13168E-03   -1.5099    
   2  norm          17.735        16.500        .95094E-04   -1.4865    
   3  Prefactor     140.29        365.25        .17019E-03   -1.3334    
   4  Prefactor     .10000E-03    21.379        .13570E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    22.581        .13938E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     86.210        124.14        .21631E-03   -1.3848    
   7  Prefactor     .10000E-03    495.28        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     16.350        17.195        .99053E-04   -1.4899    
   9  Prefactor     .10000E-03    45.480        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     39.209        28.756        .64009E-04   -1.4455    
  11  norm          .10000E-03    32.012        .16616E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.6657        6.8091        .81824E-04   -1.5232    
  13  Prefactor     .10000E-03    12.954        .10561E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    76.964        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          13.509        24.163        .10898E-03   -1.4973    
  16  Prefactor     .10000E-03    5.9573        .71344E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    22.119        .13806E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     58.816        84.945        .52311E-04   -1.4173    
  19  norm          2.0090        2.1942        .43538E-04   -1.5424    
  20  norm          .10000E-03    1.2941        .33391E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    10.875        .96810E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    32.061        .16605E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    49.233        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    51.625        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     634.92        443.91        .82018E-04   -1.0614    
  26  norm          .10000E-03    37.856        .17970E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     37.591        24.509        .65365E-04   -1.4481    
  28  Prefactor     .10000E-03    108.24        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     498.41        484.30        .91914E-04   -1.1205    
  30  Prefactor     91.159        114.98        .42088E-04   -1.3796    
  31  Prefactor     45.239        61.013        .59609E-04   -1.4362    
  32  Normalizat    .10000E-01    .24256        .77902E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Prefactor     1.0817        .27960        .20936E-03   -.90054    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.49763e-09
Minuit parameter uncertainties:
  1  49.0271
  2  16.5046
  3  371.394
  4  2.29276e-05
  5  9.48594e-05
  6  124.513
  7  0.000510969
  8  17.1999
  9  1.86077e-05
  10  28.7661
  11  1.60877e-06
  12  6.81001
  13  8.76707e-06
  14  1.54703e-05
  15  24.1805
  16  3.96698e-06
  17  1.67685e-05
  18  85.121
  19  2.19427
  20  1.20304e-06
  21  7.5307e-06
  22  9.33173e-05
  23  0.000384481
  24  0.000291665
  25  446.396
  26  0.000189151
  27  24.5153
  28  3.52087e-05
  29  488.393
  30  115.259
  31  61.0974
  32  1.73932e-05
  33  0.279975
Done.

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

Extracting fit parameters...

4FGL J1638.1+5721
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  8.767e-06  1.000e-04  1.000e+04 ( 1.000e-12)
350        Index:  2.681e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  5.489e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
711    Prefactor:  1.082e+00  2.800e-01  0.000e+00  1.000e+01 ( 1.000e+00)
712        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
713        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
710   Normalization:  1.000e-02  1.739e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 249.525 57.358
Photon Flux Upper Limit: 3.39e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.66e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/953613/likelihoodResults_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.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) = 902.989037309
delta logL = -0.000359841376053

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 902.988687116
delta logL = -9.64765513345e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10823E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6701       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0807       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7140E+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=   902.9887     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      245 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10254E-03    76.100        .10613E-01** at limit **
   2  Index         2.5151        5.1932        .50000        .57625E-05
   3  Normalizat    .10000E-01    .27162E-02    .77900E-02** at limit **
   4  Prefactor     1.0817        .23348E-01    .20936E-03   -.44501E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102544
  Index      = 2.51508
  Normalizat = 0.01
  Prefactor  = 1.08167
 **********
 **   18 **HESSE 
 **********

 FCN=   902.9887     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      274 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10254E-03    686.44        .10929E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5151        6.6837        .50000       -.52012    
   3  Normalizat    .10000E-01    .27488E-01    .15580E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.0817        .74278E-01    .41871E-04   -.90055    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.15847e-08
Minuit parameter uncertainties:
  1  0.0845685
  2  2314.2
  3  3.63781e-06
  4  0.0742852
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/953613': 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) = 902.988677304
delta logL = 1.6411706838e-07

Extracting fit parameters...

4FGL J1638.1+5721
   Spectrum: PowerLaw
349    Prefactor:  1.025e-04  8.457e-02  1.000e-04  1.000e+04 ( 1.000e-12)
350        Index:  2.515e+00  2.314e+03  0.000e+00  1.000e+01 (-1.000e+00)
351        Scale:  5.489e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
711    Prefactor:  1.082e+00  7.429e-02  0.000e+00  1.000e+01 ( 1.000e+00)
712        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
713        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
710   Normalization:  1.000e-02  3.638e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 249.525 57.358

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/953613/cmap_HighResolution_542851201_545443201_4FGL_J1638.1+5721_monthly_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.66e-02', job_status='DONE', photon_flux_upper_limit='3.39e-07', time_completed='2021-10-29 08:17:24.861394', job_id='953613', GAL2='1.08', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1635520644.86', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.08', dlogl='1.64e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='118' AND source_name='4FGL J1638.1+5721' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Fri Oct 29 08:17:24 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0238>
Subject: Job 953613: <4FGL_J1638.1+5721_monthly_bin118> in cluster <slac> Done

Job <4FGL_J1638.1+5721_monthly_bin118> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Fri Oct 29 08:05:18 2021
Job was executed on host(s) <bullet0238>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Oct 29 08:05:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Oct 29 08:05:20 2021
Terminated at Fri Oct 29 08:17:25 2021
Results reported at Fri Oct 29 08:17:25 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1638.1+5721_monthly_bin118 249.525 57.3577 542851201 545443201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1638.1+5721 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   566.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             203.08 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   725 sec.
    Turnaround time :                            727 sec.

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

