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


Performing analysis on: 4FGL_J1638.1+5721_monthly_bin52
RA = 249.525, Dec = 57.3577
tmin = 371779201, tmax = 374371201
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='952313', job_status='RUN', time_executed='2021-10-29 08:02:49.897557', time_epoch_executed='1635519769.9' WHERE source_name='4FGL J1638.1+5721' and cadence='monthly' and bin_id='52'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/952313

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

Retrieving the FT1 file...

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

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

Retrieving 454 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/952313/ft1_4FGL_J1638.1+5721_monthly_bin52.fits


Retrieving the FT1 file...

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

Retrieving 454 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/952313/ft1_4FGL_J1638.1+5721_monthly_bin52.fits outfile=/scratch/kocevski/952313/ft1_filteredMKT_4FGL_J1638.1+5721_monthly_bin52.fits ra=249.525 dec=57.3577 rad=12.0 tmin=371779201.0 tmax=374371201.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 33.68
user 32.88
sys 0.72

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits" evtable="EVENTS" scfile=/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits sctable="SC_DATA" outfile=/scratch/kocevski/952313/ltcube_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.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/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits
.....................!
real 116.73
user 116.00
sys 0.50

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits evtable="EVENTS" scfile=/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits sctable="SC_DATA" expcube=/scratch/kocevski/952313/ltcube_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits outfile=/scratch/kocevski/952313/expmap_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.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/952313/ltcube_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits
.....................!
real 193.15
user 187.20
sys 5.60

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/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits scfile=/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits outfile=/scratch/kocevski/952313/cmap_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.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.76
user 0.60
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits scfile=/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits outfile=/scratch/kocevski/952313/cmap_HighResolution_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.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.81
user 0.61
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits', '/scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits', expMap='/scratch/kocevski/952313/expmap_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits', expCube='/scratch/kocevski/952313/ltcube_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/952313/Model_4FGL_J1638.1+5721_monthly_bin52.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/952313/ft1_filtered_4FGL_J1638.1+5721_monthly_bin52.fits
Spacecraft file(s): /scratch/kocevski/952313/ft2_4FGL_J1638.1+5721_monthly_bin52.fits
Exposure map: /scratch/kocevski/952313/expmap_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits
Exposure cube: /scratch/kocevski/952313/ltcube_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/952313/Model_4FGL_J1638.1+5721_monthly_bin52.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) = 74773.2104492

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.3173       1.0000         .10000E-03   10000.    
     2 'norm      '    4.7806       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.4404       1.0000         .10000E-03   10000.    
     5 'norm      '    4.2737       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.8584       1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.146       1.0000         .10000E-03   10000.    
     8 'Prefactor '    3.3377       1.0000         .10000E-03   10000.    
     9 'Prefactor '    15.704       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.2152       1.0000         .10000E-03   10000.    
    11 'norm      '    .24602       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.9810       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10194E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.4599       1.0000         .10000E-03   10000.    
    15 'norm      '    4.2190       1.0000         .10000E-03   10000.    
    16 'Prefactor '    2.0179       1.0000         .10000E-03   10000.    
    17 'Prefactor '    11.141       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .41113       1.0000         .10000E-03   10000.    
    20 'norm      '    .50002       1.0000         .10000E-03   10000.    
    21 'Prefactor '    5.3718       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .90125       1.0000         .10000E-03   10000.    
    23 'Prefactor '    3.4081       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.0151       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    3.9711       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.5433       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10434E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    4.9625       1.0000         .10000E-03   10000.    
    31 'Prefactor '    3.3700       1.0000         .10000E-03   10000.    
    32 'Normalizat'    .91382       1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.1413       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   74773.08     FROM MIGRAD    STATUS=CONVERGED    918 CALLS     4072 TOTAL
                     EDM=   .13E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3174        2.4773         .0000        .18025E-02
   2  norm          4.7806        .82747         .0000        .51883E-03
   3  Prefactor     .10000E-03    4.5265         .0000    ** at limit **
   4  Prefactor     1.4404        1.2256         .0000        .55238E-02
   5  norm          4.2737        1.6166         .0000        .17336E-02
   6  Prefactor     5.8584        7.3819         .0000        .49150E-02
   7  Prefactor     11.144        11.625         .0000       -.81229E-03
   8  Prefactor     3.3382        2.0109         .0000        .33050E-02
   9  Prefactor     15.703        8.4745         .0000        .10777E-03
  10  Prefactor     4.2168        1.7579         .0000        .10523    
  11  norm          .21866        1.3416         .0000        .24366E-02
  12  Prefactor     1.9811        1.1589         .0000        .77568E-02
  13  Prefactor     .10000E-03    .36069         .0000    ** at limit **
  14  Prefactor     6.4610        8.7878         .0000        .36333E-02
  15  norm          4.2190        2.1511         .0000        .22501E-02
  16  Prefactor     2.0180        1.0229         .0000        .82239E-02
  17  Prefactor     11.142        3.2365         .0000        .18366E-02
  18  Prefactor     .10000E-03    2.4776         .0000    ** at limit **
  19  norm          .41113        .24272         .0000        .15438E-01
  20  norm          .49988        .23158         .0000        .11751E-01
  21  Prefactor     5.3724        2.2801         .0000        .61856E-01
  22  Prefactor     .90060        1.2881         .0000        .86310E-02
  23  Prefactor     3.4071        2.2891         .0000        .69603E-01
  24  Prefactor     1.0151        .65402         .0000        .38375E-02
  25  Prefactor     .10000E-03    10.319         .0000    ** at limit **
  26  norm          3.9710        1.6964         .0000        .30573E-02
  27  Prefactor     1.5436        1.1524         .0000        .90291E-02
  28  Prefactor     .10000E-03    9.3745         .0000    ** at limit **
  29  Prefactor     .10000E-03    68.730         .0000    ** at limit **
  30  Prefactor     4.9622        3.8793         .0000        .57594E-02
  31  Prefactor     3.3694        3.8207         .0000        .31576E-01
  32  Normalizat    .91380        .57851E-01     .0000        .22107E-03
  33  Prefactor     1.1413        .50252E-01     .0000        .98302E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.31744
  norm       = 4.7806
  Prefactor  = 0.0001
  Prefactor  = 1.44039
  norm       = 4.27366
  Prefactor  = 5.85841
  Prefactor  = 11.1438
  Prefactor  = 3.33817
  Prefactor  = 15.7031
  Prefactor  = 4.21675
  norm       = 0.218657
  Prefactor  = 1.98111
  Prefactor  = 0.0001
  Prefactor  = 6.46098
  norm       = 4.21901
  Prefactor  = 2.01804
  Prefactor  = 11.1422
  Prefactor  = 0.0001
  norm       = 0.411129
  norm       = 0.499876
  Prefactor  = 5.37235
  Prefactor  = 0.900599
  Prefactor  = 3.40712
  Prefactor  = 1.01511
  Prefactor  = 0.0001
  norm       = 3.97101
  Prefactor  = 1.54359
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.96215
  Prefactor  = 3.36943
  Normalizat = 0.9138
  Prefactor  = 1.14127
 **********
 **   18 **HESSE 
 **********

 FCN=   74773.08     FROM HESSE     STATUS=OK           729 CALLS     4801 TOTAL
                     EDM=   .75E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.3174        2.4771        .19388E-03   -1.5292    
   2  norm          4.7806        .82706        .10006E-03   -1.5271    
   3  Prefactor     .10000E-03    4.5326        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.4404        1.2040        .26660E-03   -1.5468    
   5  norm          4.2737        1.6085        .19489E-03   -1.5294    
   6  Prefactor     5.8584        7.3712        .82960E-03   -1.5224    
   7  Prefactor     11.144        11.612        .12000E-03   -1.5040    
   8  Prefactor     3.3382        1.9919        .22154E-03   -1.5343    
   9  Prefactor     15.703        8.4084        .10107E-03   -1.4915    
  10  Prefactor     4.2168        1.7549        .98138E-03   -1.5297    
  11  norm          .21866        1.3671        .10003       -1.5614    
  12  Prefactor     1.9811        1.1426        .21044E-03   -1.5426    
  13  Prefactor     .10000E-03    2.0906        .31400E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     6.4610        8.7017        .78954E-03   -1.5200    
  15  norm          4.2190        2.1454        .19619E-03   -1.5297    
  16  Prefactor     2.0180        .98618        .17454E-03   -1.5424    
  17  Prefactor     11.142        3.2283        .12003E-03   -1.5040    
  18  Prefactor     .10000E-03    2.5256        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .41113        .20870        .93785E-03   -1.5580    
  20  norm          .49988        .20171        .80529E-03   -1.5567    
  21  Prefactor     5.3724        2.2285        .86695E-03   -1.5244    
  22  Prefactor     .90060        1.7282        .32634E-02   -1.5518    
  23  Prefactor     3.4071        2.2494        .10957E-02   -1.5339    
  24  Prefactor     1.0151        .64501        .17114E-03   -1.5506    
  25  Prefactor     .10000E-03    10.348        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          3.9710        1.6848        .20241E-03   -1.5309    
  27  Prefactor     1.5436        1.1389        .23996E-03   -1.5459    
  28  Prefactor     .10000E-03    9.4471        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    70.608        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     4.9622        3.8786        .90267E-03   -1.5262    
  31  Prefactor     3.3694        3.8061        .11022E-02   -1.5341    
  32  Normalizat    .91380        .65441E-01    .26715E-03   -.95977    
  33  Prefactor     1.1413        .58031E-01    .22494E-03   -.88158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.50309e-09
Minuit parameter uncertainties:
  1  2.47717
  2  0.827064
  3  4.46712e-08
  4  1.20398
  5  1.60851
  6  7.37237
  7  11.6145
  8  1.99196
  9  8.40907
  10  1.75488
  11  1.09326
  12  1.1426
  13  3.51998e-07
  14  8.70336
  15  2.14549
  16  0.98619
  17  3.22837
  18  1.11052e-07
  19  0.208698
  20  0.201712
  21  2.22851
  22  1.72834
  23  2.24946
  24  0.645012
  25  1.46819e-05
  26  1.68482
  27  1.13891
  28  7.56632e-06
  29  2.34345e-05
  30  3.87879
  31  3.80636
  32  0.0654465
  33  0.0580341
Done.

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

Extracting fit parameters...

4FGL J1638.1+5721
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  3.520e-07  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.141e+00  5.803e-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:  9.138e-01  6.545e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 249.525 57.358
Photon Flux Upper Limit: 1.57e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.23e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/952313/likelihoodResults_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.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) = 74773.0837912
delta logL = -0.00224308228644

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 74773.0815477
delta logL = 3.79935954697e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10047E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6573       1.0000          .0000       10.000    
     3 'Normalizat'    .91379       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1413       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   74773.08     FROM MIGRAD    STATUS=FAILED        97 CALLS      273 TOTAL
                     EDM=   .39E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10173E-03    31.004        .31657E-02** at limit **
   2  Index         2.5332        7.4437        .50000        .30375E-04
   3  Normalizat    .91380        .47597E-02    .26715E-03   -.22210E-02
   4  Prefactor     1.1413        .44485E-02    .22494E-03   -.15913E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   74773.08     FROM SIMPLEX   STATUS=UNCHANGED    116 CALLS      389 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10173E-03    31.004        .28226E-03** at limit **
   2  Index         2.5332        7.4437        .40930E-03    .30375E-04
   3  Normalizat    .91380        .47597E-02    .11843E-05   -.22210E-02
   4  Prefactor     1.1413        .44485E-02    .85497E-06   -.15913E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   74773.08     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      439 TOTAL
                     EDM=   .88E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    559.96        .12663E-03** at limit **
   2  Index         2.4751        7.5447        .50000       -.55043E-06
   3  Normalizat    .91380        .45014E-01    .10686E-04   -.21107E-03
   4  Prefactor     1.1413        .42039E-01    .44987E-04    .11645E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.47513
  Normalizat = 0.9138
  Prefactor  = 1.14128
 **********
 **   18 **HESSE 
 **********

 FCN=   74773.08     FROM HESSE     STATUS=OK            29 CALLS      468 TOTAL
                     EDM=   .76E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.5251        .25326E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4751        8.4485        .50000       -.52935    
   3  Normalizat    .91380        .60705E-01    .21372E-05   -.95977    
   4  Prefactor     1.1413        .56744E-01    .89974E-05   -.88158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.56972e-11
Minuit parameter uncertainties:
  1  3.64843e-06
  2  42.9826
  3  0.0607098
  4  0.0567474
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/952313': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 74773.0815456
delta logL = 2.447530278e-06

Extracting fit parameters...

4FGL J1638.1+5721
   Spectrum: PowerLaw
349    Prefactor:  1.000e-04  3.648e-06  1.000e-04  1.000e+04 ( 1.000e-12)
350        Index:  2.475e+00  4.298e+01  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.141e+00  5.675e-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:  9.138e-01  6.071e-02  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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/952313/cmap_HighResolution_371779201_374371201_4FGL_J1638.1+5721_monthly_bin52.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.23e-03', job_status='DONE', photon_flux_upper_limit='1.57e-08', time_completed='2021-10-29 10:47:30.749235', job_id='952313', GAL2='1.14', fit_tolerance='1e-08', EG2='0.91', EG='0.91', time_epoch_completed='1635529650.75', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.14', dlogl='2.45e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='52' AND source_name='4FGL J1638.1+5721' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Fri Oct 29 10:47:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0083>
Subject: Job 952313: <4FGL_J1638.1+5721_monthly_bin52> in cluster <slac> Done

Job <4FGL_J1638.1+5721_monthly_bin52> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Fri Oct 29 08:00:18 2021
Job was executed on host(s) <bullet0083>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Oct 29 08:00: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:00:20 2021
Terminated at Fri Oct 29 10:47:31 2021
Results reported at Fri Oct 29 10:47:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1638.1+5721_monthly_bin52 249.525 57.3577 371779201 374371201 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 :                                   9782.00 sec.
    Max Memory :                                 922 MB
    Average Memory :                             418.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   10031 sec.
    Turnaround time :                            10033 sec.

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

