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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1028
RA = 181.203, Dec = 4.12
tmin = 505785601, tmax = 506044801
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='310262', job_status='RUN', time_executed='2021-09-04 23:17:57.483492', time_epoch_executed='1630822677.48' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1028'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310262

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310262/ft1_4FGL_J1204.8+0407_daily_bin1028.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310262/ft1_4FGL_J1204.8+0407_daily_bin1028.fits outfile=/scratch/kocevski/310262/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1028.fits ra=181.203 dec=4.12 rad=12.0 tmin=505785601.0 tmax=506044801.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 3.57
user 3.38
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.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/310262/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1028.fits evtable="EVENTS" outfile="/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.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.51
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits" evtable="EVENTS" scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits sctable="SC_DATA" outfile=/scratch/kocevski/310262/ltcube_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.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/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits
.....................!
real 12.14
user 11.72
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits evtable="EVENTS" scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits sctable="SC_DATA" expcube=/scratch/kocevski/310262/ltcube_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits outfile=/scratch/kocevski/310262/expmap_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.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/310262/ltcube_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits
.....................!
real 190.30
user 185.18
sys 4.75

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

Setting source of interest to:
4FGL J1204.8+0407 @ 181.203 4.12

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits outfile=/scratch/kocevski/310262/cmap_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.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=181.203 yref=4.12 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.56
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits outfile=/scratch/kocevski/310262/cmap_HighResolution_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.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=181.203 yref=4.12 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.56
user 0.40
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits evtable="EVENTS" scfile=/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/310262/Model_4FGL_J1204.8+0407_daily_bin1028.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/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits.....................!
real 51.89
user 50.30
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits', '/scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits', expMap='/scratch/kocevski/310262/expmap_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits', expCube='/scratch/kocevski/310262/ltcube_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/310262/Model_4FGL_J1204.8+0407_daily_bin1028.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1204.8+0407'

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  3.692e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/310262/ft1_filtered_4FGL_J1204.8+0407_daily_bin1028.fits
Spacecraft file(s): /scratch/kocevski/310262/ft2_4FGL_J1204.8+0407_daily_bin1028.fits
Exposure map: /scratch/kocevski/310262/expmap_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits
Exposure cube: /scratch/kocevski/310262/ltcube_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/310262/Model_4FGL_J1204.8+0407_daily_bin1028.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) = 5689.73268075

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.0202       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10241E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    6.8047       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11993E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10135E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    46.914       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .11523E-02   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10122E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    5.1278       1.0000         .10000E-03   10000.    
    14 'Prefactor '    17.288       1.0000         .10000E-03   10000.    
    15 'Prefactor '    30.488       1.0000         .10000E-03   10000.    
    16 'norm      '    2.1662       1.0000         .10000E-03   10000.    
    17 'norm      '    8.1031       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10418E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    194.55       1.0000         .10000E-03   10000.    
    21 'norm      '    2.5085       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    2.9060       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    12.091       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .87116       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0038       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5689.705     FROM MIGRAD    STATUS=CONVERGED    725 CALLS     3727 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.1568       -.27613E-07** at limit **
   2  Prefactor     4.0244        38.175       -.28826E-05   -.64129E-05
   3  Prefactor     .10000E-03    57.393       -.30509E-04** at limit **
   4  Prefactor     .10000E-03    85.148        .55007E-04** at limit **
   5  Prefactor     6.7839        11.275        .81672E-06    .16131E-03
   6  Prefactor     .10022E-03    471.32       -.23939E-03** at limit **
   7  Prefactor     .10000E-03    2.7508        .74759E-07** at limit **
   8  Prefactor     .10000E-03    8.5783        .23785E-05** at limit **
   9  Prefactor     46.903        21.037        .13231E-05    .13423E-02
  10  Prefactor     .10000E-03    294.72       -.10748E-03** at limit **
  11  Prefactor     .10000E-03    29.023        .14713E-04** at limit **
  12  Prefactor     .10000E-03    32.850       -.90646E-05** at limit **
  13  Prefactor     5.1273        29.200       -.11987E-05    .25625E-04
  14  Prefactor     17.276        44.318       -.12156E-04    .14480E-04
  15  Prefactor     30.492        17.769       -.26666E-06    .12281E-03
  16  norm          2.1662        2.3135       -.70153E-08    .11716E-03
  17  norm          8.1017        5.3410        .10432E-05    .65620E-04
  18  Prefactor     .10000E-03    15.241        .93882E-05** at limit **
  19  norm          .10000E-03    16.874       -.10842E-04** at limit **
  20  Prefactor     194.53        161.68       -.12671E-04    .30724E-05
  21  norm          2.5087        .76282       -.23083E-07    .81949E-03
  22  Prefactor     .10000E-03    6.0419       -.14842E-06** at limit **
  23  Prefactor     .10000E-03    10.953       -.13516E-05** at limit **
  24  Prefactor     .10000E-03    8.3264       -.19730E-05** at limit **
  25  norm          2.9061        1.4952        .94184E-07    .26945E-04
  26  Prefactor     .10000E-03    3.1372       -.67053E-07** at limit **
  27  Prefactor     12.046        29.176       -.88721E-05   -.40139E-05
  28  Normalizat    .87112        .21031        .36956E-06    .63080E-03
  29  Prefactor     1.0037        .17019        .16199E-05    .82648E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 4.02441
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 6.78385
  Prefactor  = 0.000100215
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 46.9035
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.12728
  Prefactor  = 17.2758
  Prefactor  = 30.4919
  norm       = 2.16619
  norm       = 8.10172
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 194.53
  norm       = 2.50874
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.90609
  Prefactor  = 0.0001
  Prefactor  = 12.0463
  Normalizat = 0.871116
  Prefactor  = 1.00372
 **********
 **   18 **HESSE 
 **********

 FCN=   5689.705     FROM HESSE     STATUS=OK           543 CALLS     4270 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.1887        .15832E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     4.0244        38.191        .20113E-03   -1.5307    
   3  Prefactor     .10000E-03    59.339        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    85.428        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     6.7839        11.276        .15381E-03   -1.5187    
   6  Prefactor     .10022E-03    479.29        .41276E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.7569        .12217E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    8.5991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     46.903        21.027        .58540E-04   -1.4337    
  10  Prefactor     .10000E-03    297.38        .20666E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    29.073        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    32.931        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     5.1273        28.964        .17754E-03   -1.5255    
  14  Prefactor     17.276        44.235        .96327E-04   -1.4876    
  15  Prefactor     30.492        17.680        .72564E-04   -1.4603    
  16  norm          2.1662        2.3069        .11029E-03   -1.5414    
  17  norm          8.1017        5.3474        .11513E-03   -1.5139    
  18  Prefactor     .10000E-03    15.256        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    16.882        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     194.53        161.72        .14481E-03   -1.2909    
  21  norm          2.5087        .76280        .32630E-04   -1.5391    
  22  Prefactor     .10000E-03    6.0752        .18106E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    10.957        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    8.4348        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          2.9061        1.4924        .63744E-04   -1.5367    
  26  Prefactor     .10000E-03    3.1412        .13048E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     12.046        29.189        .11520E-03   -1.5014    
  28  Normalizat    .87112        .24601        .29933E-03   -.97483    
  29  Prefactor     1.0037        .19945        .23552E-03   -.92606    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.56485e-09
Minuit parameter uncertainties:
  1  3.75615e-06
  2  24.8155
  3  0.000723496
  4  0.000167543
  5  11.2796
  6  0.0204782
  7  6.91647e-08
  8  5.6306e-06
  9  21.0304
  10  0.000770017
  11  0.000125459
  12  4.91132e-05
  13  24.3906
  14  44.3193
  15  17.6829
  16  2.307
  17  5.34768
  18  2.34414e-05
  19  1.96183e-06
  20  162.093
  21  0.762802
  22  5.92948e-06
  23  3.04547e-06
  24  1.79835e-06
  25  1.4924
  26  1.38399e-06
  27  29.2233
  28  0.246323
  29  0.199599
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  4.911e-05  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  1.004e+00  1.996e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  8.711e-01  2.463e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 9.67e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.56e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310262/likelihoodResults_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.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) = 5689.70482677
delta logL = -0.000144633932905

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5689.70468216
delta logL = -2.799606591e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5689.705     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      234 TOTAL
                     EDM=   .36E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7600.2        .90712E-02** at limit **
   2  Index         2.5083        5.8031        .50000       -.13530E-05
   3  Normalizat    .87112        .11352        .67660E-01    .17255E-04
   4  Prefactor     1.0037        .95297E-01    .44482E-01    .64026E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.50827
  Normalizat = 0.871115
  Prefactor  = 1.00372
 **********
 **   18 **HESSE 
 **********

 FCN=   5689.705     FROM HESSE     STATUS=OK            33 CALLS      267 TOTAL
                     EDM=   .21E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    37.427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5083        6.2529        .50000       -.52169    
   3  Normalizat    .87112        .23290        .29933E-03   -.97483    
   4  Prefactor     1.0037        .19679        .23552E-03   -.92606    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10509e-12
Minuit parameter uncertainties:
  1  1.81911e-06
  2  4.68129
  3  0.23317
  4  0.196933
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310262': 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) = 5689.70468215
delta logL = -1.9023900677e-08

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.000e-04  1.819e-06  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.508e+00  4.681e+00  0.000e+00  1.000e+01 (-1.000e+00)
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  1.004e+00  1.969e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  8.711e-01  2.332e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 181.203 4.120

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/310262/cmap_HighResolution_505785601_506044801_4FGL_J1204.8+0407_daily_bin1028.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.56e-03', job_status='DONE', photon_flux_upper_limit='9.67e-08', time_completed='2021-09-04 23:31:31.094628', job_id='310262', GAL2='1.00', fit_tolerance='1e-08', EG2='0.87', EG='0.87', time_epoch_completed='1630823491.09', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='-1.90e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1028' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:31:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0220>
Subject: Job 310262: <4FGL_J1204.8+0407_daily_bin1028> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1028> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:48 2021
Job was executed on host(s) <bullet0220>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:51 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 23:15:51 2021
Terminated at Sat Sep  4 23:31:31 2021
Results reported at Sat Sep  4 23:31:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1028 181.203 4.12 505785601 506044801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1204.8+0407 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   798.39 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             298.10 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   940 sec.
    Turnaround time :                            943 sec.

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

