/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 47 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_J1604.6+5714_monthly_bin118
RA = 241.158, Dec = 57.2381
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='452706', job_status='RUN', time_executed='2021-10-27 23:16:19.234090', time_epoch_executed='1635401779.23' WHERE source_name='4FGL J1604.6+5714' and cadence='monthly' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/452706

Creating custom pfile directory:
/scratch/kocevski/452706/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/452706/ft1_4FGL_J1604.6+5714_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/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/452706/ft1_4FGL_J1604.6+5714_monthly_bin118.fits outfile=/scratch/kocevski/452706/ft1_filteredMKT_4FGL_J1604.6+5714_monthly_bin118.fits ra=241.158 dec=57.2381 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 18.52
user 18.05
sys 0.42

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_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/452706/ft1_filteredMKT_4FGL_J1604.6+5714_monthly_bin118.fits evtable="EVENTS" outfile="/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_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.63
user 0.43
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/452706/ltcube_542851201_545443201_4FGL_J1604.6+5714_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/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits
.....................!
real 39.08
user 38.68
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/452706/ltcube_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits outfile=/scratch/kocevski/452706/expmap_542851201_545443201_4FGL_J1604.6+5714_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/452706/ltcube_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits
.....................!
real 190.10
user 185.33
sys 4.46

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 J1604.6+5714 @ 241.158 57.2381

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits outfile=/scratch/kocevski/452706/cmap_542851201_545443201_4FGL_J1604.6+5714_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=241.158 yref=57.2381 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.60
user 0.43
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits outfile=/scratch/kocevski/452706/cmap_HighResolution_542851201_545443201_4FGL_J1604.6+5714_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=241.158 yref=57.2381 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.60
user 0.45
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/452706/Model_4FGL_J1604.6+5714_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/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits..............................!
real 17.90
user 16.69
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits', '/scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits', expMap='/scratch/kocevski/452706/expmap_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits', expCube='/scratch/kocevski/452706/ltcube_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/452706/Model_4FGL_J1604.6+5714_monthly_bin118.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1604.6+5714'

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  8.996e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.348e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/452706/ft1_filtered_4FGL_J1604.6+5714_monthly_bin118.fits
Spacecraft file(s): /scratch/kocevski/452706/ft2_4FGL_J1604.6+5714_monthly_bin118.fits
Exposure map: /scratch/kocevski/452706/expmap_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits
Exposure cube: /scratch/kocevski/452706/ltcube_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/452706/Model_4FGL_J1604.6+5714_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) = 708.018479236

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15065E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11721E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    19.476       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .69532       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    17.456       1.0000         .10000E-03   10000.    
     9 'Prefactor '    136.65       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    87.814       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11523E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    19.198       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    38.603       1.0000         .10000E-03   10000.    
    17 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    8.5533       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10125E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    14.005       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    87.156       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .11515E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    25.867       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .29855E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0484       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7070E+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=   707.8312     FROM MIGRAD    STATUS=CONVERGED   1265 CALLS     4804 TOTAL
                     EDM=   .57E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    309.66        .18142E-02** at limit **
   2  Prefactor     .10000E-03    133.02        .18142E-02** at limit **
   3  norm          .10000E-03    5.6583        .61609E-03** at limit **
   4  Prefactor     .10000E-03    45.053        .17449E-02** at limit **
   5  Prefactor     19.478        32.572        .90756E-04    .44548E-04
   6  Prefactor     .44565        1913.9        .59950E-02    .10229E-04
   7  Prefactor     .10000E-03    94.281        .18142E-02** at limit **
   8  norm          17.467        16.225        .91734E-04    .39395E-04
   9  Prefactor     136.71        357.87        .17227E-03    .32501E-05
  10  Prefactor     .10000E-03    21.462        .12039E-02** at limit **
  11  norm          .10000E-03    22.855        .12417E-02** at limit **
  12  Prefactor     87.871        124.56        .21437E-03    .74510E-05
  13  Prefactor     .10000E-03    514.44        .18142E-02** at limit **
  14  Prefactor     19.197        18.424        .91410E-04    .29336E-04
  15  Prefactor     .10000E-03    48.642        .18127E-02** at limit **
  16  Prefactor     38.599        28.322        .64510E-04    .70092E-04
  17  norm          .10000E-03    31.976        .14704E-02** at limit **
  18  Prefactor     8.5532        8.4615        .73511E-04    .34236E-04
  19  Prefactor     .10000E-03    13.090        .93999E-03** at limit **
  20  norm          14.000        24.652        .10703E-03    .69176E-05
  21  Prefactor     .10000E-03    5.1020        .58508E-03** at limit **
  22  Prefactor     .10000E-03    22.020        .12196E-02** at limit **
  23  Prefactor     87.128        93.553        .43035E-04    .75092E-05
  24  Prefactor     .10000E-03    12.382        .91476E-03** at limit **
  25  Prefactor     .10003E-03    86.593        .18142E-02** at limit **
  26  Prefactor     25.818        45.352        .78765E-04   -.22480E-04
  27  Prefactor     .10001E-03    435.76        .21392E-02** at limit **
  28  Normalizat    .10000E-01    .26914        .42588E-02** at limit **
  29  Prefactor     1.0486        .26823        .18650E-03    .47373E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100007
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.4777
  Prefactor  = 0.445655
  Prefactor  = 0.0001
  norm       = 17.467
  Prefactor  = 136.711
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 87.8712
  Prefactor  = 0.000100001
  Prefactor  = 19.1967
  Prefactor  = 0.0001
  Prefactor  = 38.5987
  norm       = 0.0001
  Prefactor  = 8.55322
  Prefactor  = 0.0001
  norm       = 14.0002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 87.1284
  Prefactor  = 0.0001
  Prefactor  = 0.000100033
  Prefactor  = 25.8178
  Prefactor  = 0.000100006
  Normalizat = 0.01
  Prefactor  = 1.04856
 **********
 **   18 **HESSE 
 **********

 FCN=   707.8312     FROM HESSE     STATUS=OK           525 CALLS     5329 TOTAL
                     EDM=   .53E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    309.66        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    133.02        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.6584        .12322E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    45.053        .34898E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     19.478        32.571        .36302E-05   -1.4825    
   6  Prefactor     .44565        1963.9        .23980E-03   -1.5574    
   7  Prefactor     .10000E-03    94.280        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          17.467        16.226        .36694E-05   -1.4872    
   9  Prefactor     136.71        357.82        .68910E-05   -1.3364    
  10  Prefactor     .10000E-03    21.462        .24078E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    22.855        .24833E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     87.871        124.55        .85749E-05   -1.3830    
  13  Prefactor     .10000E-03    514.46        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     19.197        18.405        .36564E-05   -1.4831    
  15  Prefactor     .10000E-03    48.643        .36254E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     38.599        28.308        .12902E-04   -1.4465    
  17  norm          .10000E-03    31.976        .29408E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     8.5532        8.4597        .29404E-05   -1.5123    
  19  Prefactor     .10000E-03    13.090        .18800E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          14.000        24.652        .42811E-05   -1.4959    
  21  Prefactor     .10000E-03    5.1021        .11702E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    22.020        .24393E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     87.128        93.528        .86070E-05   -1.3838    
  24  Prefactor     .10000E-03    12.382        .18295E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10003E-03    86.606        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     25.818        45.338        .31506E-05   -1.4691    
  27  Prefactor     .10001E-03    435.76        .42784E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .10000E-01    .26915        .85176E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     1.0486        .26596        .37299E-04   -.91128    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.34681e-10
Minuit parameter uncertainties:
  1  0.00303225
  2  0.000294019
  3  1.08691e-05
  4  9.22068e-05
  5  32.6011
  6  61.2944
  7  0.000116198
  8  16.2296
  9  363.741
  10  4.04775e-05
  11  4.56548e-05
  12  124.921
  13  0.00162126
  14  18.4101
  15  0.000129447
  16  28.3182
  17  1.23707e-05
  18  8.4609
  19  5.58476e-05
  20  24.6699
  21  8.02595e-06
  22  3.65304e-05
  23  93.6864
  24  9.51261e-06
  25  0.00338447
  26  45.3985
  27  0.00338395
  28  2.90348e-06
  29  0.266292
Done.

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

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.000e-04  4.565e-05  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.348e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
704    Prefactor:  1.049e+00  2.663e-01  0.000e+00  1.000e+01 ( 1.000e+00)
705        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
706        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
703   Normalization:  1.000e-02  2.903e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 241.158 57.238
Photon Flux Upper Limit: 3.36e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.10e-04 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/452706/likelihoodResults_542851201_545443201_4FGL_J1604.6+5714_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) = 707.831430764
delta logL = -0.000208430129078

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 707.831225839
delta logL = -3.50450511633e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10484E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    3.2573       1.0000          .0000       5.0000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0485       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7070E+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=   707.8312     FROM MIGRAD    STATUS=CONVERGED     97 CALLS      263 TOTAL
                     EDM=   .60E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1326.8        .81362E-02** at limit **
   2  alpha         2.0011        2.7588        .17535       -.37037E-08
   3  Normalizat    .10000E-01    .33593E-01    .42586E-02** at limit **
   4  Prefactor     1.0486        .77357E-01    .18649E-03    .32813E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.00114
  Normalizat = 0.01
  Prefactor  = 1.04856
 **********
 **   18 **HESSE 
 **********

 FCN=   707.8312     FROM HESSE     STATUS=OK            23 CALLS      286 TOTAL
                     EDM=   .85E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    25.261        .13044E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.0011        2.7145        .70138E-02   -.20089    
   3  Normalizat    .10000E-01    .26915        .85171E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.0486        .21960        .37299E-04   -.91128    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.50729e-12
Minuit parameter uncertainties:
  1  1.22521e-05
  2  538.298
  3  8.11932e-07
  4  0.219793
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/452706': 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) = 707.831222131
delta logL = 2.03470563065e-07

Extracting fit parameters...

4FGL J1604.6+5714
   Spectrum: LogParabola
320         norm:  1.000e-04  1.225e-05  1.000e-04  1.000e+04 ( 1.000e-12)
321        alpha:  2.001e+00  5.383e+02  0.000e+00  5.000e+00 ( 1.000e+00)
322         beta:  7.626e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  5.868e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
704    Prefactor:  1.049e+00  2.198e-01  0.000e+00  1.000e+01 ( 1.000e+00)
705        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
706        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
703   Normalization:  1.000e-02  8.119e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 241.158 57.238

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/452706/cmap_HighResolution_542851201_545443201_4FGL_J1604.6+5714_monthly_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.10e-04', job_status='DONE', photon_flux_upper_limit='3.36e-07', time_completed='2021-10-27 23:25:38.176072', job_id='452706', GAL2='1.05', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1635402338.18', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='2.03e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.35' WHERE bin_id='118' AND source_name='4FGL J1604.6+5714' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Wed Oct 27 23:25:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0279>
Subject: Job 452706: <4FGL_J1604.6+5714_monthly_bin118> in cluster <slac> Done

Job <4FGL_J1604.6+5714_monthly_bin118> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Oct 27 23:15:21 2021
Job was executed on host(s) <bullet0279>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Oct 27 23:15:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Oct 27 23:15:23 2021
Terminated at Wed Oct 27 23:25:38 2021
Results reported at Wed Oct 27 23:25:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1604.6+5714_monthly_bin118 241.158 57.2381 542851201 545443201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1604.6+5714 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   531.00 sec.
    Max Memory :                                 1097 MB
    Average Memory :                             225.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   615 sec.
    Turnaround time :                            617 sec.

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

