/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 17 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_J1657.0+6010_monthly_bin118
RA = 254.258, Dec = 60.1676
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='111609', job_status='RUN', time_executed='2021-10-29 18:07:26.385634', time_epoch_executed='1635556046.39' WHERE source_name='4FGL J1657.0+6010' and cadence='monthly' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111609

Creating custom pfile directory:
/scratch/kocevski/111609/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/111609/ft1_4FGL_J1657.0+6010_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/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111609/ft1_4FGL_J1657.0+6010_monthly_bin118.fits outfile=/scratch/kocevski/111609/ft1_filteredMKT_4FGL_J1657.0+6010_monthly_bin118.fits ra=254.258 dec=60.1676 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 19.01
user 18.03
sys 0.60

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_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/111609/ft1_filteredMKT_4FGL_J1657.0+6010_monthly_bin118.fits evtable="EVENTS" outfile="/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_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.61
user 0.44
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/111609/ltcube_542851201_545443201_4FGL_J1657.0+6010_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/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits
.....................!
real 42.49
user 41.98
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/111609/ltcube_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits outfile=/scratch/kocevski/111609/expmap_542851201_545443201_4FGL_J1657.0+6010_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/111609/ltcube_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits
.....................!
real 193.16
user 187.28
sys 5.31

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

Setting source of interest to:
4FGL J1657.0+6010 @ 254.258 60.1676

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits outfile=/scratch/kocevski/111609/cmap_542851201_545443201_4FGL_J1657.0+6010_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=254.258 yref=60.1676 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.62
user 0.47
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits outfile=/scratch/kocevski/111609/cmap_HighResolution_542851201_545443201_4FGL_J1657.0+6010_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=254.258 yref=60.1676 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.62
user 0.47
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/111609/Model_4FGL_J1657.0+6010_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/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits........................!
real 18.99
user 17.75
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits', '/scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits', expMap='/scratch/kocevski/111609/expmap_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits', expCube='/scratch/kocevski/111609/ltcube_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/111609/Model_4FGL_J1657.0+6010_monthly_bin118.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1657.0+6010'

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  3.318e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/111609/ft1_filtered_4FGL_J1657.0+6010_monthly_bin118.fits
Spacecraft file(s): /scratch/kocevski/111609/ft2_4FGL_J1657.0+6010_monthly_bin118.fits
Exposure map: /scratch/kocevski/111609/expmap_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits
Exposure cube: /scratch/kocevski/111609/ltcube_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/111609/Model_4FGL_J1657.0+6010_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) = 776.345637336

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    18.410       1.0000         .10000E-03   10000.    
     2 'Prefactor '    65.329       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10626E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    70.785       1.0000         .10000E-03   10000.    
     6 'Prefactor '    38.411       1.0000         .10000E-03   10000.    
     7 'norm      '    .46121E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10039E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .47025E-02   1.0000         .10000E-03   10000.    
    10 'norm      '    12.908       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .18178E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    58.131       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .18479E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .79558E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .46063E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .16335E-01   1.0000         .10000E-03   10000.    
    20 'Prefactor '    500.57       1.0000         .10000E-03   10000.    
    21 'norm      '    .70932E-02   1.0000         .10000E-03   10000.    
    22 'Prefactor '    39.754       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .12217E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    537.12       1.0000         .10000E-03   10000.    
    25 'norm      '    .43532E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    71.263       1.0000         .10000E-03   10000.    
    27 'Prefactor '    39.908       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .15474E-02   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .77124E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    .57446       1.0000         .10000E-03   10000.    
    31 'norm      '    31.232       1.0000         .10000E-03   10000.    
    32 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.1772       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7220E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   776.1054     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     3493 TOTAL
                     EDM=   .10E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          17.167        16.048       -.11066E-05   -.17873E-04
   2  Prefactor     126.80        358.41        .16568E-04   -.57276E-05
   3  Prefactor     .10000E-03    19.732        .82666E-06** at limit **
   4  norm          .10000E-03    20.440        .25817E-05** at limit **
   5  Prefactor     80.351        120.54       -.18845E-05   -.73726E-05
   6  Prefactor     38.055        28.398        .51700E-06   -.14648E-05
   7  norm          .10000E-03    31.516        .48137E-07** at limit **
   8  Prefactor     .10000E-03    12.633        .48397E-06** at limit **
   9  Prefactor     .10000E-03    65.928        .18237E-05** at limit **
  10  norm          12.888        23.880        .36076E-05    .36235E-04
  11  Prefactor     .10000E-03    6.2929       -.55015E-06** at limit **
  12  Prefactor     .10000E-03    21.047       -.24069E-06** at limit **
  13  Prefactor     54.045        83.517        .10624E-04    .18556E-04
  14  norm          .10000E-03    1.1735        .42098E-08** at limit **
  15  Prefactor     .10000E-03    10.678       -.10553E-06** at limit **
  16  Prefactor     .10000E-03    51.292       -.13616E-05** at limit **
  17  Prefactor     .10000E-03    30.269       -.40341E-05** at limit **
  18  Prefactor     .10000E-03    46.791        .34769E-05** at limit **
  19  Prefactor     .10000E-03    37.673       -.62982E-06** at limit **
  20  Prefactor     612.24        433.12       -.18590E-05    .53226E-05
  21  norm          .10000E-03    126.74        .62709E-05** at limit **
  22  Prefactor     40.210        24.854       -.33329E-06   -.44116E-04
  23  Prefactor     .10000E-03    104.30       -.35351E-05** at limit **
  24  Prefactor     481.40        476.18        .70416E-05   -.22134E-05
  25  norm          .10003E-03    730.98       -.76078E-04** at limit **
  26  Prefactor     75.678        102.48        .70661E-05    .18211E-04
  27  Prefactor     40.589        40.691       -.13141E-05   -.35583E-04
  28  Prefactor     .10000E-03    27.452        .26641E-06** at limit **
  29  Prefactor     .10000E-03    52.004       -.13152E-05** at limit **
  30  Prefactor     .10000E-03    351.66       -.73706E-06** at limit **
  31  norm          32.408        43.443       -.17772E-05   -.20504E-05
  32  Normalizat    .10000E-01    .37507       -.53901E-06** at limit **
  33  Prefactor     1.1595        .27733       -.47381E-05   -.11686E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 17.1673
  Prefactor  = 126.797
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 80.3507
  Prefactor  = 38.0548
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 12.8883
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 54.0449
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 612.236
  norm       = 0.0001
  Prefactor  = 40.2101
  Prefactor  = 0.0001
  Prefactor  = 481.396
  norm       = 0.000100028
  Prefactor  = 75.678
  Prefactor  = 40.5886
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 32.4083
  Normalizat = 0.01
  Prefactor  = 1.15947
 **********
 **   18 **HESSE 
 **********

 FCN=   776.1054     FROM HESSE     STATUS=OK           763 CALLS     4256 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          17.167        16.028        .23336E-02   -1.4879    
   2  Prefactor     126.80        357.80        .12413E-02   -1.3451    
   3  Prefactor     .10000E-03    19.818        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    20.726        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     80.351        120.74        .11928E-02   -1.3913    
   6  Prefactor     38.055        28.517        .16168E-02   -1.4473    
   7  norm          .10000E-03    31.490        .10598E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    12.622        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    65.838        .96429E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          12.888        23.944        .27873E-02   -1.4990    
  11  Prefactor     .10000E-03    6.2922        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    21.135        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     54.045        83.879        .13155E-02   -1.4236    
  14  norm          .10000E-03    1.1722        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    10.583        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    50.942        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    30.939        .10453E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    48.172        .96567E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    36.949        .91045E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     612.24        438.29        .45858E-03   -1.0707    
  21  norm          .10000E-03    121.09        .93391E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     40.210        24.893        .15893E-02   -1.4439    
  23  Prefactor     .10000E-03    104.63        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     481.40        478.55        .44356E-03   -1.1284    
  25  norm          .10003E-03    17.531        .79628E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     75.678        102.77        .11889E-02   -1.3966    
  27  Prefactor     40.589        40.690        .15862E-02   -1.4433    
  28  Prefactor     .10000E-03    27.257        .10223E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    51.711        .10462E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .10000E-03    350.92        .11571E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          32.408        43.486        .17924E-02   -1.4569    
  32  Normalizat    .10000E-01    .32300        .24069       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Prefactor     1.1595        .30373        .35193E-01   -.87588    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.71314e-10
Minuit parameter uncertainties:
  1  16.0321
  2  364.195
  3  3.69904e-06
  4  2.61271e-05
  5  121.11
  6  28.5272
  7  1.11677e-06
  8  2.6185e-06
  9  2.93642e-05
  10  23.9615
  11  2.89544e-07
  12  5.51149e-06
  13  84.0634
  14  3.28884e-09
  15  8.43883e-07
  16  1.78479e-05
  17  1.61071e-05
  18  3.99112e-06
  19  8.08657e-05
  20  440.766
  21  5.85087e-05
  22  24.899
  23  9.54692e-05
  24  482.628
  25  0.00140725
  26  103.012
  27  40.7179
  28  1.07873e-05
  29  1.73351e-05
  30  0.000152957
  31  43.5282
  32  1.69057e-07
  33  0.304185
Done.

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

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  5.404e+01  8.406e+01  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  1.159e+00  3.042e-01  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  1.000e-02  1.691e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.61
Ra Dec: 254.258 60.168
Photon Flux Upper Limit: 5.29e-07 ph cm-2 s-1
Energy Flux Upper Limit: 4.10e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/111609/likelihoodResults_542851201_545443201_4FGL_J1657.0+6010_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): 0
logL (Free Index) = 776.10457471
delta logL = 0.000863189551069

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 776.103671935
delta logL = 0.00176596501296

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    58.897       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3663       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1606       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7220E+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=   776.1037     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      249 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     58.921        123.96        .52277E-04   -.31055E-03
   2  Index         2.3663        1.3812        .53026E-02   -.18693E-03
   3  Normalizat    .10000E-01    .38704        .84049E-02** at limit **
   4  Prefactor     1.1602        .24833        .20587E-03    .21631E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 58.9212
  Index      = 2.36634
  Normalizat = 0.01
  Prefactor  = 1.1602
 **********
 **   18 **HESSE 
 **********

 FCN=   776.1037     FROM HESSE     STATUS=OK            23 CALLS      272 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     58.921        118.81        .10455E-04   -1.4171    
   2  Index         2.3663        1.3251        .21210E-03   -.55475    
   3  Normalizat    .10000E-01    .38710        .16810E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.1602        .24833        .41175E-04   -.87565    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.76342e-09
Minuit parameter uncertainties:
  1  119.294
  2  1.34753
  3  4.55699e-06
  4  0.248577
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111609': 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) = 776.103670493
delta logL = 0.00176740664176

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  5.892e+01  1.193e+02  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.366e+00  1.348e+00  0.000e+00  1.000e+01 (-1.000e+00)
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  1.160e+00  2.486e-01  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  1.000e-02  4.557e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.61
Ra Dec: 254.258 60.168

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/111609/cmap_HighResolution_542851201_545443201_4FGL_J1657.0+6010_monthly_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.10e-02', job_status='DONE', photon_flux_upper_limit='5.29e-07', time_completed='2021-10-29 18:17:15.928477', job_id='111609', GAL2='1.16', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1635556635.93', return_code2='0', ts='0.61', comment='SUCCESS', return_code='0', GAL='1.16', dlogl='1.77e-03', ts2='0.61', photon_index_error='0.00', photon_index='2.45' WHERE bin_id='118' AND source_name='4FGL J1657.0+6010' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Fri Oct 29 18:17:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0186>
Subject: Job 111609: <4FGL_J1657.0+6010_monthly_bin118> in cluster <slac> Done

Job <4FGL_J1657.0+6010_monthly_bin118> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri Oct 29 18:05:20 2021
Job was executed on host(s) <bullet0186>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Oct 29 18:07:01 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Oct 29 18:07:01 2021
Terminated at Fri Oct 29 18:17:16 2021
Results reported at Fri Oct 29 18:17:16 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1657.0+6010_monthly_bin118 254.258 60.1676 542851201 545443201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1657.0+6010 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   557.00 sec.
    Max Memory :                                 1259 MB
    Average Memory :                             269.78 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   615 sec.
    Turnaround time :                            716 sec.

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

