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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1063
RA = 181.203, Dec = 4.12
tmin = 514857601, tmax = 515116801
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='310317', job_status='RUN', time_executed='2021-09-04 23:16:46.824024', time_epoch_executed='1630822606.82' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1063'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/310317

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/310317/ft1_4FGL_J1204.8+0407_daily_bin1063.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/310317/ft1_4FGL_J1204.8+0407_daily_bin1063.fits outfile=/scratch/kocevski/310317/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1063.fits ra=181.203 dec=4.12 rad=12.0 tmin=514857601.0 tmax=515116801.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.65
user 3.30
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits" evtable="EVENTS" scfile=/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits sctable="SC_DATA" outfile=/scratch/kocevski/310317/ltcube_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.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/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits
.....................!
real 12.13
user 11.65
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits evtable="EVENTS" scfile=/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits sctable="SC_DATA" expcube=/scratch/kocevski/310317/ltcube_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits outfile=/scratch/kocevski/310317/expmap_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.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/310317/ltcube_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits
.....................!
real 191.24
user 186.21
sys 4.63

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/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits scfile=/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits outfile=/scratch/kocevski/310317/cmap_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits scfile=/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits outfile=/scratch/kocevski/310317/cmap_HighResolution_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.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.54
user 0.39
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits', '/scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits', expMap='/scratch/kocevski/310317/expmap_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits', expCube='/scratch/kocevski/310317/ltcube_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/310317/Model_4FGL_J1204.8+0407_daily_bin1063.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/310317/ft1_filtered_4FGL_J1204.8+0407_daily_bin1063.fits
Spacecraft file(s): /scratch/kocevski/310317/ft2_4FGL_J1204.8+0407_daily_bin1063.fits
Exposure map: /scratch/kocevski/310317/expmap_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits
Exposure cube: /scratch/kocevski/310317/ltcube_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/310317/Model_4FGL_J1204.8+0407_daily_bin1063.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) = 5545.22859915

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.8498       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11404E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    6.5675       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10546E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.0903       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    31.156       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10246E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    20.819       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10095E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10088E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    3.5545       1.0000         .10000E-03   10000.    
    16 'norm      '    .11237E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.1259       1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.3019       1.0000         .10000E-03   10000.    
    19 'norm      '    53.409       1.0000         .10000E-03   10000.    
    20 'Prefactor '    16.674       1.0000         .10000E-03   10000.    
    21 'norm      '    1.2136       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    18.341       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.1077       1.0000         .10000E-03   10000.    
    25 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    7.6943       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10047E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1573       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .92509       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=   5545.219     FROM MIGRAD    STATUS=CONVERGED    731 CALLS     3713 TOTAL
                     EDM=   .54E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.8498        1.8888        .55668E-07   -.10650E-03
   2  Prefactor     .10000E-03    38.289        .26889E-06** at limit **
   3  Prefactor     .10000E-03    11.157       -.45992E-07** at limit **
   4  Prefactor     .10000E-03    92.820       -.60333E-07** at limit **
   5  Prefactor     6.5675        9.6331        .20381E-06   -.34689E-04
   6  Prefactor     .10000E-03    79.997       -.11781E-05** at limit **
   7  Prefactor     3.0906        9.2862        .88894E-06   -.17079E-03
   8  Prefactor     .10000E-03    9.7670       -.17118E-09** at limit **
   9  Prefactor     31.148        20.789       -.45520E-07   -.32641E-04
  10  Prefactor     .10000E-03    43.594        .78131E-07** at limit **
  11  Prefactor     .10000E-03    22.232        .29710E-07** at limit **
  12  Prefactor     20.808        29.568       -.17045E-06   -.36095E-04
  13  Prefactor     .10001E-03    99.855       -.41818E-08** at limit **
  14  Prefactor     .10000E-03    10.512        .19469E-07** at limit **
  15  Prefactor     3.5580        12.132        .63405E-05   -.13661E-04
  16  norm          .10000E-03    2.1010       -.20605E-05** at limit **
  17  norm          3.1232        4.3641        .42842E-06    .25116E-05
  18  Prefactor     6.3051        22.614        .37332E-06    .29350E-05
  19  norm          53.452        56.266       -.14153E-05   -.32109E-04
  20  Prefactor     16.738        270.65       -.29589E-05   -.18801E-04
  21  norm          1.2137        .68013       -.56221E-07   -.10790E-02
  22  Prefactor     .10000E-03    21.614       -.19779E-07** at limit **
  23  Prefactor     18.336        26.819        .71421E-07    .42026E-05
  24  Prefactor     1.1054        17.443        .61186E-05   -.12860E-03
  25  norm          .10000E-03    .74784       -.37679E-07** at limit **
  26  Prefactor     7.6986        11.547       -.27826E-06    .57877E-04
  27  Prefactor     .10000E-03    27.826       -.27292E-06** at limit **
  28  Normalizat    1.1573        .21807        .26076E-06    .77890E-04
  29  Prefactor     .92506        .17862       -.61870E-06   -.35737E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.84982
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.56749
  Prefactor  = 0.0001
  Prefactor  = 3.09058
  Prefactor  = 0.0001
  Prefactor  = 31.1476
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.8083
  Prefactor  = 0.000100008
  Prefactor  = 0.0001
  Prefactor  = 3.55799
  norm       = 0.000100001
  norm       = 3.1232
  Prefactor  = 6.30509
  norm       = 53.4515
  Prefactor  = 16.7376
  norm       = 1.21367
  Prefactor  = 0.0001
  Prefactor  = 18.3359
  Prefactor  = 1.10537
  norm       = 0.0001
  Prefactor  = 7.69865
  Prefactor  = 0.0001
  Normalizat = 1.15729
  Prefactor  = 0.925063
 **********
 **   18 **HESSE 
 **********

 FCN=   5545.219     FROM HESSE     STATUS=OK           553 CALLS     4266 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.8498        1.8790        .49939E-03   -1.5436    
   2  Prefactor     .10000E-03    38.475        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    11.164        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    92.942        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     6.5675        9.6450        .78297E-03   -1.5195    
   6  Prefactor     .10000E-03    80.563        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.0906        9.2980        .11535E-02   -1.5356    
   8  Prefactor     .10000E-03    9.8025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     31.148        20.852        .71783E-04   -1.4591    
  10  Prefactor     .10000E-03    43.624        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    22.250        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     20.808        29.532        .87784E-04   -1.4795    
  13  Prefactor     .10001E-03    102.82        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    10.518        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     3.5580        12.810        .10719E-02   -1.5331    
  16  norm          .10000E-03    4.2966        .20071E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.1232        4.3617        .73254E-03   -1.5354    
  18  Prefactor     6.3051        22.602        .79949E-03   -1.5206    
  19  norm          53.452        56.358        .54882E-04   -1.4244    
  20  Prefactor     16.738        270.53        .98085E-04   -1.4890    
  21  norm          1.2137        .66725        .40355E-04   -1.5488    
  22  Prefactor     .10000E-03    22.525        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     18.336        26.773        .93522E-04   -1.4851    
  24  Prefactor     1.1054        17.680        .22475E-02   -1.5498    
  25  norm          .10000E-03    1.4746        .12463E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     7.6986        11.525        .72283E-03   -1.5153    
  27  Prefactor     .10000E-03    27.898        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1573        .25749        .26915E-03   -.87933    
  29  Prefactor     .92506        .20637        .24561E-03   -.95271    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.42424e-09
Minuit parameter uncertainties:
  1  1.87901
  2  8.56542e-05
  3  1.52859e-05
  4  0.000166507
  5  9.64726
  6  2.81299e-05
  7  9.30232
  8  1.11707e-05
  9  20.8564
  10  4.95225e-06
  11  4.32904e-06
  12  29.5522
  13  0.00186255
  14  9.26613e-06
  15  12.8198
  16  0.000111736
  17  4.36217
  18  22.6325
  19  56.4145
  20  135.311
  21  0.667253
  22  0.000137305
  23  26.7901
  24  8.84414
  25  4.01627e-06
  26  11.5279
  27  6.83732e-05
  28  0.257769
  29  0.206543
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  2.081e+01  2.955e+01  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:  9.251e-01  2.065e-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:  1.157e+00  2.578e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.88
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 1.16e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.06e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/310317/likelihoodResults_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.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) = 5544.10101561
delta logL = 1.11760039763

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5544.08245929
delta logL = 1.13615672255

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.100       1.0000         .10000E-03   10000.    
     2 'Index     '    1.3201       1.0000          .0000       10.000    
     3 'Normalizat'    1.1782       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91435       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=   5544.082     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      219 TOTAL
                     EDM=   .30E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 16.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.093        25.625       -.83926E-05   -.15805E-03
   2  Index         1.3200        .70925       -.40122E-04    .33636E-04
   3  Normalizat    1.1783        .20584        .43305E-06    .52786E-04
   4  Prefactor     .91435        .17076       -.10560E-06    .42979E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.0926
  Index      = 1.32004
  Normalizat = 1.17827
  Prefactor  = 0.914351
 **********
 **   18 **HESSE 
 **********

 FCN=   5544.082     FROM HESSE     STATUS=OK            31 CALLS      250 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.093        24.394        .99818E-04   -1.4905    
   2  Index         1.3200        .67654        .91057E-02   -.82713    
   3  Normalizat    1.1783        .24221        .26691E-03   -.87277    
   4  Prefactor     .91435        .20106        .24669E-03   -.95641    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.59037e-11
Minuit parameter uncertainties:
  1  24.4094
  2  0.681127
  3  0.242444
  4  0.20122
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/310317': 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) = 5544.08245921
delta logL = 1.13615679603

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.609e+01  2.441e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  1.320e+00  6.811e-01  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:  9.144e-01  2.012e-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:  1.178e+00  2.424e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.15
Ra Dec: 181.203 4.120
Photon Index (Free Index): 1.32 +/- 0.68
Photon Flux (Free Index): 6.38e-09 +/- 8.92e-09
Energy Flux (Free Index): 3.66e-05 +/- 6.25e-05

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/310317/cmap_HighResolution_514857601_515116801_4FGL_J1204.8+0407_daily_bin1063.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.06e-03', comment='SUCCESS', energy_flux2='3.66e-05', dlogl='1.14e+00', photon_flux2='6.38e-09', job_status='DONE', time_completed='2021-09-04 23:30:06.132857', photon_index_error2='0.68', photon_index2='1.32', ts='0.88', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='1.16e-07', energy_flux_error2='6.25e-05', EG='1.16', time_epoch_completed='1630823406.13', return_code='0', job_id='310317', GAL2='0.91', EG2='1.18', return_code2='0', photon_flux_error2='8.92e-09', ts2='3.15', photon_index='2.58' WHERE bin_id='1063' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:30:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0072>
Subject: Job 310317: <4FGL_J1204.8+0407_daily_bin1063> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1063> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 23:15:54 2021
Job was executed on host(s) <bullet0072>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:15:56 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:56 2021
Terminated at Sat Sep  4 23:30:06 2021
Results reported at Sat Sep  4 23:30:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1063 181.203 4.12 514857601 515116801 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 :                                   782.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             289.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   850 sec.
    Turnaround time :                            852 sec.

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

